Page 1 of 1
INIT: Cannot execute HELP!!!
Posted: Fri Jun 01, 2007 7:52 pm
by piranha
I am booting a linux kernel from a CD, it has an initrd...
when it loads INIT it goes to runlevel 1, which should execute /etc/init.d/boot but it says "Cannot execute /etc/init.d/boot"
I don't understand it, because the file is there...
Help?
Posted: Sat Jun 02, 2007 4:58 am
by jnc100
Is this in relation to the custom initrd you were asking about earlier?
If so, is your /etc/init.d/boot a script that requires a particular shell to interpret which you haven't included? Does that shell require dynamic libraries you haven't included?
Regards,
John.
Posted: Sat Jun 02, 2007 10:51 am
by nick8325
Have you tried chrooting into a directory containing the contents of the initrd and running /etc/init.d/boot? Perhaps that will give a clue.
Posted: Sat Jun 02, 2007 6:50 pm
by piranha
The initrd is correct for the kernel that I am using. It is not custom...
chrooting? whats that?
Posted: Sat Jun 02, 2007 7:06 pm
by piranha
It's not only shell scripts, it's executable files too.
Posted: Sun Jun 03, 2007 3:22 am
by jnc100
piranha wrote:chrooting? whats that?
Code: Select all
mkdir /mnt/initrd
mount -t auto -o loop initrd /mnt/initrd
chroot /mnt/initrd
/etc/init.d/boot
chroot changes the root directory of the system, so if you chroot to the ramdisk you have a filesystem that only contains the contents of the ramdisk. Then, you can try running the code which won't work yourself and see what the error is.
Use 'exit' to leave the chroot'd directory.
Note that you need a shell within the ramdisk for this to work, otherwise try:
Code: Select all
chroot /mnt/initrd /etc/init.d/boot
Regards,
John.
Posted: Sun Jun 03, 2007 11:52 am
by piranha
Thanks, but how do you get to the command line for this? This is all running in VMware...
Posted: Sun Jun 03, 2007 11:57 am
by nick8325
Try to run the commands jnc100 posted from an existing Linux system, not the CD. (Are you running VMware on Linux?) Chrooting will make the kernel pretend that your initrd is the root file system.
Posted: Mon Jun 04, 2007 5:44 pm
by piranha
Hey....
I figured it out with help from a redhat admin book. I didn't have the right libraries......
Thanks!