Grub hangs after installing Ubuntu 10.04 LTS

Asked by Anders Wallén

I have a Packard Bell mini-PC, that I try to turn into a file and media server. The computer came with Vista Home Basic pre-installed, but does not have a CD/DVD-drive.

I repartitioned the hard drive, so that it now has
1) windows partition
2) linux partition
3) some sort of factory-made PB backup partition

Ubuntu 9.10 installed properly. Grub would let me choose which OS to boot with, and I started installing applications under Ubuntu. (I have a second PC equipped with Vista and Ubuntu 9.04, which is doing fine.)

Then the OS informed me that there was a new version (10.04 LTS) avaliable, and asked me if I wanted to upgrade. I chose to do so.

During installation, I was asked to input data for GRUB. Since I have a multi-partition harddrive, I clicked all the check-boxes in the menu. -- BIG MISTAKE.

When rebooting the computer, Grub fails to load properly. All I get is:
"error: no such device: 8f673b4c-fc38-43cb-bfd7-09a335ab661b.
grub rescue>"

Trying to boot from a USB stick loaded with Ububtu 10.04 makes no difference. Although I used the BIOS menu to make the stick preferred boot device, the exact same thing happends. I can't boot from either of the partitions, so my computer is now just a $ 300 brick.

From the Ubuntu support site, I have gathered that Grub has gone into something called "rescue mode", but there is no applicable help as to how to get it to do anything; whatever command I type in, I only get the answer: "Unknown command '<command name>'"; not even 'reboot' is working.

Any help is really welcome.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Goh Lip (gohlip) said :
#1

Hope you know which partition your Ubuntu is, say sdax or (hd0,x)
Try this then..
grub rescue> set prefix=(hd0,x)/boot/grub
grub rescue> insmod (hd0,x)/boot/grub/linux.mod
set root=(hd0,x)
linux /boot/vmlinuz root=/dev/sdax
initrd /boot/initrd.img
boot

note: replace above 'sdax' and '(hd0,x)' with real numbers for 'x'.
When/If booted, do a 'sudo grub-install /dev/sda'
If still at 9.10, upgrade to 10.04 carefully.

Revision history for this message
Anders Wallén (anders-wallen) said :
#2

Interesting.

There is only one harddrive, and Ubuntu is on the second partition. Depending on wether partition numbers start from 0 or 1 it should therefore be sda1, sda2, hd0,1 or hd0,2.

This is the output I get when I try:

>set prefix=(hd0,1)/boot/grub
>insmod (hd0,1)/boot/grub/linux.mod
error: no such partition.
>set prefix=(hd0,2)/boot/grub
>insmod (hd0,2)/boot/grub/linux.mod
error: no such partition.

-- OK, so it's not hd0. Let's try sda:

>set prefix=(sda1)/boot/grub
>insmod (sda1)/boot/grub/linux.mod
error: no such disk.
>set prefix=sda1/boot/grub
>insmod sda1/boot/grub/linux.mod
error: invalid file name 'sda1/boot/grub/linux.mod'

-- Then it has to be sda2?:

>set prefix=sda2/boot/grub
>insmod sda2/boot/grub/linux.mod
error: invalid file name 'sda2/boot/grub/linux.mod'

Hmmm...

I'm really not good with command line interfaces. Any suggestions? IT seems that we're almost there, but I can't find that last piece of information.

Revision history for this message
Goh Lip (gohlip) said :
#3

>insmod (hd0,1)/boot/grub/linux.mod
should be (hd0,2)/boot/grub/linux.mod

as Ubuntu is on 2nd partition
sda1 is (hd0,1)
sda2 is (hd0,2)
and so on....

This is the new naming convention for grub2.

Good luck.

Revision history for this message
Goh Lip (gohlip) said :
#4

Sorry, Anders, you may have more problems.
I will write to you off list so I can send you a grub rescue iso. It's just about 1 MB size.
If you still cannot boot with this, it may confirm you may have more problems, hopefully your /vmlinuz file is intact.

Revision history for this message
Goh Lip (gohlip) said :
#5

Apologies, again, Anders, you do not have a cd-dvd drive; so there's no point in sending an iso file.
Right then, try the following , but I am not confident it will work as what you did earlier didn't. Just give it a shot.
grub rescue> set prefix=(hd0,2)/boot/grub
grub rescue> insmod (hd0,2)/boot/grub/normal.mod
grub rescue> normal

If this gives you a normal grub prompt, we're back in business
sh:grub>
grub>

If you get this grub prompt, we'll continue...
Otherwise, I would ask others reading this to help out Anders.
Thanks.

Can you help with this problem?

Provide an answer of your own, or ask Anders Wallén for more information if necessary.

To post a message you must log in.