Ubuntu install, GRUB rescue error

Xubuntu_screen

Obviously this picture is taken after the grub is rescued.

The subject line will make sense for those who desperately need this post.  I apologize to my normal friends for a line that looks like sheer insane babble. But such is life for us who dabble in the wild world of Linux, the free and rapidly mutating operating system for personal computers.

The version of Ubuntu that is realeased today is 9.10 (year 2009, month 10), nickname Karmic Koala.  I used the 9.10 RC (release candidate) that was available for download some time before release day.  It is stable and contains pretty much the same as the final version, with only a few downloads to bring it up to date after.  If you get it to run in the first place, that is.  I did not, at first.

It looked easy enough.  I booted from the live cd and chose install.  I answered some questions about localization and such, and then accepted its proposal to share the machine between Vista (which was installed on this laptop already) and Xubuntu (Ubuntu with a faster, smaller user interface).   It worked for a long time partitioning the disk, setting up the new and improved file system, ext4.  It is said to be faster and more secure than ext3, which is itself pretty good. Anyway, I wrongly suspected ext4 when things went bad. This happened when I rebooted the machine after the install.  Linux is much less hungry for reboots than Windows, but after a brand new install you still have to do it.  I did, and the operating system did not start. Actually, neither Xubuntu nor Vista.  Instead I got a black screen with the text

GRUB rescue>

I booted with the live CD, which lets you run Linux anyway but is fairly slow since it runs off a CD rather than a hard disk.  Still, I got online and could Google for  GRUB Rescue, GRUB install etc.  (GRUB is the programs that runs as soon as the machine starts waking up. It lets you choose which operating system to run, in my case it should have given me a choice between Vista and Xubuntu.) Unfortunately the sites I found were all extremely technical or did not work.  I tried to use the Find command to locate the existing Grub, but got an error message. I tried creating it in the most common position, but got another error message.  And of course when I rebooted I still got the Grub rescue message.

I looked through a couple technical-looking guides, and tried using something called grub-install, but it required information I did not have about the device names of the hard drives. There are no doubt ways to find this out, but then I would have to Google for that separately, and know the right keywords to search for.  Luckily I followed a guide that used fdisk -l (l for list, not the number 1) to create a list of those names.  And behold, the partition names fell neatly into two groups, that seemed to correspond to two hard disks.  But I had only one, right?

Turns out that Xubuntu had installed itself on my external hard drive, a WD Passport, which uses USB to connect to the laptop.  It was entirely on that drive, including the actual GRUB code.  The boot sector only linked to that … but it ran before the USB drive was connected, right after the machine booted.  So it linked to the empty void.  No wonder the machine panicked!

I ran the install again, this time without the USB drive attached.  This time it took a piece of the internal hard drive. I had to do it all over again, although it took less time than it had on the external disk.  Now it worked perfectly.  Of course, part of the Passport is now set up with a big Linux partition.  I will consider what to do with that when, or if, I need the space.  There is still plenty left.

I wish you all a happy new Linux!

2 thoughts on “Ubuntu install, GRUB rescue error

  1. Congrats with a newly installed Koala! 🙂

    I’ll have to install it at home some day soon, but 8.04 works like a charm still.. 🙂 Maybe I’ll just wait for 10.04 and track the stable LTS releases as usual. Will see. Darn tempting though.

    • I don’t stick with the long-term support builds myself. Then again I don’t rely on Ubuntu for commercial purposes. But even if I did, the uptime is pretty much what I want it to be. Once I installed it on an internal disk, this version too seems rock stable. I’ve made one recommended reboot after a kernel update made the system unstable, but even then the instability was not enough to bring it crashing down, it was the OS itself that complained that it felt unstable and thought a reboot would help. I haven’t seen any problems since.

Leave a Reply to itlandm Cancel reply

Your email address will not be published. Required fields are marked *