Ubuntu won't boot - kernel error?

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  

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 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.

  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.