LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-23-2004, 12:43 AM   #1
sujith_marar
LQ Newbie
 
Registered: Apr 2004
Posts: 12

Rep: Reputation: 0
Recover/edit of /etc/inittab from GRUB


How to recover/edit /etc/inittab From GRUB ( post #1)

Problem - How to Edit /etc/iniitab from Grub Bootloader
BootLoader -Grub
No of OSs-Dual
Red Hat Os 8.0
Win XP

I desperately need to come back to text mode from graphical mode by changing the runlevel mode from id:5 to id:3 in /etc/inittab as the only way of editing was through Grub (booting time) bootloader
Actions taken

if you're using grub, hit "e" at the grub screen to edit the boot commands. Then, ono the line that starts with "kernel", hit "e" again, and at the very end of the line type a "3" without the quotes. Then hit enter to accept changes, annd hit "b" to boot. This will get you into runlevel 3, which will not start x but will give you a command prompt.
Now, if you want to start in command prompt without editing grub like that, edit the file /etc/inittab and change the number 5 in the line that looks something like this...

id:5:initdefault:
change the 5 to a 3 and save it. now, after boot, you can get into x by typing:
startx
---------------------------------------------------------------------------------
When I did the above operation...............
MY GRUB BOOTLOADER shows this way

root hd(0,0)
kernel /boot/vmlinuz-2.4.18-24.8.0 ro root=LABEL=/3 (type 3 at the end of the line. Is it correct ?)
initrd /boot/initrd-2.4.18-24.8.0.img
then press boot 'b'

I get the display
'Kernel panic init not found Try option init= with kernel'
Tried various options
kernel /boot/vmlinuz-2.4.18-24.8.0 ro root=LABEL=/ 3(putting space in between)
kernel /boot/vmlinuz-2.4.18-24.8.0 ro root=LABEL=/init=3(without space)
kernel /boot/vmlinuz-2.4.18-24.8.0 ro root=LABEL=/init 3
kernel /boot/vmlinuz-2.4.18-24.8.0 ro root=LABEL=/ init=3

Same display error as above-
-----------------------------------------------------------------------------------------

Action Taken
I guess you use grub as the bootloader
on the screen of the boot press select the config you want to boot, type a
this will drop you on to a prompt. there put 3 or 5 at the end of the line.

(Press 'a' at GRUB Bootloader User Interface screen appeared)
grub append> ro root=LABEL=/3
Tried various options as above
Same kernel error
If I did not give '3' or blank
/etc/inittab showing Xserver error -since I made runlevel-5

/etc/rc.rd respawned -wait for 5 minutes
/etc/rc.rd respawned -wait for 5 minutes
/etc/rc.rd respawned -wait for 5 minutes
..............
How I can edit runlevel - 3 from GRUB(booting)
I see all files from GRUB through cat for ex: cat /etc/innitab
The only thing I wanted to edit runlevel id :5 to id:3
remmeber I cannot reach to the text mode at root prompt
THE OS is hanged at the initial booting. It is neither going here or there

Thanks
Sujit
 
Old 09-11-2004, 01:19 PM   #2
wallykid
LQ Newbie
 
Registered: Sep 2004
Posts: 1

Rep: Reputation: 0
sujith_marar, i believe you have to insert a space betwee the / and the number. I have tried it on redhat 9.0 . And i got the same error you got when i do not leave a space.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
edit inittab C_J Linux - Newbie 4 01-24-2005 11:33 AM
Kernel panic+/etc/inittab recover problem sujith_marar Linux - Newbie 3 07-16-2004 09:51 AM
How to recover/edit /etc/inittab From GRUB sujith_marar Linux - Newbie 3 06-25-2004 10:28 AM
Recover of /etc/inittab from GRUB Bootloader in RED HAT OS 8 sujith_marar Red Hat 1 06-23-2004 01:19 PM
trying to edit inittab, perission denied texasjailer Linux - Newbie 4 06-18-2004 08:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:56 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