I tried out the Moblin test drive USB image on my EeePC, but wanted something a little more permanent. Moblin seems like quite an interesting alternative to the hideous Xandros Linux install that comes by default or my not-strictly-legitimate installation of Mac OS X, and I'd like it hanging around so I can keep an eye on the project. Putting it on an SD will allow me to use it without impacting my normal work environment - and I could even have various releases and other operating systems on multiple SD cards.
Unfortunately, there's a few bugs that cause problems when installing to an SD card, and it took a bit of time searching around to find the right solutions. I found some threads on the moblin-dev mailing list, but thought it would be useful to pull everything into one coherent guide. So here's what I did.
Firstly, create a bootable USB image. The detailed moblin live image instructions contain an error for Mac users:
sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m
should read:
sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1024
When you've written the image to the USB key, you need to boot from the USB key. Press ESC as the machine starts up to get the boot device selection menu. When the Moblin menu appears, select the "Boot and Install" option.
When the installer starts, work through to the section for selecting the install location "Select the drive(s) to use for this installation", and select your SD card device. For me, this shows up as "sdd Single Flash Reader". Also select it as the location for the boot sector, in the "What drive you you like to boot this installation from?" option.
When the installation is complete, allow it to reboot, but again select the USB key to boot from as we need to apply some fixes to our install before it will work. At the Moblin boot menu, select "Boot" to run the live image off the USB key.
When Moblin starts, go to applications and select terminal. You now need to mount the recently installed partition and edit a few files there. Firstly, become root by typing su - (the password is moblin), and then type:
mkdir /mnt/sd
mount /dev/sdd1 /mnt/sd
cd /mnt/sd
vim etc/fstab
This will allow you to edit the location of the partitions to mount. Change any references to sdd in this file to sdc (since when we boot without the USB key, the SD card will be in a different location). There should be two entries - one for the / partition and one for the swap partition.
Next, edit the grub boot configuration (vim etc/grub.conf) and again change sdd to sdc, and also add rootdelay=10 to the kernel line.
Finally, a quick hack to make the boot process pause before checking the disks. vim etc/rc.sysinit and search for the fsckoptions section, and just before that (just after the hostname line) add: sleep 2
You should now be ok to reboot, remove the USB stick, and select your SD card as the drive to boot from.
It works, and it's possible to use the system, but beware that the SD card introduces a fair degree of lag as it is not the fastest device to read from and write to (possibly restricted by the port in the EeePC rather than the card itself).
Posted by savs at July 4, 2009 6:31 PMHey, I've just fixed that error in the instructions. Thanks for pointing it out. As it seems you're at GCDS come by and say hi! We've got quite a few guys here.
Posted by: Nick Richards at July 4, 2009 6:42 PM