Mark Allen Neil photo

Mark Allen

An online résumé, blog, biography and digital sandbox


Ubuntu Woes

Posted 2010-03-20 in Technology

In the last few months, I’ve updated Ubuntu a few times… always at the prompting of the Update Manager. Every time I’m left with a system which won’t boot… as Ubuntu 9.10 installs a beta version of GRUB2 which screws up my system every time I update. So today I’m working and the Update Manager is saying I should update… but first I’m going to post my “get well” information here in an article to minimize my downtime.

So what happens when I update Ubuntu? Somehow the GRUB2 boot information gets corrupted… and ends up deciding I boot from sdg1 instead of sdc1. The first time this happened, I posted my situation at the Ubuntu “Installation and Upgrade” forum and with the help of a kind soul named Kirby was able to resolve the boot issue. If at all interested in the entire thread, check out this link.

As this entry is as much a “cheat sheet” for my reference for the next time (i.e. in a few minutes when I let Ubuntu update itself), I’m just going to dive into the procedure.

  1. When booting Ubuntu (in my case, F12 and then boot from USB), instead of hitting enter to boot the topmost entry, type “E” to edit the entry.
  2. Arrow down to the line which has sdg1 and change it to sdc1. A bit of a pain as the edit cursor is invisible (really user friendly!). Hit Enter to reboot.
  3. When booted, bring up a terminal and enter the following commands:
sudo grub-mkdevicemap
sudo grub-mkconfig -o /boot/grub/grub.cfg

Ubuntu should now boot correctly. When I edit the entries in the GRUB boot screen, I see a few differences…

One, there is a “set root=(hd2, 1)” command… this is new (and correct). Two, instead of “/dev/sdg1” as the boot partition… there is now a long command employing a UUID… “root=UUID=xxxx…xxxx”. The UUID is obviously an indirection… but whatever, it works now.

And that’s it. Not a very interesting article, but this will come in handy every week or two. Wish someone would fix Ubuntu.

[EDIT] Well, I rebooted and Ubuntu didn’t screw me this time. Looks like if there are no kernel nor GRUB2 updates, I’m safe. Still, glad I’ve got this article as reference.

Website Credits | Symphony | Fluid 960 Grid System