Search This Blog

Wednesday, December 14, 2011

Easier openelec testing - boot from a USB key while leaving internal version intact

Ok so something very useful about openelec is that it will happily run off a small cheap USB key - 1GB is enough.

This means that you can have a nicely set up main box with an SSD/HD for general 'wife friendly' use, and periodically just whack a new testing version on to your USB stick and boot that up to see how it's all going.

However, if you actually try this, you will find the openelec won't boot from the USB stick - it will in fact start to boot from the usb stick but then partially boot from the internal HD and fall in a big heap.  If you unplug your internal hard drive it will boot fine off the USB stick.  But that's a pain.

Some quick instructions to fix this:

(I did this in my linux VM running on my windows server - it's proving very handy!)

Plug your USB stick into your linux box and run:
df -h
to determine what device your USB stick is - we're looking for two partitions, /System and /Storage.  Usually these will be /dev/sdb1 /dev/sdb2 but it will depend on your system.

Then, you need to change those partition labels as root:
sudo e2label /dev/sdb1 System2
sudo e2label /dev/sdb2 Storage2

Now as root, edit the boot file in the system partition
sudo nano /media/System/extLinux.conf

In there change the reference to System (LABEL=System) to System2 and Label=Storage to refer to Storage2.

Now, on your openelec box set it to boot from the USB stick first, and your internal HD second.  This means if you have the stick plugged in it will boot your testing version, otherwise it will just boot your proper set up as normal.

Wa la, easy testing!




4 comments:

  1. Hi, just found your instructions and they worked perfectly, thanks! I've been wondering why I couldn't boot from the USB key without first removing the internal HD..

    I'm wondering though how I can access the System2 and Storage2 partitions from Windows; usually I use Windows Explorer on a Win7 laptop to access \\192.168.1.4\Media\Storage so that I can get at the debug log, installed skins etc in the .xbmc folder. However when booting with the external USB, I cannot get at the Storage2 or System2 folders via Samba. I can only see the original System and Storage folders on the internal disc. Any ideas? More details here on openelec: http://openelec.tv/forum/20-development-discussion/21922-accessing-xbmc-folder-on-a-dual-boot-setup

    Thanks a mill

    ReplyDelete
  2. I replied on the OE forums but jsut in case - I use WinSCP to access the USB key partitions and that works fine.

    ReplyDelete
  3. I just disabled the SATA drive in BIOS since I knew I wanted to use a USB Stick. Given HDD prices I might remove and sell the SATA :-) Nice blog BTW

    ReplyDelete
  4. Yep that works too but it's a pain to go in and out of the bios all the time - this way you just plug/unplug the stick and you're using stable vs. testing

    ReplyDelete

Note: Only a member of this blog may post a comment.