From: Robert Church Date: Sat, 26 Feb 2022 22:08:52 -0500 Subject: Wipe signatures and zero first 4KiB To avoid any previous ext4 file system signatures that could have been present from previous installs, add lvcreate options to wipe signatures and zero the first 4KiB of data in the LV. This will avoid requiring user interaction. WARNING: ext4 signature detected on /dev/cgts-vg/scratch-lv at offset 1080. Wipe it? [y/n]: Signed-off-by: Robert Church --- init-ostree-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init-ostree-install.sh b/init-ostree-install.sh index d777682..f05f7ba 100644 --- a/init-ostree-install.sh +++ b/init-ostree-install.sh @@ -1241,9 +1241,9 @@ if [ "$BL" = "grub" -a "$INSTFMT" != "0" ] ; then pi=$((pi+1)) vgcreate --yes --force cgts-vg ${fs_dev}${pi} - lvcreate --yes -n log-lv --size "${LOG_VOL_SIZE}MB" cgts-vg + lvcreate -y -Wy -Zy -n log-lv --size "${LOG_VOL_SIZE}MB" cgts-vg mkfs.ext4 -F /dev/cgts-vg/log-lv - lvcreate -n scratch-lv --size "${SCRATCH_VOL_SIZE}MB" cgts-vg + lvcreate -y -Wy -Zy -n scratch-lv --size "${SCRATCH_VOL_SIZE}MB" cgts-vg mkfs.ext4 -F /dev/cgts-vg/scratch-lv ;;