From ba2650d1067effa51dde2f749014ce4ec4a6f575 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 2 Nov 2018 18:18:45 +0100 Subject: [PATCH] prepare-root.sh: move /efi to /usr/efi if /efi is non-empty, gpt auto mounter does not mount it but we still want the efi, in case you have to repair the system --- prepare-root.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/prepare-root.sh b/prepare-root.sh index 3a46b7c..f978f31 100755 --- a/prepare-root.sh +++ b/prepare-root.sh @@ -797,6 +797,8 @@ echo 'C /var/mail - - - - -' >> "$sysroot"/usr/lib/tmpfiles.d/var-quirk.conf mv "$sysroot"/lib/tmpfiles.d-var.conf "$sysroot"/lib/tmpfiles.d/var.conf +#--------------- +# EFI if [[ -d "$sysroot"/boot/efi/EFI/fedora ]]; then mkdir -p "$sysroot"/efi/EFI mv "$sysroot"/boot/efi/EFI/fedora "$sysroot"/efi/EFI @@ -810,13 +812,16 @@ done find "$sysroot"/efi -xdev -newermt "@${SOURCE_DATE_EPOCH}" -print0 \ | xargs --verbose -0 touch -h --date "@${SOURCE_DATE_EPOCH}" +mv "$sysroot"/efi "$sysroot"/usr/efi +#--------------- +# cleanup rm -fr "$sysroot"/{boot,root} ln -sfnr "$sysroot"/var/roothome "$sysroot"/root rm -fr "$sysroot"/var rm -fr "$sysroot"/home rm -f "$sysroot"/etc/yum.repos.d/* -mkdir -p "$sysroot"/{var,home,cfg,net} +mkdir -p "$sysroot"/{var,home,cfg,net,efi} # ------------------------------------------------------------------------------ # SELinux relabel all the files @@ -891,7 +896,7 @@ fi mkdir -p "$OUTDIR" mv "$MY_TMPDIR"/root.img \ - "$sysroot"/efi \ + "$sysroot"/usr/efi \ "$OUTDIR"/