(Re)installing GRUB bootloader

Last modified on July 24, 2026 • 2 min read • 336 words
We had the following problem on the computer:2 hard drives (hda and hdb).hda contains the MBR (master boot record) and a Windows 2000 install on the first partition.
We had the following problem on the computer:2 hard drives (hda and hdb).hda contains the MBR (master boot record) and a Windows 2000 install on the first partition. hdb contains Linux (and its first partition is a boot partition that contains a GRUB installation as done by the RedHat 9 installer).In the BIOS you can only specify one hard drive into the boot priority sequence and that was hda (probably defined by it being the master on the first IDE chain). Therefore we had to start Linux from a boot floppy (because the floppy drive had boot priority over the hard drive). To get a functioning GRUB, we did the following:$/sbin/grub (starting grub shell)grub> root (hd1,0) (telling which one is the boot partition where grub got installed)Filesystem type is ext2fs, partition type 0x83 (tells us that it found the partition)grub> find (hd1,0)/grub/stage1(fd0)(hd0,0)(hd1,0)(hd1,1)(hd1,2)(hd1,5)(hd1,6) (this command is maybe not necessary, it apparently list all possible partitions on which the grub bootloader could be installedgrub> setup (hd0)Checking if "/boot/grub/stage1" exists… noChecking if "/grub/stage1" exists… yesChecking if "/grub/stage2" exists… yesChecking if "/grub/e2fs_stage1_5" exists… yesRunning "embed /grub/e2fs_stage1_5 (hd0)"… 16 sectors are embedded.succeededRunning "install /grub/stage1 d (hd0) (hd0)1+16 p (hd1,0)/grub/stage2 /grub/grub.conf"… succeededDone. (this installs the bootloader onto the first hard drive, apparently not into the first partition, maybe into the MBR?)grub> quit (exit the grub shell)emacs /boot/grub/grub.confNow you just have to edit the grub configuration file. Ours looks like this:grub.conf generated by anacondaNote that you do not have to rerun grub after making changes to this fileNOTICE: You have a /boot partition. This means that all kernel and initrd paths are relative to /boot/, eg.root (hd1,0)kernel /vmlinuz-version ro root=/dev/hdb3initrd /initrd-version.imgroot=/dev/hdb1 default=0 timeout=10 splashimage=(hd1,0)/grub/splash.xpm.gztitle Red Hat Linux (2.4.20-19.9)root (hd1,0)kernel /vmlinuz-2.4.20-19.9 ro root=LABEL=/ hdd=ide-scsiinitrd /initrd-2.4.20-19.9.imgtitle Red Hat Linux (2.4.20-18.9)root (hd1,0)kernel /vmlinuz-2.4.20-18.9 ro root=LABEL=/ hdd=ide-scsiinitrd /initrd-2.4.20-18.9.imgtitle Red Hat Linux (2.4.20-13.9)root (hd1,0)kernel /vmlinuz-2.4.20-13.9 ro root=LABEL=/ hdd=ide-scsiinitrd /initrd-2.4.20-13.9.imgtitle Red Hat Linux (2.4.20-9)root (hd1,0)kernel /vmlinuz-2.4.20-9 ro root=LABEL=/ hdd=ide-scsiinitrd /initrd-2.4.20-9.imgtitle Red Hat Linux (2.4.20-8)root (hd1,0)kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsiinitrd /initrd-2.4.20-8.imgtitle Windows 2000rootnoverify (hd0,0)chainloader +1title Floppyrootnoverify (fd0)chainloader +1title Rebootreboottitle Halthalt