- backup your MBR (I like to stay safe, but this is not needed) with:
- Download a gparted or any live distro like knoppix or whatever
- Reinstall win
- boot from the live distro or in rescue mode from the installation cd
- mount the linux partition
mount /dev/sda1 /mnt/temp
- chroot to the root partition and type grub-install /dev/hdX. (when X is the drive letter).
not bad as it seemed as a first sight
The process described forward will install GRUB first stage boot loader to the MBR and present you with the same options you had before the Windows reinstall.
Note that this option has an added protection of not overwriting the partition table if it changed since the last MBR backup (this of course should not happen).
This is because the 512byte MBR sector is actually two parts:
- The first 446 bytes of the sector are the grub stage1 bootloader (or the windows bootloader after you’ve reinstalled windows and it overwriten grub).
- The last 64 bytes is where the partition table is stored.
You can, just to be on the safe side, change the bs=512 to bs=446 when using the first option. (you can figure out it should be 448 and not 446, but it really doesn’t matter since this area contains a constant that doesn’t change).
C U to the next problem