Skip to content

Fixes for v2022dev2

Denis Pynkin requested to merge wip/d4s/v2022dev2_fix_cp into wip/apertis/v2022dev2
  • rpi64: fix copying boot files to FAT partition

Do not use the -a archive flag while copying files to FAT partition. In case if some files have the same content they became hardlinks to the same file in repository during ostree deploy. So if we are trying to copy those files with a single command cp -a, it is trying to preserve hardlinks causing error if file system have no hardlinks support:

  '/scratch/mnt/ostree/.../0/usr/lib/raspi-firmware/fixup4cd.dat' -> '/scratch/mnt/boot/firmware/fixup4cd.dat'
  '/scratch/mnt/ostree/.../0/usr/lib/raspi-firmware/fixup_cd.dat' -> '/scratch/mnt/boot/firmware/fixup_cd.dat'
  cp: cannot create hard link '/scratch/mnt/boot/firmware/fixup_cd.dat' to '/scratch/mnt/boot/firmware/fixup4cd.dat': Operation not permitted
  • UEFI images: create the default entry

We do removal of /etc/machine-id file from the image as a last step of image preparation to allow to generate unique machine ID during first boot. Hence the machine ID in a build time and run time are different and this affect to kernel-install scripts behaviour.

Generate the default entry for EFI boot /boot/efi/Default. systemd-boot is using this entry in case if it exists instead of /boot/efi/$MACHINE_ID.

This change allow to avoid wasting space on EFI partition after upgrade with build-time generated EFI entry and binaries since cleanup of the entry depends on machine ID.

Edited by Denis Pynkin

Merge request reports

Loading