1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Main Page

From plugmyth

Jump to: navigation, search

PlugMyth: MythTV on Plug Computers

Current version: 0.23.1-rc1

Contents

About

PlugMyth is a pre-packaged MythTV "backend" (recording and storage) designed to run on Marvell's "Sheeva" platform based on the Kirkwood ARM CPU. Combined with a separate MythTV "frontend" of some sort (such as PC connected to your TV), PlugMyth gives you a small, power-efficient, quiet DVR/PVR (Digital Video Recorder/Personal Video Recorder) system. You can record directly on the Plug (some limitations apply) or use PlugMyth to control slave backends.

Why

  • Traditional PCs consume a lot of power. A Plug computer with 2.5" hard drive draws maybe 10 watts, probably 1/10th the power of many traditional PCs (which also reduces air conditioning needs in the summer).
  • Traditional PCs are noisy: 3.5" hard drives whine and rattle; large power supplies and hot CPUs require fan cooling. A Plug computer can be completely silent (even with a 2.5" hard drive, it's still practically silent).
  • Traditional PCs are big; Plug computers can be tucked away out of sight just about anywhere, even in your wiring closet.
  • A little Plug just seems a more elegant, appliance-like solution for a simple task like recording TV.

System Requirements

Supported products include SheevaPlug, GuruPlug, TonidoPlug, Ionics Plug, PogoPlug, and DockStar though pretty much any Sheeva-like device will probably work.

  • You will need a place to install the PlugMyth OS. This can be a 2GB or larger USB flash drive, SD card, or traditional hard drive attached via USB or SATA.
  • To record directly on the Plug, you will need a place to store your recordings. This can be a USB or SATA hard drive (which can be the same one used for the PlugMyth OS), or you can use NAS (Network Attached Storage).
  • To record directly on the Plug, you will need a tuner that delivers digital (DVB/ATSC/MPEG/H.264 etc) data. The SiliconDust HD HomeRun is well-tested and strongly recommended. One user has also reported success with a Hauppage HD-PVR after applying a patch. If you do try a USB tuner, please let us know if it worked!
  • To watch your recordings, you will need a separate device for your MythTV frontend, such as a traditional PC, or more likely, an HTPC (Home Theater PC) or similar connected to your TV. You can run any Linux distro you wish for your frontend, such as Mythdora, Mythbuntu, etc as long as the version of the MythTV frontend software matches that on PlugMyth (currently 0.23.1).
  • You will need some technical knowledge to install PlugMyth, particularly editing files, partitioning, and mounting drives or network paths in Linux, as well as setting up the bootloader on your Plug of choice. Documentation for these tasks is of course available, but assumes basic familiarity with Linux.

Limitations

  • You'll want to do any transcoding or commercial flagging somewhere else (you could use your frontend, for example). A Plug computer is really not up to this task.
  • Recording to a USB hard drive from a USB tuner attached to the same Plug may cause problems, so please use SATA or NAS for your recordings when using a USB tuner.
  • You won't be able to record a large number of HD streams simultaneously on a single Plug. With the HD HomeRun, 1 stream works for sure, and 2 is likely to work. 3 is pushing it and 4 probably will not work (of course, you can always set up additional slave backends and record all you want).

Features

  • Armedslack (Slackware) 13.1, kernel 2.6.33.5
  • MythTV 0.23.1
  • VNC (for mythtv-setup)
  • Webmin, including custom commands for setting up and maintaining MythTV. You can also manage via telnet/SSH
  • NTPd (network time) server
  • DNSMasq, should you wish to use your Plug as a DNS/DHCP server
  • Samba and NFS, should you wish to use your Plug as NAS server
  • Many Armedslack Slackware packages are available for installing additional software, and gcc is preinstalled for compiling tarballs
  • In the future, a PlugMythPlus distribution will be available that contains a premade NFSRoot for a diskless frontend

Release Schedule

PlugMyth will generally release a new version "soon" after MythTV makes an official release. Whatever the latest release version of Armedslack is at that time will be used.

Download

PlugMyth can be downloaded here: http://www.megaupload.com/?d=NQP3ITNW

The root password is plugmyth

In compliance with the GPL and other OSS licenses, the source code in PlugMyth can be obtained from:

http://ftp.slackware.org.uk/armedslack/armedslack-13.1/source/

http://www.mythtv.org/download

http://www.webmin.com/download.html

If you have any difficulty downloading the source code, please post to the forum for assistance.

Installation

To get PlugMyth onto your flash or hard drive, it's easiest to use a Linux box or VM. However, it is also possible to use Windows.

  • Linux
  1. Open a console and plug in your PlugMyth drive. Use whatever command is appropriate to your Linux distro to determine the device name (for example, /dev/sdb). One helpful command may be dmesg | tail.
  2. Once you have determined the device name, change to the folder where you downloaded PlugMyth to and run
    cat plugmyth-0.23-rc1.img.bz2 | bunzip2 | dd of=/dev/sdX bs=1M where X is the actual letter of your drive. Choosing the wrong one could destroy your Linux installation and all data, so take care!
  3. After a long wait, the process will complete and you can run
    sync
    and move your drive to your Plug.
  • Windows
  1. Download the dd and bunzip2 utilities and place the .exe files in C:\Windows.
  2. Open a command console (Start -> Run -> cmd) and change to the directory you downloaded PlugMyth to (for example, cd Desktop).
  3. With your PlugMyth drive NOT plugged in, run
    dd --list
    and take a note of which devices are detected. Now plug your drive in, wait a few seconds, then run dd --list again and note which device has newly appeared -- typically identified as a "removeable media" -- this is so you know which device is your PlugMyth drive. Choosing the wrong one could destroy your Windows installation and all data, so take care!
  4. Finally you can run
    type plugmyth-0.23-rc1.img.bz2 | bunzip2 | dd of=\\.\Volume{00000000-0000-0000-0000-000000000000}\ bs=1M
    substituting, of course, your own detected Volume ID.
  5. After a long wait, the process will complete and you can use the Windows Hardware Manager to safely "Stop" the device before unplugging it and moving it to your Plug.

Booting

  • If you have a "fully featured" Plug with a serial console (such as Sheeva, Guru, etc)
  1. Attach the serial cable and boot your plug. At the countdown, press any key to break into u-Boot.
Issue the following commands to boot from SD card:
setenv bootcmd 'mmcinit; fatload mmc 0:1 0x6000000 uImage; bootm 0x6000000'
Issue the following commands to boot from USB:
setenv bootcmd 'usb init; fatload usb 0:1 0x6000000 uImage; bootm 0x6000000'
Issue the following commands to boot from SATA:
setenv bootcmd 'ide reset; fatload ide 0:1 0x6000000 uImage; bootm 0x6000000'
  • If you do not have access to a serial console (Tonido, Pogo, DockStar, etc), it's highly recommended that you purchase a TTL serial adapter. It's quite easy to mistype a command and render your device unbootable until you do get a cable (and even then, maybe not), but these instructions are provided for the stout of heart. The following instructions are specific for the DockStar; they may also work on other Plugs (please post to the forum before attempting it). Special thanks to Jeff Doozan for figuring out the secrets of the DockStar bootloader and for his work on compiling the chainloaded u-Boot.
  1. You will need to install a second u-Boot to an unused area of flash and chainload it. To do this, boot your Plug into the stock factory OS and ssh or telnet in to a console and run the following commands. Please note that these commands are sourced from various places on the internet (1, 2, 3), so run these at your own risk. We believe these commands to be safe but nothing is ever certain, so you may end up with a bricked Plug. Neither PlugMyth or its developers are responsible for damage or unintended operation of your Plug as a result of these commands.
    mount -o rw,remount /
    wget http://jeff.doozan.com/debian/uboot/fw_env.config
    mv fw_env.config /etc/
    wget http://jeff.doozan.com/debian/uboot/fw_printenv
    chmod 755 fw_printenv
    ln -s fw_printenv fw_setenv
    ./fw_setenv ethaddr '00:00:00:00:00:00'
    (be sure to substitute your own MAC address from the bottom of your Plug)
    ./fw_setenv bootargs 'console=ttyS0,115200 root=/dev/sda2 ro'
    ./fw_setenv bootcmd 'usb start; fatload usb 0:1 0x6000000 uImage; bootm 0x6000000; reset'
    wget http://jeff.doozan.com/debian/uboot/flash_erase
    chmod 755 flash_erase
    flash_erase /dev/mtd3
    wget http://jeff.doozan.com/debian/uboot/uboot.mtd3.bin
    nandwrite /dev/mtd3 uboot.mtd3.bin
    wget http://jeff.doozan.com/debian/uboot/blparam
    chmod 755 blparam
    ./blparam 'bootcmd_original=nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'
    ./blparam 'bootcmd_usb=nand read.e 0xc00000 0x2500000 0x40000; go 0xc00000'
    ./blparam 'bootcmd1=setenv bootcmd run bootcmd2; saveenv; run bootcmd_usb'
    ./blparam 'bootcmd2=setenv bootcmd run bootcmd1; saveenv; run bootcmd_original'
    ./blparam 'bootcmd=run bootcmd1'

    As a failsafe, these commands configure your Plug to boot to the stock OS if PlugMyth is not bootable for some reason.

Initial Configuration

Once PlugMyth has booted, you need to know its IP address. If you have access to your DHCP server, looking there is the easiest way. If you do not, you can use nmap to scan your network. Armed with the IP address,

  1. First, you need to set up your time zone. SSH or telnet in to the PlugMyth IP (root password is plugmyth)and run
    timeconfig
  2. If you have a DockStar or other device that lacks an internal clock, you will need to sync to a time server every boot:
    nano /etc/rc.d/rc.ntpd
    Uncomment lines 6 and 7. Also, change "pool.ntp.org" to an appropriate server for your locality or to your own time server, if you have one.
  3. Since MythTV is sensitive to clock accuracy, configure NTPd with
    nano /etc/ntp.conf
    Uncomment line 16 and change "pool.ntp.org" to an appropriate server for your locality or to your own time server, if you have one.
  4. If you are using a Plug with a chainloaded u-Boot (Tonido, Pogo, DockStar, etc), you may now disable the failsafe mechanism by running this command:
    cd /bin
    wget http://jeff.doozan.com/debian/uboot/blparam
    chmod 755 blparam
    blparam 'bootcmd=run bootcmd_usb'

    Should you ever wish to return to the stock OS, issue blparam 'bootcmd=run bootcmd_original'
  5. The PlugMyth distribution is designed to fit on a 2GB card/stick. However, not all 2GB flash is created equal (yours probably has another few hundred MB available you want to use), or you may simply have a larger drive period. You should expand PlugMyth to take advantage of the space you have available. To do this,
    1. Run
      cfdisk
    2. Cursor down to the /dev/sda2 and delete the partition (don't worry, this is safe).
    3. Create a new partition, at the Beginning, and select the desired size: for small SD or USB flash drives, you probably want to use all available space; for hard drives, you may wish to use 16GB (perhaps more if you'll be using your Plug computer for more than just MythTV).
    4. Be sure to Write your changes, then Quit.
    5. Reboot.
    6. Log in again and run
      resize2fs /dev/sda2
    7. Now run
      df -h
      to confirm your drive has been expanded.
  6. If your Plug will be recording directly from a tuner (i.e., not through a Slave backend), you will need to configure the mount point you wish to use.
    1. If you installed PlugMyth to a hard drive and wish to record to that drive, telnet or SSH in to PlugMyth's IP and run
      cfdisk
      Here you can cursor down to the Free Space and create a new partition. Write, Quit, and reboot. After rebooting, format it with
      mkfs.ext4 /dev/sda3
    2. Mounting your recording storage is probably easiest in Webmin. You can access Webmin with http://ip.ad.dre.ss:10000 (of course, you'll need to substitute your own PlugMyth IP) (login as admin/plugmyth). Go to System, Disk and Network Filesystems and then click "Add mount". You can use a local partition, NFS, or Samba (Windows Network). A /storage folder is already present in the distribution; it's recommended you mount it there.
    3. IMPORTANT: Never record to /storage directly. After mounting, create a subfolder inside the mount point (mkdir /storage/recordings and chmod 755 /storage/recordings) and record to the subfolder. This is a very important safety feature so Myth doesn't fill up your disk OR wipe out ALL your recordings. You have been warned!

Configuring MythTV

Finally!

  1. Open Webmin (http://ip.ad.dre.ss:10000) and login as admin/plugmyth. Open Other Commands, Custom Commands.
  2. Click 'Start mythtv-setup'.
  3. Now you can VNC into PlugMyth's IP address and you should be greeted by the mythtv-setup program. Run it as you normally would for any other MythTV configuration (be SURE to set PlugMyth's actual IP, do NOT use the default 127.0.0.1). When you're done, hit Esc to exit and click Ok.
  4. Click 'Finish mythtv-setup' in Webmin, then 'Start mythbackend', and you're done! Fire up your frontend and connect it to PlugMyth.

Troubleshooting

Booting issues on DockStar

  • Blinking green light indicates the stock bootloader is running.
  • Blinking yellow light indicates the stock Linux OS is running.
  • No light indicates the chainloaded u-Boot or PlugMyth is running.

Other issues

Please use the forum for assistance.

Future development

Future ideas include:

  • a PlugMyth-Plus distro that includes a preconfigured remote diskless frontend OS (diskless frontends are quieter and draw less power, so they fit right in with the PlugMyth philosophy)
  • a streamlined "click'n'play" PlugMyth installer VM that would greatly reduce the amount of command-line work needed to set up PlugMyth
Personal tools