LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-10-2011, 02:49 AM   #1
fjkum
Member
 
Registered: Feb 2006
Posts: 40

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, 02:54 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 02:56 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
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, 09:07 AM   #4
coolsreejith
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-10-2011, 11:11 PM   #5
fjkum
Member
 
Registered: Feb 2006
Posts: 40

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

Rep: Reputation: 106Reputation: 106
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.
 
  


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
how to troubleshooting Runlevel & inittab on slackware12 mithridates Slackware 4 08-09-2007 02:19 PM
Accidentally put init 6 in inittab file sugoicarl Linux - Newbie 3 10-01-2006 11:23 AM
changed root's shell accidentally frankie_DJ Linux - Newbie 7 09-19-2004 11:28 PM
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 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:36 PM.

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