(just to complete a doc i'm writing on trouble shooting and emergency booting, my final experiments when even booting to single user mode or run level 1 is not going to work.)
two even more minimal booting scenarios i've just tested are booting with the "emergency" word appended to the boot line, or "init=/bin/sh". so what's the difference? (and feel free to fill in the inevitable holes here.) emergency mode --------- ---- Section 9.4 of the RH 9 Customizaation discusses booting to emergency mode, by simply appending the word "emergency" to the kernel line at boot time. if you try this, you'll be prompted for the root password to actually go into maintenance mode, at which point, you have a single shell on VC 1. so what can you do here? first, "mount" shows (at least in my case) only two actual mounts (so this is a good scenario if the root filesystem is good, but some of your others are toast): # mount /dev/hda1 on / type ext3 (rw) /proc on /proc type proc (rw) and that's it. but if you try to see what's running with "ps", you get a complaint that /proc is not mounted, that you should make sure you have a line for /proc in /etc/fstab, and that you have to mount it manually with: # mount -t proc /proc /proc it's a bit odd that "mount" shows /proc is mounted, and i *do* have such a line in /etc/fstab (as we all do, i'm sure), but you still apparently have to mount it manually, so i do, at which point "ps" shows me: 1 init ... about a dozen more ... 15 bash 55 ps so in emergency mode, "init" was started, and i have the single shell i can work at. fair enough. in this mode, i can manually mount any of my additional filesystems, but oddly, they don't show up as being mounted with "mount" or "cat /etc/mtab". however, they *are* listed in /proc/mounts. go figure. oddities with the docs -------- ---- --- ---- the Cust Guide claims that emergency mode is useful in that init files are not loaded, and it can be used if init is corrupted or not working. that's a bit odd, since init was definitely started for me here, and i'm not about to trash /sbin/init to see what happens. anyone know if emergency mode can handle a damaged /sbin/init? also, section 9.4 claims that the root filesystem is mounted read-only, but that wasn't true in my case. anyone care to clarify either of these points? init=/bin/sh mode ------------ ---- an even more minimal boot scenario is to boot by appending "init=/bin/sh", good if you've really trashed your /sbin/init program, since this tells the kernel to start a shell instead of the normal init program. the differences here from emergency mode are that you don't get prompted for the root password -- you just get dumped into superuser maintenance mode. you get all the same weirdnesses as with emergency mode, as in having to mount /proc and so on. but once you do, running "ps" shows: 1 sh ... 14 kjournald 47 ps which just verifies that, yes indeed, "sh" was invoked as process 1 instead of init, as one would expect. at that point, this looks very much like emergency mode, at least superficially. rescue mode ------ ---- both of the above still require a working root filesystem, at the very least. if you don't even have *that*, you're pretty much forced to boot from, say, the CD-ROM in rescue mode, and fix things from there. so, as i read it, in order of getting more desperate and needing a more minimal configuration to get your system running, * single-user/run level 1 * "emergency" mode * "init=/bin/sh" * rescue mode off of the CD any clarifications anyone wants to add? rday p.s. i didn't get into using root/boot floppies or other stuff like that, which would give you even more options. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list