LFS bootable CD [was re: [CLUE-Cert] Next meeting]

David Anselmi anselmi at americanisp.net
Wed Oct 23 12:21:26 MDT 2002

Lynn Danielson wrote:
> Dennis wrote:
>>I've been working on a bootable CD. Hopefully, I will have it working
>>later tonight.  There are a few missing things in the hint.
> Very cool.  I've been reading the "Bootable LFS CD Using LILO" hint
> printout that you gave me and you're right there are a few things
> missing, but my biggest problem was that it requires starting with
> an lfs system to build the cd system from.  One of the things that
> bugged me in the linuxrc script was the pivot_root call.

pivot_root is a system call that changes the root directory on a running 
system.  Debian uses it like this.  When you boot, the kernel is told to 
use an initial ramdisk so it loads the disk image into memory (a 
ramdisk) and mounts that as /.  The ramdisk doesn't have much on it, but 
it does have kernel modules like the ext2 driver you need to mount your 
hard disk.  Once the appropriate modules are loaded, the kernel mounts a 
hard disk partition and does a pivot_root.  Now it is in (essentially) 
the same condition it would have been if ext2 had been compiled in and 
the hard disk mounted in the first place.

pivot_root(8), pivot_root(2), initrd(4), and initrd.txt in the kernel 
docs have more info.  I read them extensively trying to figure out how 
to get Debian to mount / as ext3 and they weren't much help (turned out 
to be a module ordering problem).

I don't remember how LFS uses pivot_root.  The effort to make a bootable 
CD didn't seem interesting and was towards the end of my time on the LFS 


More information about the clue-cert mailing list