31 August 2010

Windows overwrote GRUB, and how to fix it

I don't use Windows much, and when I did, Windows 7 wanted to update a billion things (since I haven't used it for months).  Fine, but why does it have to brick my computer?  It overwrote GRUB on the MBR, so now it won't show the menu for picking which OS you want to start up in.  Now I can't boot up in Windows 7 or in Ubuntu 10.04.  How to fix it now?

The basic strategy is to boot up Ubuntu on an external disk, run some simple simple simple command line commands, and it's fixed.

The trouble is that it's my Dell Mini 10 netbook, and I don't have a DVD drive to boot from.  This means the first step is to build a bootable flash drive, and then fix GRUB.  Here's how: