integ/ostree/initramfs-ostree/debian/patches/0004-Wipe-signatures-and-zero-first-4KiB.patch
Robert Church 7ba7c83297 debian: Allow ISO installs to proceed without user prompts
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]:

Change-Id: Ifeb0ddf193820a3e5d98006093813355d2494797
Story: 2009101
Task: 44628
Signed-off-by: Robert Church <robert.church@windriver.com>
2022-02-28 02:20:28 -05:00

34 lines
1.4 KiB
Diff

From: Robert Church <robert.church@windriver.com>
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 <robert.church@windriver.com>
---
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
;;