integ/ostree/initramfs-ostree/debian/patches/0004-Wipe-signatures-and-zero-first-4KiB.patch
Jim Somerville 5ca75b073f debian: Make /boot/efi mount as rw
Currently the mount is set to ro in fstab.  This changes
the entry in fstab to be "defaults" which will
make it mount rw on the subsequent reboot.

Why do we need it mounted rw?  Because the grub.cfg file
lives on that filesystem, and we need to change it for
things such as kernel bootargs.

Verification
- install on a virtual machine, check the resulting
fstab entry for otaefi being "defaults"
- ensure that /boot/efi is now mounted rw on the
subsequent reboot

Story: 2009964
Task: 45001

Change-Id: I9bf51b1004dc254b8f33d8fd160e546717e7c9f8
Signed-off-by: Jim Somerville <jim.somerville@windriver.com>
2022-04-08 14:13:25 -04: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 a2ccf10..cc7a507 100644
--- a/init-ostree-install.sh
+++ b/init-ostree-install.sh
@@ -1257,9 +1257,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
;;