diff --git a/ostree/initramfs-ostree/debian/patches/0001-Prevent-auto-expansion-of-fluxdata-partition.patch b/ostree/initramfs-ostree/debian/patches/0001-Prevent-auto-expansion-of-fluxdata-partition.patch index 777d06ccf..17338ebf9 100644 --- a/ostree/initramfs-ostree/debian/patches/0001-Prevent-auto-expansion-of-fluxdata-partition.patch +++ b/ostree/initramfs-ostree/debian/patches/0001-Prevent-auto-expansion-of-fluxdata-partition.patch @@ -14,7 +14,7 @@ Signed-off-by: Robert Church 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init-ostree.sh b/init-ostree.sh -index 1702e55..3b043ea 100644 +index 6017fcf..b6eacbf 100644 --- a/init-ostree.sh +++ b/init-ostree.sh @@ -32,7 +32,7 @@ ROOT_DELAY="0" diff --git a/ostree/initramfs-ostree/debian/patches/0002-debian-Add-CentOS-compatible-initial-AIO-partitionin.patch b/ostree/initramfs-ostree/debian/patches/0002-debian-Add-CentOS-compatible-initial-AIO-partitionin.patch index b2f990c55..76859ed69 100644 --- a/ostree/initramfs-ostree/debian/patches/0002-debian-Add-CentOS-compatible-initial-AIO-partitionin.patch +++ b/ostree/initramfs-ostree/debian/patches/0002-debian-Add-CentOS-compatible-initial-AIO-partitionin.patch @@ -13,7 +13,7 @@ Signed-off-by: Robert Church Rebase to meta-lat 20220220 Signed-off-by: Hongxu Jia --- - init-ostree-install.sh | 119 ++++++++++++++++++++++++++++++++++++++++- + init-ostree-install.sh | 119 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 117 insertions(+), 2 deletions(-) diff --git a/init-ostree-install.sh b/init-ostree-install.sh @@ -195,6 +195,3 @@ index c46650f..0a84179 100644 elif [ "$INSTFMT" != 0 ] ; then if [ $INSTSF = 1 ] ; then dosfslabel ${fs_dev}${p1} boot --- -2.27.0 - diff --git a/ostree/initramfs-ostree/debian/patches/0003-debian-Copy-sysroot-var-log-to-LVM-volume.patch b/ostree/initramfs-ostree/debian/patches/0003-debian-Copy-sysroot-var-log-to-LVM-volume.patch index 7b0772b61..131ecbcee 100644 --- a/ostree/initramfs-ostree/debian/patches/0003-debian-Copy-sysroot-var-log-to-LVM-volume.patch +++ b/ostree/initramfs-ostree/debian/patches/0003-debian-Copy-sysroot-var-log-to-LVM-volume.patch @@ -1,4 +1,3 @@ -From 5598e61c3471c0cf253e6d077f09ee2b1d438ea9 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Thu, 17 Feb 2022 15:21:03 -0500 Subject: [PATCH 3/3] debian: Copy /sysroot/var/log to LVM volume @@ -13,10 +12,10 @@ Signed-off-by: Charles Short 1 file changed, 9 insertions(+) diff --git a/init-ostree-install.sh b/init-ostree-install.sh -index 57e8f2d..f56b78d 100644 +index 0a84179..d777682 100644 --- a/init-ostree-install.sh +++ b/init-ostree-install.sh -@@ -1468,6 +1468,15 @@ if [ -d ${PHYS_SYSROOT}/ostree/1/usr/homedirs/home ] ; then +@@ -1512,6 +1512,15 @@ if [ -d ${PHYS_SYSROOT}/ostree/1/usr/homedirs/home ] ; then tar --xattrs --xattrs-include='*' -xf - -C /var1/home 2> /dev/null fi @@ -32,6 +31,3 @@ index 57e8f2d..f56b78d 100644 if [ -n "${KS}" ]; then rootfs=`ls ${PHYS_SYSROOT}/ostree/? -d` if [ "$INSTAB" = 1 ] ; then --- -2.25.1 - diff --git a/ostree/initramfs-ostree/debian/patches/0004-Wipe-signatures-and-zero-first-4KiB.patch b/ostree/initramfs-ostree/debian/patches/0004-Wipe-signatures-and-zero-first-4KiB.patch new file mode 100644 index 000000000..32fb32473 --- /dev/null +++ b/ostree/initramfs-ostree/debian/patches/0004-Wipe-signatures-and-zero-first-4KiB.patch @@ -0,0 +1,33 @@ +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 + + ;; diff --git a/ostree/initramfs-ostree/debian/patches/series b/ostree/initramfs-ostree/debian/patches/series index 0abec0f88..1c209277f 100644 --- a/ostree/initramfs-ostree/debian/patches/series +++ b/ostree/initramfs-ostree/debian/patches/series @@ -1,3 +1,4 @@ 0001-Prevent-auto-expansion-of-fluxdata-partition.patch 0002-debian-Add-CentOS-compatible-initial-AIO-partitionin.patch 0003-debian-Copy-sysroot-var-log-to-LVM-volume.patch +0004-Wipe-signatures-and-zero-first-4KiB.patch