Technology weblog

IT-Essence
Sunday May 27, 2007

Restoring boot loader after windows installation

If you install Windows on a computer that has Linux and the (Grub) bootloader already installed, you will see that the Linux bootloader has been overwritten during the Windows installation process. To recover, do:

  • Boot from your favourite Linux rescue CD / Knoppix distribution/ Other Linux live CD
  • If you forgot your harddisk lay-out, do fdisk /dev/hda and do 'p', to print the partition table. Exit with 'q'. 
Suppose the boot partition to be on /dev/hda6 and the root on /dev/hda7. Of course, your /boot may be located on your root partition too, in which case you just leave out the associated steps below.
  • Create a mountpoint, let's say mkdir /mnt/root.
  • Mount your partition: mount /dev/hda6 /mnt/root.
  • Change root chroot /mnt/root. If you have /boot on a separate partition, do mount /dev/hda7 /boot
  • Do grub-install /dev/hda
That should be all!

Comments:

Post a Comment:
Comments are closed for this entry.

Hire us
Archives
Tags
Links
Stats
Referrers