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 ba950669f1)
This commit is contained in:
Dusty Mabe 2017-05-24 01:39:49 -04:00
parent 007c54025d
commit e7742ffc33
No known key found for this signature in database
GPG Key ID: 3302DBD73952E671
1 changed files with 3 additions and 1 deletions

View File

@ -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