I’ve got a nice GRUB dual-boot going on my laptop with multiple partitions and Ubuntu and Windows 7. Like it or not, I tend to use Windows 7 more, being an iPhone and vSphere user which gives me know option.
Trouble struck when I had to reinstall Windows 7 and it ruined my boot partition. I Googled around and found several manual solutions, until I discovered that this problem seems so common that someone has a tool to fix it immediately – Boot-Repair. Totally automatic, it scans all partitions and rebuilds GRUB automatically. It worked first time, so I didn’t even bother to work out how it did it.
Here’s the quick-and-dirty:
# sudo add-apt-repository ppa:yannubuntu/boot-repair # sudo apt-get update && sudo apt-get install -y boot-repair && boot-repair
After Boot-Repair finishes, reboot. The GRUB menu should magically reappear, just as it was.
Matt Parsons is a freelance Linux specialist who has designed, built and supported Unix and Linux systems in the finance, telecommunications and media industries.
He lives and works in London.