[ale] Custom Distribution

Christopher Fowler cfowler at outpostsentinel.com
Thu Mar 6 17:37:54 EST 2008


Do not start with packaging for a custom distribution.  

#1.  Download a kernel from ftp.kernel.org
     Try 2.6.22

#2.  Compile that kernel with the drivers specific to the
     target hardware

#3.  Download BusyBox and create your initrd

#4.  Use the same BusyBox to create your root.


It may take half a day  to a day to get it right but you will be pleased
with the results.  You can make this thing work on a production line.  

Insert CD
Boot
Automatic programs take over
Remove CD 
Done

You can even add tools to stress test the hardware

On my CD I have a kernel, initrd.img, and root.img
root.img is a cramfs image.  The initrd mounts that file
as a loopback device.

In the root.img, init start /etc/init.d/rcS which is a simple
script which does things like mount a rw partition onto /mnt/rw.
Te reason is that some portions like /tmp should be rw.  On the cramfs
image /tmp is a symbolic link into /mnt/rw/tmp.  So tmp is not valid
until:

mount -t tmpfs none /mnt/rw
mkdir /mnt/rw/tmp

Many files including resolv.conf are symlinked into the rw file system
so that they can be written to.

I did the cramfs + rw system until I learned about unionfs.  Now my
initrd.img loads the cramfs and tmpfs and creates a / of unionfs out of
it.  The best part is that unionfs takes care of ro vs rw issues.  No
more symlinks!










More information about the Ale mailing list