(Re)installing GRUB bootloader
Last modified on July 24, 2026 • 2 min read • 336 wordsWe 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.
$/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