Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38890 - the boot process created by genkernel does not seem to allow a way to boot into single user
Summary: the boot process created by genkernel does not seem to allow a way to boot in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All All
: High enhancement
Assignee: Brad House
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-20 22:04 UTC by Andy Wang
Modified: 2004-02-07 07:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Wang 2004-01-20 22:04:17 UTC
Prior to genkernel 3.0.1_betaX i was able to add "single" to the kernel arguments to force booting into single user mode.  This is a pretty significant feature for sysadmins that nearly all Unix systems support (some way to boot into single user mode).  With the new genkernel I can't seem to find a way to do this.  I think the scripts need to take this into account and send it to init when the real root is used.
Comment 1 Brad House 2004-01-29 19:23:14 UTC
do you know how the previous one did this?  in what way to do pass
it to init ?
Comment 2 Andy Wang 2004-01-29 22:54:00 UTC
The normal way initrd works without pivot_root is that /linuxrc is executing on
the ramdisk.  After this is finished, the Linux kernel automatically executes
/sbin/init with the appropriate kernel arguments passed to it. It uses the 
root=/dev/xxx parameter to determine where to execute /sbin/init. (code to see
what happens is all located in [kernel-source-dir]/init/main.c.  genkernel's
/linuxrc  explicitly calls exec /sbin/init (with no arguments).  This is 
bypassing the kernel automatically executing /sbin/init.  With pivot_root it's 
a bit harder to let the kernel automatically load /sbin/init [arguments] 
because root= isn't set to the real root, but perhaps genkernel's linuxrc 
should parse out arguments to send to init and pass them in manually.

The algorithm that the linux kernel uses is parse_options(char) in init/main.c.
Comment 3 Andy Wang 2004-01-29 22:56:17 UTC
Oh yeah, I'm actually relatively busy right now with work and don't have timeto much with genkernel, but if I find some free time I'll submit a patch against
linuxrc which should parse out arguments to send to init.
Comment 4 Brad House 2004-02-07 07:31:39 UTC
ok, I'm passing the results of `cat /proc/cmdline` to /sbin/init now
hopefully that will provide what you're looking for.
this is in _beta10