LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel panic+/etc/inittab recover problem (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-panic-etc-inittab-recover-problem-196376/)

sujith_marar 06-22-2004 10:07 AM

Kernel panic+/etc/inittab recover problem
 
Hi Linux friends,


Problem - Kernel+Grub +/etc/inittab
BootLoader -Grub
No of Oss-Dual
Red Hat Os 8.0
Win XP
I posted a query yesterday about this See this Thread
linuxquestions.org/questions/showthread.php?s=&threadid=195892[/url]

I desperately wanted to come back to text 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


I searched for my query at LinuxQuestions.org
Two similar incidents are being matched
--------------------------------------------------------------------------------------
See this thread
linuxquestions.org/questions/showthread.php?s=&threadid=194608&highlight=FetcFinittab[/url]
I tried this way as shown in the above thread

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-
-----------------------------------------------------------------------------------------
Tried the second thread-
linuxquestions.org/questions/showthread.php?s=&threadid=191372&highlight=FetcFinittab[/url]
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.

if you have set a password for grub then you need to press p and enter the password before you do what I said above.

(Action taken-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
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 change 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
PLEASE HELLLLLLLLLLLLLLLLLLLLP ME !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Waiting for response
Thanks
Sujit

adamwenner 07-15-2004 11:42 AM

im confused on why your line is saying

kernel /boot/vmlinuz-2.4.18-24.8.0 ro root=LABEL=/3

it should say

kernel /boot/vmlinuz-2.4.18-24.8.0 ro root=LABEL=/ 3

the space is key, this should solve your problem

what you did was by adding the 3 directly on the end of / and not putting a space was telling grub that your kernel should be located on a partition with a label of /3

this should not be, because you should not have a partition with a label of /3

sujith_marar 07-16-2004 09:40 AM

Thanks Adam I will work out that way and check the output and tell
It seems I have tried that before and it did not work out
I will work again and get back

ppuru 07-16-2004 09:51 AM

sujith

Have a go at these steps

Reboot
at the grub prompt, type e (if you have given a grub password, you have to start with p)
come to the kernel line and add the word single (leave a few spaces)

now you can boot into single user mode and /etc/inittab should be accessible.

An alternate route

Fetch your Distribution disks, boot from CD1
At boot:, type linux rescue

Follow the instructions very closely. It will instruct you that the original partitiions are under /mnt/sysimage.
At the # prompt, type chroot /mnt/sysimage
you now have the chance to edit your /etc/inittab.


All times are GMT -5. The time now is 08:03 AM.