GRUB Re-Install after Windows

Fix for the various instances in which the GRUB boot loader on a multi-boot system gets trashed, by way of example but not by way of limitation, when installing Windows. A different process that inspired these steps I found here Being a basic old, grouchy, lazy IT guy, I did it this way instead. Notes below.

  1. Boot from the Memory Stick into MINT, Ubuntu, or whatever
  2. Open terminal
  3. sudo passwd root
  4. set the root password to x
  5. su –
  6. note there is a dash after the su: it matters
  7. you could also do an sudo in front of each and every command. See my comment below about me being an ill-tempered lazy old IT guy. I just shell to root and forget the sudo. Yes I know that is so old-skool and it is all mocho to type “sudo” over and over again now days. See my comment about my nature on that one too.
  8. enter the password, x
  9. fdisk -l (that is a lower case elle, L, not an eye, I)
  10. read the list  and note the linux partition, in the graphic below it is /dev/sda4
  11. mount /dev/sd?? /mnt
  12. where /dev/sd?? in the graphic below /dev/sda4, because that is the Linux partition: note it is /dev/sda4, not /dev/sda
  13. grub-install –root-directory=/mnt/ /dev/sd?
  14. where /dev/sd? here would be /dev/sda because /dev/sda is the drive which contains the Linux partition. note it is /dev/sda, not /dev/sda4.

Then reboot. GRUB boot loader should be re-installed. Click the graphic below to see a terminal session in which I did this.


If one is configuring a workstation initially of course one merely installs the Windows FIRST, then the Linux, because the Linux is smart enough to recognize other operating systems and does the right thing. Also, when I upgraded to Windows 10  on several workstations it went flawlessly, not touching the boot loader: Windows 10 upgrade did the right thing.

However sometimes the Windows partition on a computer in the lab gets trashed and can’t be repaired so the best solution is to re-install Windows 7, which does replace the bool loader with the Windows boot loader, which does not detect non-Microsoft operating systems. So what is to be done?

The simplest way to re-install a broken Windows partition is to boot from the Windows install disk and install Windows in the same partition where it previously was, without touching the other partitions. Let Windows up date itself however many days it must (two on average) doing its many re-boots. After it all settles down, boot to Linux from a Live CD or USB Memory Stick and follow the above steps to get back to a multi-boot configuration.

Comments are closed