[klibc] Query regarding initramfs

Rachita Kothiyal rachitako at in.ibm.com
Fri Feb 18 02:50:28 PST 2005





>     How should I go about it? Using pivot_root, chroot ...? Am  not very
> clear with these.

>> no, use "run-init", it is an utility program included in klibc.

In the run-init.c, I am passing my /newroot as the realroot.
It does a chdir(realroot) fine.
But, it fails in the check being done by the stat() and the kernel panics.
Following is the error message I get:

(null): Current directory on the same filesystem as root: Success
Kernel panic: Not Syncing: Attempted to kill init!

Both rst.st_dev and cst.st_dev have the value '1'. Does this mean they are
associated with the same device?
Can you please explain why I might be getting this error.
My initramfs.cpio.gz contains run-init.o(as init), /dev/hda1, /dev/console,
/newroot.
As of now my init(of initramfs) does'nt do anything. After it starts
executing, it tries mounting the real root so that the real init can
further be run on it. But it is failing in the first step itself(ie
mounting the realroot) as listed above.
I shall be very grateful if you can pls. tell me where I am going wrong.

Thanks
Rachita.



More information about the klibc mailing list