Revision 1 as of 2009-06-20 01:50:16

Clear message

ARM Rootfs ON SD For Babbage

This page describes the process for building a root filesystem on the SD boot device without having to go through an install media. This allows one to boot a Jaunty Ubuntu armel release directly on SD. Much of this is based on the existing Rootfs From Scratch work.

Creating a bootable SD

The cheapest and easiest way to do so is probably to use usb creator to write the existing alternate install image to a SD device. This will then create two partitions. The first partition will be a redboot partition with the kernel and initrd image based on 2.6.28 that will boot on the babbage, and the second partition is a live install. You may also simply dd the first 16 megs of an existing babbage SD to get the redboot and kernel setup, since we need nothing else.


Now we can partition the device in a more useful way. To do this, I suggest fdisk, which will detect the geometry and let you manipulate the SD easily. If you have an existing alternate or desktop live install, simply delete the second partition. Leave the first partition, type df, alone, as this is the redboot & kernel.

Now, you can create a new primary partition on the SD for "swap" if you want. Alternately, you can depend on the comps swap support in the kernel to use compressed swap pages in ram. Since the Babbage has only 256 megs or ram, you may wish to have an external swap.

Next, with the remaining space on the SD, create a standard ext2 Linux filesystem partition. This will be your new "root" filesystem.

Create a root tarball

The ARM/RootfsFromScratch page can be consulted for this. Basically, you will need to get Oliver's build-arm-rootfs script. A simple rootfs can be created for the LXDE desktop, which runs well on the Babbage, with something like:

sudo ./build-arm-rootfs --fqdn ubuntu --login ubuntu --password ubuntu --seed kxde,gdm

Other ideas can be found on the ARM/RootfsFromScratch page. Or you can build a custom root seeded with any base set of packages you may wish. This script, when if finishes, will produce a "armel-....-.tgz" file that is your new "root".

Put tarball on your SD root

First, you will need to create the ext2 filesystem. If your SD appears as something like /dev/sde, then you will use mke2fs /dev/sde2 or mke2fs /dev/sde3 (if you have a swap) to create the initial ext2 filesystem on the device.

Now you should be able to mount your SD root filesystem somewhere. Perhaps /tmp/sd, as in mount /dev/sde2 /tmp/sd. Now you can unpackage the root tarball created by the build-arm-rootfs script. You can use sudo tar -C /tmp/sd -xvzf armel-...-.tgz. You must do so as root because the rootfs needs device nodes and other things created under root or other user permissions.