FS#68368 - vmlinuz-linux missing from /boot during pacman -Syu - if cancelled, unbootable

Attached to Project: Arch Linux
Opened by Matthew Carter (ahungry) - Wednesday, 21 October 2020, 22:52 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 21 October 2020, 22:57 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

First off, I filed with the incorrect severity/category here (https://bugs.archlinux.org/task/68367) and cannot find a way to edit it, so please close that one if possible.

Description:

It may have always been this way, and I just never noticed before, but when running:

pacman -Syu

To perform the full system upgrade, after the download step, during the package installation step, the files in /boot required to boot the system are removed until new files are added via the post install hooks (mkinitcpio process).

What this means is that if the pacman -Syu is interrupted in some way (I believe I had done a C-c to cancel it the first time I observed this) and then reboot the machine, having never finished the pacman upgrade, the computer will be in an unbootable state and the user will be required to boot with an alternative method (bootable USB etc.) and finish the upgrade from an arch-chroot.

Shouldn't the system always remain in a bootable state, even if the pacman process is killed early, or if perhaps power was lost or the machine restarted during the upgrade?

Why not version one previous kernel, or at least ensure the final step is atomic in some way (old file not removed before new file is put in place). This time gap for a large system upgrade can be over 10 minutes, so it is not a small timing issue (there are no /boot files for start up in that directory the entire time the packages are upgraded prior to the post install hooks running).
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 21 October 2020, 22:57 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#68367 

Don't do that
Comment by Matthew Carter (ahungry) - Wednesday, 21 October 2020, 22:53 GMT
ls -l output during the package upgrade step:

[root@blub ~]# ls -l /boot
total 13
drwxr-xr-x 5 root root 1024 Oct 6 2019 grub
drwx------ 2 root root 12288 Aug 29 2019 lost+found

output after the hooks were run:

[root@blub ~]# ls -l /boot
total 56599
drwxr-xr-x 5 root root 1024 Oct 6 2019 grub
-rw-r--r-- 1 root root 34554014 Oct 21 18:32 initramfs-linux-fallback.img
-rw-r--r-- 1 root root 14199143 Oct 21 18:32 initramfs-linux.img
drwx------ 2 root root 12288 Aug 29 2019 lost+found
-rw-r--r-- 1 root root 8958080 Oct 21 18:32 vmlinuz-linux

Loading...