FreeBSD MythTV Backend VirtualBox Guest

After some trial and error, I thought I would share my virtual machine settings and setup tips for a FreeBSD guest running MythTV. I am using VirtualBox on a Windows host. This enables me to use TeamViewer and other Windows only applications and get the most of a single piece of hardware. Here are the settings for my FreeBSD 10.0 64-bit guest:

  1. System – Base Memory 2048MB
  2. Video – Memory 128MB and enable 3D Acceleration checked
  3. Storage – SATA Controller
    1. Fixed Size VDI 10GB (on SSD)
    2. Fixed Size VDI (on external HDD)
    3. CD/DVD w/ FreeBSD 10.0 64bit ISO
  4. Audio – Intel HD
  5. Network – Bridged

Installation is like a normal FreeBSD install. I chose to add the ports and src (needed if you build VirtualBox Guest Additions) optional system components. I deleted the swap slice, configured the network as static and enabled the moused, ntpd and sshd services. Once I finished the install, I rebooted and logged in. Here are most of the commands I ran to finish configuration and get MythTV installed. I have excluded adding ada1 (the second VDI file) as a /store slice because the FreeBSD HandBook 18.2 has it covered.

shell> pkg install virtualbox-ose-additions
shell> pkg install xorg
shell> pkg install xfce
shell> portsnap fetch
shell> portsnap extract
shell> cd /usr/ports/audio/lame
shell> make install
shell> pkg install multimedia/mythtv
shell> pkg install mysql55-server
shell> vi /etc/rc.conf
#Below is my /etc/rc.conf - add lines to yours as needed
hostname="freebsd-guest"
ifconfig_em0="inet 10.0.0.98  netmask 255.255.255.0"
defaultrouter="10.0.0.1"
sshd_enable="YES"
vboxguest_enable="YES"
vboxservice_enable="YES"
vboxservice_flags="--disable-timesync"
moused_port="/dev/psm0"
moused_type="auto"
moused_enable="YES"
hald_enable="YES"
dbus_enable="YES"
ntpd_enable="YES"
dumpdev="NO"
mysql_enable="YES"
mysql_args="--bind-address=10.0.0.98"
mythbackend_enable="YES"
# save (:wq!) /etc/rc.conf
shell> service hald start
shell> service dbus start
shell> service mysql-server start
shell> mysqladmin -u root password newpassword
shell> cd /usr/local/share/mythtv/database
shell> mysql -u root -p
mysql> . mc.sql
mysql> GRANT ALL PRIVILEGES ON mythconverg.* TO 'mythtv'@'%' IDENTIFIED BY 'mythtv';
mysql> FLUSH PRIVILEGES;
mysql> quit;

shell> mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p

shell> startxfce4
xterm> mythtv-setup
shell> service mythbackend start

Note: I had to install lame from the ports because pkg would not install mythtv without lame.

I know there are a lot of minor details that I skipped like mythtv-setup and the many settings you have to select but these really are all the commands I needed. If you need help or get stuck, just ask in the comments. FYI, I tried running mythfrontend on the guest just for kicks and while it works the video playback is slowed and is not watchable. So I will be using XBMC 13.2 on the host system for playback. To enable and configure the PVR client go to Settings > Add-ons > Disabled Add-ons > PVR clients > MythTV cmyth PVR client.

Now just do a headless start by pressing and holding the shift key while clicking start in VirtualBox. I also plan to install Lighttpd and mythweb on the guest. So far I have tested recording to my external USB 2.0 HDD and have been impressed! I plan to switch to an external USB 3.0 HDD for recording storage.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *