From: Yu Watanabe Date: Thu, 11 Jan 2018 04:53:27 +0000 (+0900) Subject: dracut.sh: do not invoke fsfreeze on EFI System Partition X-Git-Tag: 047~39^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F350%2Fhead;p=thirdparty%2Fdracut.git dracut.sh: do not invoke fsfreeze on EFI System Partition When the system boots with EFI, then initrd image is stored on EFI System Partition. Thus dracut always warn about the failure to invoke fsfreeze on the partition. This prevents to run fsfreeze on ESP and suppress the warning. --- diff --git a/dracut.sh b/dracut.sh index c857b624c..f6a75996c 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1834,8 +1834,10 @@ command -v restorecon &>/dev/null && restorecon -- "$outfile" if ! sync "$outfile" 2> /dev/null; then dinfo "dracut: sync operation on newly created initramfs $outfile failed" exit 1 +fi + # use fsfreeze only if we're not writing to / -elif ! [ "$(stat -c %m -- "$outfile")" == "/" ]; then +if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")" fi