LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to configure grub from a live CD (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-configure-grub-from-a-live-cd-693444/)

truth believer 12-28-2008 09:29 AM

how to configure grub from a live CD
 
I have installed ubuntu 8.10 and grub is installed in MBR. I could run both ubuntu and windows after that, but I changed grub configuration from ubuntu.

because I wanted the other people on my family who use this computer to be easily able to go directly into windows, I changed the default os to windows and I wanted to set the delay time before loading the default os to the least possible, so I made that 0.

after that I can't boot into ubuntu. I thought it's possible to override the default by pressing a key before it comes to load grub, so, that key be pressed while grub is loaded and grub gets it, so I can load ubuntu. what can I do? from a live CD or anything else. Thanks.

mk27 12-28-2008 09:48 AM

Quote:

Originally Posted by truth believer (Post 3389415)
I changed the default os to windows and I wanted to set the delay time before loading the default os to the least possible, so I made that 0.

The point of the "delay time", strangely enough, is to allow you to choose something from the grub menu. While the delay counts (it says something like "GRUB: booting default windows in 3 seconds) you can hit any key to get the menu. Or you can remove "hidden menu" and you will actually see the menu for three seconds.

But if the delay is 0 you can't.

amani 12-28-2008 10:40 AM

reinstall grub from the Ubuntu Cd

or simply boot a live cd and edit /boot/grub/menu.lst as per above post (set delay to 30 secs )

truth believer 12-28-2008 11:34 AM

I went through live CD and I changed menu.lst but it didn't work. I know if I changed menu.lst it must work because grub reads from it.

I changed timeout (delay time) to 10 and made the line that was saying (something about) "hiddenmenu" commented , to get not executed. Stranger than ever is that menu.lst contained no entry for windows.

It had some entries to open linux on first partition of the first hard drive, which is windows not ubuntu. I made some changes to have it point to linux drive either. I'm not sure if I was correct or not, but at least grub should show the menu, then let me choose of the wrong entries.

please tell me how to reinstall grub from ubuntu CD or to have it prepare some entries for itself, like it did when ubuntu was being installed.

CJS 12-28-2008 11:39 AM

If you open /boot/grub/menu.lst while using a Live CD, and depending on the Live CD you are using, that file either won't exist or it will be the menu.lst for the Live CD, not your Ubuntu on your HDD. Are you sure you edited the menu.lst in your Ubuntu install? How about doing:
Code:

sudo fdisk -l
And find which is your Ubuntu partition in the form sdaX (like sda5 for example), and then do:
Code:

sudo mount /dev/sdaX /mnt
gksudo gedit /mnt/boot/grub/menu.lst

But replace sdaX with the Ubuntu partition. Then you should get your Ubuntu menu.lst. How about giving that a shot and let me know how it goes.

truth believer 12-28-2008 01:04 PM

It worked. Thank you very much.

CJS 12-28-2008 01:17 PM

You're welcome, glad that did the trick. Cheers and have fun with Ubuntu. :)


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