LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Install grub on running system (https://www.linuxquestions.org/questions/linux-software-2/install-grub-on-running-system-229289/)

FiveFlat 09-11-2004 09:13 AM

Install grub on running system
 
I recently installed Fedora Core 1 on my system and it is a dual boot system with Windows XP. During installation I got a message that becuase of the DOS partition it found, it suggests I do not load grub (or lilo) and use a boot disk.
Well, now my boot disk (or floppy drive) is crapping the bed on me and I can only boot with it 1 out of every 20-30 tries.
I thought I could just make a boot "floppy" on CD - but that is causing me alot of trouble. How can I simply install grub if I never installed it in the first place?

Thanks in advance.

ppuru 09-11-2004 09:26 AM

If you want to wait for a successful floppy boot and boot into linux, you can login as root and run

grub-install /dev/hdx (the hard disk where you want to overwrite the mbr with grub e.g. hda or hdb ...)

You can also get into rescue mode using CD1 from the Fedora Distribution, type linux rescue.

Follow the instructions,

at the # prompt, type chroot /mnt/sysimage

now run

grub-install /dev/hdx

FiveFlat 09-11-2004 01:28 PM

Oh boy. Okay I did that, but now I boot to a grub prompt. How do I get the nice gui interface with the Linux/DOS option?
I couldn't figure out how to get either one booted and had to use the floppy again. whew - I got lucky again.

ppuru 09-11-2004 10:12 PM

When you are left at the grub> prompt, you can type

root (hd<tab>,<tab>)
kernel /vmlinuz<tab> root=/dev/hdxx ro
boot

This will boot you into linux. You are required to know the location of your /boot and / partitions. Of course using the TAB key will bring up options so you can pick up the right partition.

Here is a sample grub.conf

Code:

default=1
timeout=5
title Fedora Core 1
        root (hd0,5)
        kernel /vmlinuz ro root=/dev/hda9 hdd=ide-scsi rhgb vga=788
        initrd /initrd.img
title MicrosoftWindows
        rootnoverify (hd0,0)
        chainloader +1

(hd0,5) points to my /boot partition
/dev/hda9 points to my / partition


precision 10-12-2004 03:29 AM

Quote:

When you are left at the grub> prompt, you can type

root (hd<tab>,<tab> )
kernel /vmlinuz<tab> root=/dev/hdxx ro
boot

This will boot you into linux. You are required to know the location of your /boot and / partitions. Of course using the TAB key will bring up options so you can pick up the right partition.
Is there any way to automate this so that it immediately boots to linux without having to type the commands at the grub prompt?


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