From adfc2b8f72a2a070b6b3a90c2b1e95785a0b99ad Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Fri, 11 Jun 2021 16:18:19 -0400 Subject: [PATCH] overlay: ignition-ostree-firstboot-uuid: use metadata_csum_seed fs feature We're hitting issues in some cases where users are seeing the `tune2fs -U random` on the /boot filesystem fail even though it's ran directly after an `e2fsck`. To prevent needing a filesystem check at all let's store the metadata checksum seed in the superblock which will allow us to change the UUID without needing any filesystem checks. This was not possible before but we recently got a grub fix so that having this filesystem feature enabled wouldn't cause grub2 to throw an error. - https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00031.html Fixes: https://github.com/coreos/fedora-coreos-tracker/issues/735 --- .../40ignition-ostree/ignition-ostree-firstboot-uuid | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-firstboot-uuid b/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-firstboot-uuid index 0027bed357..0eed19db06 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-firstboot-uuid +++ b/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-firstboot-uuid @@ -27,10 +27,7 @@ esac if [ "${TYPE}" == "${orig_type}" ] && [ "${UUID}" == "${orig_uuid}" ]; then case "${TYPE}" in - # For now we need to fsck first, see https://github.com/coreos/coreos-assembler/pull/1452 - # Basically we're not passing `metadata_csum_seed` as a mkfs.ext4 option - # because grub2 barfs on it. - ext4) e2fsck -fy "${target}" && tune2fs -U random "${target}" ;; + ext4) tune2fs -O metadata_csum_seed -U random "${target}" ;; xfs) xfs_admin -U generate "${target}" ;; *) echo "unexpected filesystem type ${TYPE}" 1>&2; exit 1 ;; esac