9

I updated my laptop (Ubuntu) to 11.10 and I don't know what went wrong that when I restarted the computer It would start and it would only tell me.

kernel panic not syncing vfs unable to mount root fs on unknown block oo swapper not tainted...

I am a new user and I have no idea what to do. Any ideas?

Mateo
  • 8,104

2 Answers2

9

You are missing the initramfs for that kernel. Choose another kernel from the grub menu, or run update-initramfs -u -k version to generate the initrd for version then update-grub.

Boot to a LiveCD, select Try Ubuntu and then open a a terminal. Run the following:

sudo fdisk -l

This will show us what partitions are available. You need to look for your main Ubuntu partition. On most fresh-installed systems this will be sda1 but it really could be anything. Substitude sda1 in the following with whatever you decide is right in the fdisk output.

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
sudo chroot /mnt 

And now you can run update-initramfs and update-grub with out errors and that should fix everything. Reboot without the CD in and you should land on your Ubuntu desktop.


Additionally, after the chroot:

cp -r /usr/lib/i386-linux-gnu/pango /usr/lib/

update-initramfs -u -k 2.6.38-8-generic #(or your version)
update-grub2

(You can find a list if installed kernels using: dpkg --list | grep linux-image) And reboot your system

Oli
  • 293,335
dilip
  • 91
0
  1. Get/burn an installation CD with a linux system.

  2. Booted from this CD (may need to press F12 (or other key) to choose boot option).

  3. Mount the old file system on, I use:

    Code:

    mount -t ext4 /dev/sda1 /mnt
    
  4. In ROOT account, went to my boot volume (at /mnt/boot/grub) and edited "grub.conf" so that (A) I would see the menu and (B) it would give me a few seconds to choose and option:

    Code:

    timeout=10
    #hiddenmenu
    
  5. Rebooted (from the hard disk this time).

  6. Chose the second kernel (not the most recent broken one).

  7. It worked!

  8. So, then I went back to grub (now at "/etc/grub.conf", which is soft linked to "/boot/grub/grub.conf") and edited it to comment out (or remove) the lines relating to the broken kernel:

    Code:

    # title Fedora (2.6.40-4.fc15.i686)
    #        root (hd0,0)
    #        kernel /vmlinuz-2.6.40-4. ......
    

I noticed this stanza does not have "initrd ..." line. Maybe that's why it couldn't boot.

kiri
  • 28,246
  • 16
  • 81
  • 118
dilip
  • 91