integ/ostree/initramfs-ostree/debian/patches/0003-debian-Copy-sysroot-var-log-to-LVM-volume.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.1 KiB
Diff

From: Charles Short <charles.short@windriver.com>
Date: Thu, 17 Feb 2022 15:21:03 -0500
Subject: [PATCH 3/3] debian: Copy /sysroot/var/log to LVM volume
Sync the contents of ostree/1/var/log and the
cgts-vg/log-lv volume so services will start properly
at boot.
Signed-off-by: Charles Short <charles.short@windriver.com>
---
init-ostree-install.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
index 2988ba2..a2ccf10 100644
--- a/init-ostree-install.sh
+++ b/init-ostree-install.sh
@@ -1528,6 +1528,15 @@ if [ -d ${PHYS_SYSROOT}/ostree/1/usr/homedirs/home ] ; then
tar --xattrs --xattrs-include='*' -xf - -C /var1/home 2> /dev/null
fi
+if [ -b /dev/cgts-vg/log-lv ]; then
+ if [ -d ${PHYS_SYSROOT}/ostree/1/var/log/apt ] ; then
+ mnt_point=$(mktemp -d)
+ mount -t ext4 /dev/cgts-vg/log-lv ${mnt_point} || fatal "Error mounting ${mnt_point}"
+ cp -rp ${PHYS_SYSROOT}/ostree/1/var/log/* ${mnt_point}
+ umount ${mnt_point}
+ fi
+fi
+
if [ -n "${KS}" ]; then
rootfs=`ls ${PHYS_SYSROOT}/ostree/? -d`
if [ "$INSTAB" = 1 ] ; then