-   Red Hat (
-   -   why password in emergency mode? (

linuxguy99 02-14-2007 05:33 PM

why password in emergency mode?
Anybody know why am I prompted for the root password when booting into emergency mode? That doesn't happen in single user mode.


Lenard 02-14-2007 06:10 PM


linuxguy99 02-14-2007 07:06 PM

that just says how to get into emergency mode - not why I need the root password to get into emergency mode. I can get into emergency mode because I know the root password, but why doesn't single user mode ask me for it? I mean, if I have physical access to the box anyway, what difference does emergency mode make to have to ask for the root password?

Brian1 02-14-2007 08:23 PM

I never tried the option emergency before so I rebooted and see it ask for root's password just after kernel is loaded and before any runlevels are started. Only thing it mounts is the / partition and creates /proc. The / partition is mounted as read-only.

I don't see much of a benefit for it. I guess you can / as read-write and mount additional partitions needed. I don't see the need for it since I have like /usr and /home as seperate partitions. Not mounted in this mode. Why it would need root's password I am not sure unless you could hack the kernel at this point before the system is loaded. Once you type exit the system continues to load as if no stopping of the boot process was done.

How about asking the Redhat team and see what they say the usage of this mode. Post if you get an answer back.


Lenard 02-15-2007 07:21 AM

Did you not notice that the partitions are read-only and almost nothing is loaded?? This mode is only used when you have a major issue with the filesystems and/or the init process (even single user mode cannot start for example). This safeguards the data so one can transfer/backup the information, root's password is need so the coreutils can used.

linuxguy99 02-15-2007 10:53 AM

Yes, I know that emergency doesn't start init etc. and that you need to manually mount partitions, including /proc, and set / as rw if necessary, however, the point of the root password is really unknown as if I can boot emergency, I have to be physically at the box. So, I might as well even just boot into rescue mode off CD 1 and bypass emergency altogether and not be bothered with the root password. So, I can't see why it is asked for in emergency if I can just bypass it altogether using rescue where I can use the same utils.

linuxguy99 02-15-2007 04:11 PM

just to add to this, if you pass init=/bin/bash to the kernel on boot, you get the same effect as using "emergency" or "-b" but without the password prompt. Strange.

Brian1 02-18-2007 11:25 AM

Well spent some time searching and asking on a few other forums. No one knows why. Only thoughts is something about maybe security. I would the only ones that will know the answer is the Redhat Team. I am sure they have to know why they did it. If you get an answer please post back. The world outside of Redhat would like to know.


wmakowski 02-18-2007 02:18 PM

42! My best guess is they just want to make you more conscious of the fact that emergency mode is a little different than booting in single user mode. By entering the root passwd you acknowledge the fact that you really do know what you are doing. :)


All times are GMT -5. The time now is 06:10 PM.