LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Booting into Emergency mode (https://www.linuxquestions.org/questions/red-hat-31/booting-into-emergency-mode-862104/)

manyrootsofallevil 02-11-2011 02:21 PM

Booting into Emergency mode
 
I'm trying to boot into emergency mode but i'm having no joy.

I can boot to single user mode (by adding s or single at the end of the kernel line in grub) and I can also boot to init=/bin/sh mode by using the same method, but emergency is not working.

Any ideas?

I'm using RHEL6 x64

I don't actually have a real problem, I'm just running through some training.

TIA

misconfiguration 02-11-2011 03:47 PM

Put in a RHEL installation disk, boot from the CD-ROM - at the boot: prompt don't hit enter.

Type:
Quote:

# linux rescue
And hit enter - this will bring you into rescue mode and allow you to chroot into the *real* OS. Normally with the following command.

Quote:

chroot /mnt/sysimage

manyrootsofallevil 02-14-2011 04:05 AM

Quote:

Originally Posted by misconfiguration (Post 4255513)
Put in a RHEL installation disk, boot from the CD-ROM - at the boot: prompt don't hit enter.

Type:


And hit enter - this will bring you into rescue mode and allow you to chroot into the *real* OS. Normally with the following command.

that's fine, but it's not what I was looking for.

misconfiguration 02-14-2011 08:13 AM

Aside from booting into init 1; I have no clue what you're trying to accomplish, could you elaborate in detail?

manyrootsofallevil 02-14-2011 08:31 AM

Quote:

Originally Posted by misconfiguration (Post 4257896)
Aside from booting into init 1; I have no clue what you're trying to accomplish, could you elaborate in detail?

See this http://www.redhat.com/archives/redha.../msg02019.html or this http://www.linuxtopia.org/online_boo...escuemode.html (end of document)

TIA

misconfiguration 02-14-2011 08:35 AM

Quote:

1.
At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu.
2.
Select Red Hat Enterprise Linux with the version of the kernel that you wish to boot and type a to append the line.
3.
Go to the end of the line and type single as a separate word (press the Spacebar and then type emergency). Press Enter to exit edit mode.

That's what it sounds like to me.

manyrootsofallevil 02-14-2011 09:29 AM

Quote:

Originally Posted by misconfiguration (Post 4257910)
That's what it sounds like to me.

that is what I did, yet it did(does) not work.

If I append single or s, it boots in single user mode
If I append init=/bin/sh, it boots in bin/sh mode (not sure what it is called)
if I append emergency, RHEL boots up normally.

I've probably misspelt emergency or something.

mikey99 02-18-2011 05:46 AM

Quote:

Originally Posted by manyrootsofallevil (Post 4255463)
I'm trying to boot into emergency mode but i'm having no joy.

I'm using RHEL6 x64

RHEL6 does not have emergency mode anymore. It has been dropped.

On RHEL5, emergency just started init, and a shell, but did not process rc.sysinit.

To get the same effect, use init=/bin/bash.

manyrootsofallevil 02-19-2011 05:14 AM

Quote:

Originally Posted by mikey99 (Post 4262581)
RHEL6 does not have emergency mode anymore. It has been dropped.

On RHEL5, emergency just started init, and a shell, but did not process rc.sysinit.

To get the same effect, use init=/bin/bash.

Thanks

I guess, RH have not updated the documentation yet.

ctowsley 07-08-2013 05:12 PM

RHEL6 DOES have emergency mode
 
Rhel6 emergency mode is still a thing. while the init=/bin/bash access method is very much the same, the emergency kernel argument is fully operational. in RHEL6.1 there was a bug that broke that functionality, but in rhel 6.2 and above, it's back up and functioning. Also remember that you can init into any shell loaded on the system in the event that bash is broken or lost.

(to read the documentation, visit http://red.ht/14EnInm)

Madhu Desai 07-10-2013 03:26 PM

"In emergency mode, you are booted into the most minimal environment possible. The root file system is mounted read-only and almost nothing is set up. The main advantage of emergency mode over single-user mode is that the init files are not loaded. If init is corrupted or not working, you can still mount file systems to recover data that could be lost during a re-installation.
To boot into emergency mode, use the same method as described for single-user mode in Section 36.1.3, “Booting into Single-User Mode” with one exception, replace the keyword single with the keyword emergency.
"

In RHEL v6, this can be achieved by booting in from RHEL install DVD
  1. Boot from RHEL install DVD
  2. Select 'Rescue Installed System'
  3. Select 'Local CD/DVD'
  4. Select 'Network interface'# exit
  5. Select read only or read write
  6. Start shell

At this point, either you can mount any partition/filesystem for backup, or you can change root(/) by giving chroot command
Code:

# chroot /mnt/sysimage
To return to previous root(/)
Code:

# exit

Madhu Desai 07-10-2013 03:29 PM

Just realized the post is more than 2 years old...:cry:

ctowsley 07-10-2013 06:46 PM

Quote:

Originally Posted by mddesai (Post 4987950)
Just realized the post is more than 2 years old...:cry:

I only posted because the information above is wrong lol. And technically what you're suggesting is Rescue Mode. To reach Emergency Mode without using the Anaconda installer via an installation media (disk, iso, PXE boot) you can just add the kernel argument "emergency" in RHEL 6.2 or higher, or any version of RHEL5 or below. There was a bug that broke that functionality in 6.0 and 6.1. In those versions, it would be necessary to add the kernel argument init=/bin/bash (or any other shell installed on the system such as CSH [which comes packaged on most RHEL systems], KSH or ZSH).


All times are GMT -5. The time now is 09:43 AM.