LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Edit grub.conf from grub shell (https://www.linuxquestions.org/questions/linux-newbie-8/edit-grub-conf-from-grub-shell-866717/)

noony123 03-06-2011 05:03 AM

Edit grub.conf from grub shell
 
Hi all.

Under grub.conf i commented out the last line that said initrd=....

Now when i reboot, it gaves me error of kernel panic. I am doing this for my self understanding and on vmware with centos 5. I just want to know, how can i edit the grub.conf file from grub shell ?

I know how to rescue my machine using live/rescue cd, i just want to know how to edit the grub file from grub shell.

Pls guide me

rizzy 03-06-2011 05:46 AM

you can't edit text files from grub shell. There is no text editor in grub to do it. Use live CD for that.The commands used in grub shell can be found here:
http://linux-sxs.org/administration/grub-cmd.html

bsat 03-07-2011 06:42 AM

I am not sure if this will work may be you can try it out.
You can pass the path to initrd on the command line and try it out. i.e.
when you reach the grub menu press e, move to the line having kernel
press e and at the end add initrd=/boot/initrd.img-"version".

This is just an idea, I have not tried this, may be some one can confirm if this will work.


All times are GMT -5. The time now is 01:48 AM.