INIT: Cannot execute HELP!!!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

INIT: Cannot execute HELP!!!

Post 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?
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post 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.
nick8325
Member
Member
Posts: 200
Joined: Wed Oct 18, 2006 5:49 am

Post 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.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

The initrd is correct for the kernel that I am using. It is not custom...

chrooting? whats that? :oops:
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

It's not only shell scripts, it's executable files too.
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post 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.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

Thanks, but how do you get to the command line for this? This is all running in VMware...
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
nick8325
Member
Member
Posts: 200
Joined: Wed Oct 18, 2006 5:49 am

Post 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.
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

Hey....

I figured it out with help from a redhat admin book. I didn't have the right libraries......


Thanks!
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Post Reply