Interrupted kernel update leaves system unbootable
If the system crashes or hangs during a kernel update (due to power loss, hardware issue, etc), that leaves the Manjaro system completely unbootable.
Reproduction steps
-
pacman -S linux54
or another kernel. (This issue is not specific to linux54.) - While the progress bar for that is going, forcibly power off the system.
- Try to boot.
Expected behavior
The system boots up as per normal, perhaps using the previously installed kernel.
Observed behavior
error: file `/boot/vmlinuz-5.4-x86_64' not found.
error: you need to load the kernel first.
Press any key to continue...
Moreover, when booting up from recovery media and mounting the disk partition to run pacman
and attempt to recover the system, I'm greeted with loads of errors like:
...
linux54: /usr/lib/modules/5.4.188-1-MANJARO/kernelbase exists in filesystem
Errors occurred, no packages were upgraded.
Other notes
To be clear, this ticket is not a request for support. I've already managed to fix my system. But I'm super frustrated because, with all due respect, it's 2022 and why aren't atomic kernel upgrades a thing? This is not a new issue...
Thank you.