From e7742ffc3372c71f3c8df1d463a4d1d93fa5e454 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Wed, 24 May 2017 01:39:49 -0400 Subject: [PATCH] cloud: fix errors that happen on UEFI systems We are seeing an error on aarch64 cloud image creation because of the vfat filesystem and the fixfiles command failing: + /usr/sbin/fixfiles -R -a restore /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/fonts/unicode.pf2: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/gcdaa64.efi: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/grub.cfg: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/grubaa64.efi: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/grubenv: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/BOOT/BOOTAA64.EFI: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/BOOT/fallback.efi: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/BOOT.CSV: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/MokManager.efi: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/shim-fedora.efi: Operation not supported /sbin/restorecon: Could not set context for /boot/efi/EFI/fedora/shim.efi: Operation not supported (cherry picked from commit ba950669f14b27c8cf5c96ce403d798cbc3e850f) --- fedora-cloud-base.ks | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fedora-cloud-base.ks b/fedora-cloud-base.ks index 1e78bed..45ecc4d 100644 --- a/fedora-cloud-base.ks +++ b/fedora-cloud-base.ks @@ -232,7 +232,9 @@ rm -f /var/lib/rpm/__db* echo "Fixing SELinux contexts." touch /var/log/cron touch /var/log/boot.log -/usr/sbin/fixfiles -R -a restore +# ignore return code because UEFI systems with vfat filesystems +# that don't support selinux will give us errors +/usr/sbin/fixfiles -R -a restore || true echo "Zeroing out empty space." # This forces the filesystem to reclaim space from deleted files