14.04 boot stuck at "Loading initial ramdisk"

7,433

I made the mistake of assuming all the background was part of the problem, when the problem was just that grub2 couldn't find the system:

Kernel panic - not syncing: VFS: Unable to mount root fs...

I imagine the cause is that I forgot to run "sudo update-grub2" after running "sudo update-initramfs."

The solution turned out to be to boot to a Live CD, mount and chroot to the hard drive, and re-run update-initramfs and update-grub2, as detailed here.

Two complications I encountered were:

  1. "fdisk -l" doesn't work on GPT volumes; you have to use "gdisk -l" instead.
  2. I have /boot and / on different volumes, and / is encrypted.

So I needed to modify the mount sequence as follows:

sudo cryptsetup luksOpen /dev/sdaX sdaX_crypt
sudo mount /dev/mapper/sdaX_crypt /mnt
sudo mount /dev/sdaY /mnt/boot
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
sudo chroot /mnt

So I am back into my system, though I still don't have a cursor. But that is another problem.

Share:
7,433

Related videos on Youtube

user1148928
Author by

user1148928

Updated on September 18, 2022

Comments

  • user1148928
    user1148928 over 1 year

    I have a recent installation of Ubuntu 14.04.4 that is freezing at the "Loading initial ramdisk" stage of booting. What is the best way to troubleshoot this?

    The hardware is a Lenovo Thinkpad e410, with an Intel i3 processor, Intel graphics, and a hardware-encrypted Samsung SSD. Ubuntu is installed under UEFI, and the kernel version is 4.2.0-35.

    Everything was fine until a few days ago, except that graphics hardware acceleration was (sometimes? always?) not working correctly (images cutting into other windows, flashing blue, etc.). I eventually traced this to this bug and applied the fix suggested at #9, running "sudo update-initramfs -u -k all" afterwards. After the fix, the i915 driver did appear to load correctly, but it still did not appear to be working correctly. I then did two things: (1) updated the system, and (2) installed Flash for Firefox. Everything still appeared to be fine, with the exception of the graphics.

    This morning, when I started my computer, the cursor was gone in Unity. I could still access the terminal, and decided to try undoing the above bug fix, running update-initramfs again afterwards. Rebooting, it froze at the urple screen. Rebooting via grub2's advanced menu, normal boot mode freezes at "Loading initial ramdisk." Recovery mode loads the ramdisk, then generates a few screens worth of errors including:

    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    ...[5 lines + call traces omitted]...
    ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    ...[more lines + call traces omitted]...
    ---[ end trace ... ]---
    

    And that's it. Results are the same if I try booting into 4.2.0-27, in both normal (freezes at "Loading initial ramdisk") and recovery (lots of kernel panic output, then freeze) modes.

    I can try modifying grub boot options, but I'm not sure how to do this in grub2 or which options to try. Or I can try booting the live disk, mounting the hard drive, and poking around from there, but I don't really know where to begin.

    Any suggestions very much appreciated.