March 25, 2019

GRUB vs. the Inodes: Who Needs a Bootable System, Anyway? - page 3

Computers: The Fun Never Ends

  • May 1, 2008
  • By Carla Schroder
Suppose your multi-boot box has a horked GRUB bootloader because of this. No problem, as long as you have a bootable rescue disk or USB stick. Most any Linux LiveCD should work: a Knoppix CD, SystemRescueCD, and your installation disks may have a rescue function. Use it to restore the GRUB bootfiles to a partition that you know GRUB can boot. Boot up your rescue medium and run these commands:
# grub
Probing devices to guess BIOS drives. This may take a long time.
[various ignorable messages]
grub> find /boot/grub/stage1
grub> root (hd0,1)
Filesystem type is ext2fs, partition type 0x83 grub> setup (hd0) Checking if "/boot/grub/stage1" exists...yes Checking if "/boot/grub/stage2" exists...yes Checking if "/boot/grub/e2fs_stage1_5" exists...yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,1)/boot/grub/stage2 /boot/grub/menu.lst"...succeeded Done. grub> quit

Reboot, and your familiar GRUB menu will greet you.


Carla Schroder is the author of the Linux Cookbook and the newly-released Linux Networking Cookbook, and is a regular contributor to LinuxPlanet.

Most Popular LinuxPlanet Stories