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.
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.
Reboot or cold start the computer.
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.
From the purple GRUB screen select Advanced options for Ubuntu with the ↑ and ↓ keys and press Enter.
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.
Ubuntu will load the selected kernel and proceed to the login screen as usual.
Find the latest installed kernel version in the results of the following command:
dpkg -l | grep "linux-[a-z]*-"
Uninstall the latest kernel.
sudo apt-get purge <latest-kernel-version-number>
<latest-kernel-version-number> in the above command with the latest kernel version number.
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.
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