How To: Use the Fedora 12 rootfs on a BeagleBoard-xM
The BeagleBoard-xM ships with a MicroSD card, which contains a working Angstrom validation image. This how-to guide will lead the user through how to modify the xM's SD card to run Fedora 12. This guide assumes that the user is running a recent version of Fedora on his or her local machine, but should apply to users of any recent linux distribution.
This Guide is a draft
What you need
To complete this guide, you'll need
- Pre-formatted SD card that came with the BeagleBoard-xM
- Serial cable to access BeagleBoard-xM's serial console
- SD card reader on your PC, with a MicroSD to SD adapter
SD Card Formatting
Insert the SD card into a card reader, and start up a partition editor like gparted. You should see that there is a FAT32 partition at the beginning of the card, a small "unknown" partition, and then lots of free space. Delete the "unknown" partition, then create a new partition taking up all of the available free space. Label the partition ROOTFS, and format it as ext3.
Apply your changes, and verify that you can mount the ROOTFS partition successfully.
Copy rootfs to SD Card
Now that the ROOTFS partition has been created, it's time to extract the Fedora 12 root filesystem onto it. First, download the prebuilt root file system. Once it's downloaded, navigate to the ROOTFS partition in a terminal, and extract the rootfs using the following commands:
su -c 'tar xvf /path/to/rootfs-f12.tar.bz2 ./' su -c 'mv rootfs-f12/* ./' su -c 'rmdir rootfs-f12'
Replace /path/to/rootfs-f12.tar.bz2 with the path to rootfs-f12.tar.bz2 on your system.
The first command extracts the root filesystem to your current directory, which is the ROOTFS partition on the SD card. In the rootfs tarball, all of the files are located in the 'rootfs-f12' folder, so the second command moves all of the files out of the rootfs-f12 folder and into the base ROOTFS directory. Finally, the third command removes the unneeded 'rootfs-f12' folder.
Install Kernel Modules
The BeagleBoard-xM comes with a pre-installed kernel image, but kernel modules and firmware are required for extra hardware such as the Real Time Clock. These modules need to be installed to /lib/modules on the ROOTFS partition. There are two ways to go about getting these modules: downloading them from the internet, or recovering them from the BeagleBoard's included validation image.
Download modules from internet
su -c 'tar xvf /path/to/modules.tgz ./'
Replace /path/to/modules.tgz with the location of your downloaded modules.tgz file.
The Fedora 12 rootfs needs some additional configuration to do things like access the network. This section outlines some of the additional configuration changes that need to be made.
Fedora 12 defaults to the "eth0" network interface, but the BeagleBoard-xM's network interface is called usb0.
The Fedora 12 root filesystem is set up by default to mount a NFS share as the root partition. This can be corrected by changing /etc/fstab. In the ROOTFS partition, open the "etc/fstab" (note there is NO prepending slash) and change the first line to read: