kernel update wipes vmlinuz/initramfs at begin of update and re-creates at the very end
Task Info (Flyspray) | |
---|---|
Opened By | Pawel Kraszewski (PKraszewski) |
Task ID | 72834 |
Type | Bug Report |
Project | Arch Linux |
Category | Packages: Core |
Version | 6.0.0 |
OS | All |
Opened | 2021-11-25 06:20:39 UTC |
Status | Assigned |
Assignee | Giancarlo Razzolini (grazzolini) |
Details
Summary and Info:
Update of kernel images wipes vmlinuz/initrd at begin of update and re-creates them at the very end. On lower end devices, when updating multiple packages at once it creates prolonged time when the device has no working boot files and in the case of power loss or premature update termination can leave an unaware user with an unbootable system.
Steps to Reproduce:
- Start
pacman -Suy
on older device (preferably with spinning rust disks) - As soon as packages finish downloading,
initramfs-*
andvmlinuz-*
files of kernels being updated are deleted. - Update takes long time due to lower specs/DKMS/slow disk
- New
initramfs-*
andvmlinuz-*
are created as a last step of update, IF it gets this far (for example, there were no errors in DKMS, no conflicting files, space didn't run out)
Proposed solution:
- Don't delete
initramfs-*
andvmlinuz-*
in advance - Generate
initramfs-*.new
andvmlinuz-*.new
- Upon verification of correctness, atomically swap old and new files
- Delete old files
Best regards