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:
First, don't do this from a Mac — I've tried, but as per my experience last time, when I first installed Ubuntu to dual-boot the new netbook, Macs just won't do the job. I even tried different flash drives, SD cards, and even my iPod, and it just won't do.
So my recommendation is to find yourself a Windows computer and then do the following:
- Download Ubuntu UNR (version 10.04 currently)
- Download UNetbootin
- Use UNetbootin to write the Ubuntu UNR iso image to the flash drive or SD card (I used an SD card since the Dell Mini has a card slot)
Assuming you're running Ubuntu Linux 10.04 UNR and it was up-to-date with the latest upgrades, then you should have Grub2 installed. If you don't have Grub2, go read the complicated instructions instead. But if you do have Grub2 because you've kept your Ubuntu install up-to-date, then just do the following:
- mount the partition on which you installed Ubuntu. You can do this by double clicking on the appropriate partition from, eg, Nautilus.
- open a terminal
- in terminal, do
mount | tail -1(note that's a "dash one"). You should see something like this:
/dev/sda2 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)
Note down the
/dev/sdapart (the number doesn't matter). Note also the
- in terminal again, do
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda
(Note that it's
/dev/sdawithout the number, but of course substitute
/dev/sdawith whatever you noted from the previous step.)
It should print this out if things went fine:
Installation finished. No error reported.
- If things went fine, then restart the computer and all is fixed! If things didn't go fine, I suggest you see the complicated instructions instead in case your computer is too old or whatever.
Of course, for me, after I fixed it, I booted into Windows to install some software only to find later that Windows overwrote grub AGAIN! And I had to do the above instructions again...