pve-kernel-meta/proxmox-boot
Stoiko Ivanov 2a8a4b5e37 proxmox-boot: fix #3632 copy kernel+initrd unconditionally
do not use the -u (update) flag when copying kernel images and inird
from /boot to the ESPs:
* the ESPs are formatted with vfat, which has a 2 second precision for
  mtime (`linux/fs/fat/misc.c` - `fat_truncate_time`)
* cp -u compares the mtimes of source (kernel image in /boot not on
  vfat) and destination - leading to the copy always being carried
  out, if the source files remain the same (and do not happen to have
  a mtime exactly happening on a even second)

as laid out in the bug-report - the case where this leads to an
unbootable system is when a kernel-version is shipped twice (built
with different tool-chains) - e.g. currently the 5.11 kernels in PVE 6
and PVE 7.

tested the behavior of `cp -u` by running opensnopp-bpfcc and copying
a file twice onto ext4 (opened only once) and on vfat (opened twice).

additionally reproduced the issue (by dist-upgrading a PVE 6 VM to 7
with the pve-no-subscription repo) and verified this patch fixes it.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-10-01 09:09:59 +02:00
..
000_proxmox_boot_header proxmox-boot: redirect stdout in update-grub snippet 2021-06-24 14:21:01 +02:00
functions proxmox-boot: rename uuid list file 2021-04-23 13:28:56 +02:00
Makefile proxmox-boot: add grub.cfg header snippet 2021-04-23 13:28:56 +02:00
proxmox-auto-removal proxmox-boot-tool: rename from pve-efiboot-tool 2021-04-23 13:28:56 +02:00
proxmox-boot-sync proxmox-boot-tool: rename from pve-efiboot-tool 2021-04-23 13:28:56 +02:00
zz-proxmox-boot proxmox-boot: fix #3632 copy kernel+initrd unconditionally 2021-10-01 09:09:59 +02:00