Updated Clean install of Ubuntu 10.04 but now it won't boot

just did a clean install of Ubuntu 10.04.  This is the only OS on the computer.  After the install I went to the update manager and did all of the updates that it asked for.  After the update, it asked for a reboot.  At reboot, I get some text at the top of the screen referring to GRUB, and a prompt that looks like "grub>" but no options of available OS to boot to.
zotfarmsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gmckeown99Commented:
You have to wipe the MBR (Master Boot Record) on the drive and reinstall it. Boot Ubuntu into the live desktop, open a console, su to root and enter dd if=/dev/zero of=/dev/DRIVE bs=512 count=1 (replace DRIVE with your actual drive id - usually sda)

This will wipe the boot record and you will have clean drive to install. This happens when you reinstall over a previous install and the grub installer fails.

muffCommented:
Er, you don't need to wipe the whole thing just to get grub working.

Can you remember the partitioning set up you used?  Normally there is a separate boot partition.  I will assume that your boot partition is /dev/sda1 and your root partition is /dev/sda2.  You may need to adjust for your setup.

Boot from the ubuntu live CD, and go to a console

mkdir /mnt/disk
mount /dev/sda2 /mnt/disk
mount /dev/sda1 /mnt/disk/boot
mount --bind /proc /mnt/disk/proc
mount --bind /dev /mnt/disk/dev
chroot /mnt/disk

With the above commands, we have set up your disks as they would appear if you had booted.

The first thing to do is take a look at grubs menu.lst to see if it makes sense.  This is in /boot/grub/menu.lst

It will refer to root= in the kernel line, and if I recall right, ubuntu uses uuid to let you know which is the right disk.  So where you see root=/dev/by-uuid/[lots of characters] do
 
  ls -la /dev/by-uuid/[lots of characters]

And confirm that this is pointing at the partition you expect - like /dev/sda2 in this case.

If it is right, we can re-install grub.

Type grub and you will get the grub> prompt

Type root(hd0,0)
Type setup(hd0)

The "root" command tells grub where the boot partition is.  In this example, I have said sda1 is the boot partition.  If sda2 was the boot partition, this would read root(hd0,1) - ie the partition number is one less than the /dev partition number.

The setup command will install grub into the MBR.  Watch for any errors.

Good luck.
TobiasHolmCommented:
Hi!

Check these links, they describe how to fix GRUB2.

https://help.ubuntu.com/community/Grub2

https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Regards, Tobias

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

zotfarmsAuthor Commented:
I used the automatic setup.  This is not a dual boot setup, so I don't know how the partitioning is done.  How would I determine the partitioning?
muffCommented:
The disks will almost certainly be sda1, sda2, sda3 etc

So once you boot from the live CD and get to a console, you can just type:

  fdisk -l

This will show you the partitioning for your disks.  There will be two small partitions (probably), boot and swap, and one or more larger partitions.

If LVM was used, a single large partition on the sda disk, and then a bunch of /dev/dm-x disks.  No need to get into that unless they are there.

So the easiest way is to mount each of the partitions and have a look:

mount /dev/sda1 /mnt
ls /mnt
umount /dev/sda1

mount /dev/sda2 /mnt
ls /mnt
umount /dev/sda2

The boot partition will have kernels and vmlinux files and system maps, and a folder called grub

The root partition will contain /etc /bin /sbin/ /usr /var etc.
TobiasHolmCommented:
You can use 'sudo fdisk -l' to see the partitions and their names.
TobiasHolmCommented:
If you have Ubuntu in sda1 (check with 'sudo fdisk -l'):

Boot Ubuntu LiveCD and start a terminal window:

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo chroot /mnt
sudo update-grub

Reboot!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.