On Wed Jul 18, 2007 at 10:22:07 +0900, Lin wrote:
Do you get a prompt when you add a 'init=/bin/sh' to the Linux kernel command line? What type of Red Hat are you using? Seeing this for the first time.
I don't get a prompt. I use "Fedora 7 (2.6.21-1.3194.fc7)" in "/dev/hda1". And the "/bin/sh" in it is GNU bash 3.2.9 (i686-redhat-linux-gnu). The kernel command line values and their massage logs are the following:
#####################################################################
(1) task "vmlinuz26" "earlyprintk=yes console=ttyLv0 mem=256MB root=/dev/hda1" ..... VFS: Mounted root (ext3 filesystem). modprobe: FATAL: Could not load /lib/modules/2.6.21-l4/modules.dep: No such file or directory
udevd[73]: init_uevent_netlink_sock: bind failed: No such file or directory udevd[73]: main: error initializing netlink socket Restarting system. l4lx | Terminating L4Linux. simplets| Exit D.02
(2) task "vmlinuz26" "earlyprintk=yes console=ttyLv0 mem=256MB init=/bin/sh root=/dev/hda1" ..... VFS: Mounted root (ext3 filesystem). Kernel panic - not syncing: Attempted to kill init! panic: going to sleep forever, bye l4lx | panic: going to sleep forever, bye
The shell is exiting for some reason. I'd guess because /dev is kind of empty. I cannot check this right now, maybe tomorrow.
####################################################################
What should I set to "init=" generally ? Without it, is the default init run automatically ? (but it looks make some errors in (1).)
Yes, if not setting it the default init will be started.
And, do programs such as "/bin/sh" which runs on Fedora run also on L4Linux ?
Yes, L4Linux is binary compatible with native Linux.
You should try a ramdisk first to make sure something works. You can get one of the L4Linux site.
Adam