Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-10-2011, 03:49 AM   #1
Registered: Feb 2006
Posts: 38

Rep: Reputation: 15
/etc/inittab - accidentally changed runlevel to 0 (halt)

How do I recover from accidentally set the runlevel to 0?
Old 05-10-2011, 03:54 AM   #2
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
I wonder how something like that can happen accidentally.
But anyways, either boot from a live CD and change the setting back after mounting your /-partition, or change it back after booting to a runlevel given as kernel command in your bootloader (this will override that setting for one boot).
Old 05-10-2011, 03:56 AM   #3
Senior Member
Registered: Apr 2007
Location: bbsr,orissa,India
Posts: 1,363

Rep: Reputation: 135Reputation: 135
Originally Posted by fjkum View Post
How do I recover from accidentally set the runlevel to 0?
Boot from CD/DVD, enter into rescue mode, mount the / in rw mode, and edit the file.
Old 05-10-2011, 10:07 AM   #4
LQ Newbie
Registered: Oct 2010
Distribution: CentOS 5.5
Posts: 23

Rep: Reputation: 2
edit the boot line parameter to enter the any run level and edit the /etc/inittab file
Old 05-11-2011, 12:11 AM   #5
Registered: Feb 2006
Posts: 38

Original Poster
Rep: Reputation: 15
coolsreejith, how do I do that from the GRUB prompt to boot at any run level?
Old 05-11-2011, 05:39 AM   #6
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Edit the line of the kernel you are loading. Enter the numeric run level ( 2 or 3 depending on distro / or 1 for rescue mode) at the end of the line. Make sure to leave a space after the last character and your number.

Once booted you can edit the config file like everyone recommends.

Good luck.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to troubleshooting Runlevel & inittab on slackware12 mithridates Slackware 4 08-09-2007 03:19 PM
Accidentally put init 6 in inittab file sugoicarl Linux - Newbie 3 10-01-2006 12:23 PM
changed root's shell accidentally frankie_DJ Linux - Newbie 7 09-20-2004 12:28 AM
changed default runlevel from 3 to 4 in inittab- now I'm stuck in a loop Earl Parker II Linux - Newbie 15 07-12-2004 09:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:30 PM.

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