Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Natty Alpha 3. I used Update Manager to install something (not sure what it was), then I restarted, but instead of listing all the kernels, it gave me a command line. I don't know what happened and how to use it. Help!

share|improve this question
    
Welcome to Ask Ubuntu! 11.04 is currently Alpha so things might not work right. Please see askubuntu.com/questions/18641/… and meta.askubuntu.com/questions/871/… for better instructions on how to proceed. –  Jorge Castro Mar 27 '11 at 19:38
add comment

4 Answers

up vote 6 down vote accepted

May I suggest you to recover your grub installation with a live cd?
I could recover grub many times by following these instructions at: https://wiki.ubuntu.com/Grub2#Recover

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal - Applications, Accessories, Terminal. 3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run

df -Th 
Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt  
# Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition: sdYY is the /boot partition designation (for example sdb3)
sudo mount /dev/sdYY /mnt/boot 
6) Mount the critical virtual filesystems:
sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys 
7) Chroot into your normal system device:

sudo chroot /mnt 

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub 

9) Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc.

Do not specify a partition number (e.g. do not specify sda5, instead it could be sda)

grub-install /dev/sdX 

10) Verify the install (use the correct device, for example sda. Do not specify a partition):

sudo grub-install --recheck /dev/sdX 
11) Exit chroot: CTRL-D on keyboard 12) Unmount virtual filesystems:

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys 

13) If you mounted a separate /boot partition:

sudo umount /mnt/boot 

14) Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr 

15) Unmount last device:

sudo umount /mnt 

16) Reboot.

sudo reboot 
"

share|improve this answer
add comment

It happened to me too, on a regular upgrade. Thankfully I was working on the dev system, determining the stability of the upgrade before pushing it to production.

The answer from "steabert" is not helpful at all. That's the answer for people who run Windows. Early releases are for finding bugs, and Cg2916 found one.

I recovered by using the grub console to continue booting, then reinstalled grub after I was able to log in.

set root (hd0,1)
linux /vmlinuz root=/dev/sda
initrd /initrd.img
boot

Lots of fun boot stuff happens

sudo grub-install /dev/sda

Of course, you'll need to adjust for correct partition numbers and device names, but it's fairly painless after you get over the initial pain.

Now, how do I do this on a virtual machine in a remote location where I only have SSH access...

share|improve this answer
add comment

This is the most common error after fresh installation of Ubuntu. It can be recovered from Ubuntu desktop CD or Ubuntu server CD

Steps to recover from Ubuntu desktop CD http://opensource-sidh.blogspot.com/2011/06/recover-grub-live-ubuntu-cd.html

Steps to recover from Ubuntu server Cd http://opensource-sidh.blogspot.com/2011/05/install-grub-rescue-recovery-in-ubuntu.html

share|improve this answer
add comment

As for trying to boot from the grub 2 command line, you can read the section on Fallback mode. I wouldn't really bother with all that, maybe easier is to just reinstall from LiveCD.

Or better, don't run Alpha and then scream "Help!" =)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.