Tim wrote:
Ian Malone:
Press e to edit the selected boot commands and add '3' to the
end of the line that boots the kernel. Not entirely sure where
this is documented, but a useful piece of knowledge (especially
if you've forgotten the root password for a machine).
Actually it's runlevel 1 you'd want, for that purpose.
The second person to point this out. I meant the pass-runlevel
to the kernel trick. If 3 gets you to runlevel 3 then it doesn't
take a lot of thought to figure out how to get to 1.
Adding a runlevel option to the kernel line isn't a GRUB thing, it's
kernel thing. That's documented in the appropriate place, too.
Altogether, they're documented in numerous places on the WWW, if you
find the right keywords to search for.
This is the key thing, it's difficult to find them unless
you already know what to look for.
<http://tldp.org/HOWTO/BootPrompt-HOWTO-2.html#ss2.6>
"Any remaining arguments that were not picked up by the kernel
and were not interpreted as environment variables are then passed
onto process one, which is usually the init program... Check the
manual page for the version of init installed on your system to
see what arguments it accepts."
(Took me a while to find this one, it will also be documented
in the kernel source tree, which I'm sure everyone has installed.)
man init will then show you that a single digit can be used to
specify the runlevel.
From one point of view this is fine because it's rather obscure
stuff, from another the first time many people meet this they
will have somehow broken their system and have no idea they
should be doing it, let alone how to go about it. Though I
don't think it matters that much; while it's possible to fix
a Linux system from states very close to death most users would
probably be happier with a rescue disk.
--
imalone