LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-11-2011, 02:21 PM   #1
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Rep: Reputation: 14
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
 
Old 02-11-2011, 03:47 PM   #2
misconfiguration
Member
 
Registered: Apr 2007
Location: Indianapolis, Indiana
Distribution: RHEL, Fedora, AIX, HP-UX, FreeBSD, Slackware
Posts: 62

Rep: Reputation: 19
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
 
Old 02-14-2011, 04:05 AM   #3
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by misconfiguration View Post
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.
 
Old 02-14-2011, 08:13 AM   #4
misconfiguration
Member
 
Registered: Apr 2007
Location: Indianapolis, Indiana
Distribution: RHEL, Fedora, AIX, HP-UX, FreeBSD, Slackware
Posts: 62

Rep: Reputation: 19
Aside from booting into init 1; I have no clue what you're trying to accomplish, could you elaborate in detail?
 
Old 02-14-2011, 08:31 AM   #5
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by misconfiguration View Post
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
 
Old 02-14-2011, 08:35 AM   #6
misconfiguration
Member
 
Registered: Apr 2007
Location: Indianapolis, Indiana
Distribution: RHEL, Fedora, AIX, HP-UX, FreeBSD, Slackware
Posts: 62

Rep: Reputation: 19
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.
 
Old 02-14-2011, 09:29 AM   #7
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by misconfiguration View Post
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.
 
Old 02-18-2011, 05:46 AM   #8
mikey99
Member
 
Registered: Nov 2008
Location: UK
Distribution: RHEL, Fedora
Posts: 68

Rep: Reputation: 12
Quote:
Originally Posted by manyrootsofallevil View Post
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.
 
1 members found this post helpful.
Old 02-19-2011, 05:14 AM   #9
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by mikey99 View Post
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.
 
Old 07-08-2013, 05:12 PM   #10
ctowsley
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
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)

Last edited by ctowsley; 07-08-2013 at 05:17 PM.
 
Old 07-10-2013, 03:26 PM   #11
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
"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
 
Old 07-10-2013, 03:29 PM   #12
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
Just realized the post is more than 2 years old...
 
Old 07-10-2013, 06:46 PM   #13
ctowsley
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by mddesai View Post
Just realized the post is more than 2 years old...
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).

Last edited by ctowsley; 07-10-2013 at 06:48 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Emergency mode can mount the HDD with FS error but not in rescue or single user-mode kayod_jj Linux - Newbie 3 12-01-2010 07:03 PM
emergency ask for help on booting not from hard disk a_minor Linux - Newbie 2 01-01-2009 10:11 AM
why password in emergency mode? linuxguy99 Red Hat 8 02-18-2007 01:18 PM
EMERGENCY, error booting MDK9.2, even in failsafe DesertWolf0132 Linux - Newbie 3 07-21-2004 08:44 PM
RH9 - Rescue, single, and emergency mode? blackx Linux - Newbie 3 05-22-2003 02:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration