Skip to content

Commit

Permalink
overlay: ignition-ostree-firstboot-uuid: use metadata_csum_seed fs fe…
Browse files Browse the repository at this point in the history
…ature

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: coreos/fedora-coreos-tracker#735
  • Loading branch information
dustymabe authored and HuijingHei committed Oct 10, 2023
1 parent 169baa7 commit adfc2b8
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit adfc2b8

Please sign in to comment.