2

I have a dual boot laptop (Windows 10).
I ran general updates and now my Ubuntu won't boot.
I ran in recovery mode and still it freezes in the same place.

enter image description here

Kernel panic – not syncing: Attempted to kill init! exit code=0x00007f00  
1
  • 1
    When you open ubuntu advanced in grub, you probably see a few instances of ubuntu after different updates. Try them, they have your previous kernel.
    – Katu
    Sep 12, 2017 at 11:23

2 Answers 2

3

It looks like you got a kernel panic error message after updating the Linux kernel.

  1. Reboot or cold start the computer.

  2. Immediately after the motherboard / computer manufacturer logo splash screen appears when the computer is booting, 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.

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

  4. A new purple screen will appear showing a list of kernels. Select an older kernel version instead of the latest kernel version and press Enter.

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

After rebooting

  1. Find the latest installed kernel version in the results of the following command:

    dpkg -l | grep "linux-[a-z]*-"  
    
  2. Uninstall the latest kernel.

    sudo apt-get purge <latest-kernel-version-number>  
    

    Replace <latest-kernel-version-number> in the above command with the latest kernel version number.

  3. Update grub.

    sudo update-grub  
    
  4. Reboot.

    sudo reboot
    
  5. Don't let Ubuntu update the kernel to the kernel version that caused the black screen again, or else you'll get the same black screen problem that you got before. Instead wait for the next kernel update and update to that kernel version. Optionally you can also prevent updating of a specific package (in this case the specific package is the kernel) by following the instructions in the answers to How to prevent updating of a specific package?.

2
  • I selected an older version and I got an error: [ 0.363634] Initramfs unpacking failed: Decoding failed - what does that mean? Jun 27, 2020 at 11:29
  • @GalGrünfeld AFAIK this is a confirmed bug in 20.04: initramfs unpacking failed: Decoding failed", message appears on boot up. Edit /etc/initramfs-tools/initramfs.conf and change COMPRESS=lz4 to COMPRESS=gzip and the error is fixed. Don't do anything funky without making an /etc/initramfs-tools/initramfs.conf.bak file first so you can undo it if the edit doesn't work.
    – karel
    Jun 27, 2020 at 11:44
0

Reboot the PC then click shift while opening
Select oldest kernel version then your system will get up in old kernel
Lastly open terminal windows and enter the following:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f

Then reboot your PC and enjoy

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .