[klibc] Query on Initramfs' and Initrd's coexistence

Rachita Kothiyal rachitako at in.ibm.com
Wed Apr 6 03:46:28 PDT 2005


I am trying to have a built in initramfs along with the traditional initrd.
So I mount the initrd from the initramfs, but am facing problems in trying
to run the 'linuxrc'.

Following are the issues:

1. I mount the initrd from the initramfs and exceve 'linuxrc'.
   It starts executing linuxrc, but gives the following errors and panics:

Red hat nash version 3.4.42 starting
Loading jbd.o modules
insmod: QM_MODULES

ERROR: /bin/insmod exited abnormally!
Loading ext3.o module
insmod: QM_MODULES:

ERROR: /bin/insmod exited abnormally!
Mounting /proc filesystem
Creating block devices
failed to create /dev/hda
failed to create /dev/hda1
failed to create /dev/hda2
Creating root device
mkrootdev: mknod failed: 30
Mounting root filesystem
mount: error 2 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Kernel panic - not syscing: Attempted to kill init!

2. This issue is irrespective of issue 1. I was wondering how I would be
spawning the real init after the real_root_dev has been mounted....
In the normal booting case(i.e. without initramfs) prepare_namespace()
returns and /sbin/init is executed
in init/main.c:init(). But, in the initramfs case, since prepare_namespace
is not called, this needs to be done in my init application on initramfs.
Klibc does not support threads. Am i right here? So when I 'exec' linuxrc
after mounting initrd, it will never return to the calling function, and
all that linuxrc does is to pivot_root to the real_root_dev. How do I
execute the real init in this case?

Please tell me if I am missing something.


More information about the klibc mailing list