[klibc] initramfs as an initrd replacement

Daniel Toussaint daniel at dmhome.net
Tue Oct 14 06:21:59 PDT 2003


Hi , 

One of the things I am working on requires me to have a kernel and an
initrd (as root filesystem , based on busybox) in one single image. I am
trying to use initramfs for this, but there are a few things that I just
can't figure out. 

As a test, I made a cpio archive of my own for the kernel source (plain
2.6.0-test5).  Everything gets unpacked just fine during boot. Somehow I
was expecting that there would be a way to have it execute its own
/sbin/init and stay in ramfs - but I do not know how to get this to
work. 
The best I could come up with was modifying /init/do_mounts.c to skip
over all the initrd loading stuff - then it worked. 
My question is, is there a  way to use an initramfs archive as a
rootfilesystem, without patching the kernel source? 

(Further more, depending on some conditions the system may or may not
have to pivot_root to an nfs or ide-disk based filesystem.) 

Thanks, 

Daniel 



More information about the klibc mailing list