Category Archives: Uncategorized

OpenMediaVault setup fails to install bootloader

When installing OpenMediaVault via a USB stick you may run into an error. During the installation you are prompted to select the correct drive to install to (in my case /dev/sdb). Towards the end of the install, setup will attempt to install the bootloader to the installation media, which fails.

To fix this issue we need to chroot to the new installation, install the bootloader, then unmount. This is done at the end of the installation, just before rebooting.

  1. After the error, continue the installation so it can complete.
  2. When the message appears to restart the computer, press Alt+F2 to switch to a new console. Press enter to activate it.
  3. Type the following commands to mount the new OpenMediaVault installation and chroot to it:
    mount /dev/sda1 /mnt/
    mount -t proc none /mnt/proc
    mount -o bind /dev /mnt/dev
    mount -t sysfs sys /mnt/sys
    chroot /mnt/ /bin/bash
  4. Enter the following command to install the GRUB bootloader. Be sure to select the correct drive when prompted (in my case it was /dev/sda):
    dpkg-reconfigure grub-pc
  5. Exit the chroot and unmount:
    exit
    umount /mnt/sys
    umount /mnt/dev
    umount /mnt/proc
    umount /mnt
  6. Switch back to the install screen by pressing Alt+F1. Press enter to reboot. Remove the USB stick.

OpenMediaVault should now boot!

References:
http://forums.openmediavault.org/index.php/Thread/5685-Grub-installs-on-USB-drive-not-hdd/
http://zeldor.biz/2010/12/install-grub-from-chroot/

Installing MythTV on Debian

Here is my method for setting up MythTV on Debian 7 (Wheezy). I chose Debian as I found it the most stable Linux distribution and also allowed for a very minimal installation. This is a backend only setup as I use XBMC as the frontend on another PC.

Note: The commands below are run as the root user unless specified.

  1. Install Debian. I used the network install ISO, set up on a USB stick. During installation I did not choose to install any packages other than SSH.
  2. Login via SSH. I use PuTTY on my Windows machine. In order to get mythtv-setup to work, you will need to install an X Windows server. I use Xming.
  3. In PuTTY, enable X11 forwarding. Enter localhost:0 for the X display location. Make sure Xming is running before connecting.
  4. Update /etc/apt/sources.list. We need to add the repository at deb-multimedia.org, so MythTV can be installed.
    deb http://www.deb-multimedia.org wheezy main non-free
    deb http://www.deb-multimedia.org wheezy-backports main
    
  5. Add non-free to the existing sources as well. This was required to download the firmware for the Sony PlayTV tuner I’m using.
  6. Run the following to install the deb-multimedia package source.
    apt-get update
    apt-get install deb-multimedia-keyring
    apt-get update
    
  7. Here I’m installing the firmware for the tuner, as well as ntp client and the X Windows Server.
    apt-get install firmware-linux-nonfree xorg ntp
    
  8. Install MythTV. We need to install from the Wheezy-Backports repository as the stable one does not have the latest version.
    apt-get -t wheezy-backports install mythtv mythweb
    
  9. I open access to Apache for access to MythWeb on the local subnet. Edit /etc/mythtv/mythweb.conf.
    Allow from <Subnet>/24
    

    Where is your LAN IPv4 network address.

  10. Restart the Apache server for the above change to take effect.
    /etc/init.d/apache2 restart
    
  11. Create MythTV storage directories. I have a drive mounted to /mnt/storage, and create a directory here called mythtv. Under this I create two directories, one for recorded TV, the other for the live TV buffer. I then give the mythtv user read and write permission on the directories.
    cd /mnt/storage
    mkdir mythtv
    mkdir mythtv/recordedtv
    mkdir mythtv/livetv
    chown mythtv:mythtv recordedtv/
    chown mythtv:mythtv livetv/
    chmod 755 recordedtv/
    chmod 755 livetv/
    
  12. Run mythtv-setup as your non-root user. Refer to the MythTV Wiki for setup help.
  13. Make sure mythtv-backend is running. You can start the backend like so.
    /etc/init.d/mythtv-backend start
    
  14. The MythTV backend should now be ready.