I have tried to update my Ubuntu version and after updating, my boot screen is displaying a kernel panic message and I'm unable to access my login screen.

enter image description here

  • 1
    you may want to add which version you are updating from and to which version.
    – saviour123
    Mar 30 '17 at 11:28
  • And this is why I never do in-place upgrades, regardless of the OS. I always clean install instead of upgrade. Mar 30 '17 at 11:56

You are missing the initramfs for kernel version 4.8.0-44.

It looks like you got a kernel panic error message after updating the kernel in Ubuntu 16.04.1 to 4.8.0-44-generic. To fix it enter a text-only console and either replace 4.8.0-44-generic with the more stable default kernel version or run sudo update-initramfs -u -k 4.8.0-44-generic && sudo update-grub.

  1. After the boot stops at the black screen, open a text-only virtual console by using the keyboard shortcut Ctrl+Alt+F3

  2. At the login: prompt type your username and press Enter.

  3. At the Password: prompt type your user password and press Enter.

  4. After you have logged in in the console type:

    sudo apt remove linux-image-4.8.0-44-generic linux-image-extra-4.8.0-44-generic linux-headers-4.8.0-44-generic    
    sudo apt install linux-image-4.4.0-71-generic linux-headers-4.4.0-71 linux-headers-4.4.0-71-generic 
    sudo reboot

    Alternatively you can run the following commands to update initramfs for kernel version 4.8.0-44-generic :

    sudo update-initramfs -u -k 4.8.0-44-generic
    sudo update-grub
  5. Immediately after the BIOS/UEFI splash screen during boot, with BIOS, quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) With UEFI press (perhaps several times) the Esc key to get to the GRUB menu. Sometimes the manufacturer's splash screen is a part of the Windows bootloader, so when you power up the machine it goes straight to the GRUB screen, and then pressing Shift is unnecessary.

  6. From the purple GRUB screen select Advanced options for Ubuntu with the ↑ and ↓ keys and press Enter.

  7. A new purple screen will appear showing a list of kernels. Select Ubuntu, with Linux 4.4.0-71-generic and press Enter.

  8. Ubuntu will load the selected kernel and proceed to the login screen as usual.

  9. Don't let Ubuntu update the kernel to the 4.8.0-44 version that caused the black screen again, or else you'll get the same black screen problem that you got before.

  • 1
    Remember that 16.04.2 (they weren't specific what version they installed, but it looks like .2) comes with kernel 4.8, not 4.4. It might be better to first try and boot the previous kernel from the GRUB menu and see if that works. Then I'd reinstall/update to 16.04.whatever they were trying to update to. Also, the last error message indicates a file system error.
    – heynnema
    Mar 30 '17 at 13:42
  • @heynnema The first line of the screenshot in the question says that user1900238 is using Ubuntu 16.04.1 which came with Linux kernel version 4.4, the same as the first 16.04 release.
    – karel
    Mar 30 '17 at 14:35
  • Ah, interesting... they're trying to run kernel 4.8 on 16.04.1... or trying to update to .2. It's not important, as they can't mount root due to a file system error.
    – heynnema
    Mar 30 '17 at 14:39
  • I got it working now. I went to grub options and than did update initramfs.. It even updated my kernel. Thanks guys, now it's working fine.. Apr 1 '17 at 13:18
  • @karel how did you determine that initramfs was missing? Inquiring minds want to know :-)
    – heynnema
    Apr 1 '17 at 13:27


  1. Turn off the system completely. 
  2. Turn system back on.
  3. Immediately after the System Manufacture Logo or Boot Message Press Shift to goto Grub options. Or You can force kill the system with power button and turn it back on, the Grub menu should appear.
  4. Choose Advance option For Ubuntu.
  5. A selection menu should appear with list of kernels installed on the system, take note of the version number of the latest kernel ( Usually the First one) choose the recovery option of the  old kernel (one with lower version number of the first one, normally the fourth 4th option).
  6. Another list of options should appear, choose root : Drop to to root shell option, if you set root account password enter that here else press enter.
  7. Execute the following commands:  

    mount -o remount,rw /
    mkinitramfs -o /boot/initrd.img-{kerner_version}-generic {kernel_version}-generic

    Here {Kernel_version} is the kernel version number you take note of in step 5 (The Problematic kernel, latest installed one).

Reboot the system that is it, you're all set and ready to continue your work. Hope that helps.

  • 6th step didn’t show up after I followed step 5 ☹️
    – atulkhatri
    Jul 18 '20 at 9:35

You have a file system error that caused your kernel panic. Unable to mount root. It might be because you're trying to run kernel 4.8 on 16.04.1, or a failed 16.04.2 update, or it might even be a bad hard drive, or one that needs to be reinitialized... but lets try this first...

To check the file system on your Ubuntu partition...

  • boot to the GRUB menu
  • choose Advanced Options
  • choose Recovery mode (from the prior 4.4 kernel)
  • choose Root access
  • at the # prompt, type sudo fsck -f /
  • repeat the fsck command if there were errors
  • type reboot

Let me know if you can't do this, and I'll give you another method.

  • Thanks for the tip. I did go through grub mention option and logged into previous version and updated initramfs.. It even updated my kernel. Thanks, now it's working fine.. Apr 1 '17 at 13:19
  • @user1900238 so what did you finally end up with? What version Ubuntu? What version kernel? Please begin comments directed to me with @heynnema or I may miss them.
    – heynnema
    Apr 1 '17 at 13:29

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