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>
This commit is contained in:
parent
eed627fbd4
commit
5ca75b073f
@ -17,10 +17,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|||||||
1 file changed, 117 insertions(+), 2 deletions(-)
|
1 file changed, 117 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
|
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
|
||||||
index c46650f..0a84179 100644
|
index 5f16ba9..2988ba2 100644
|
||||||
--- a/init-ostree-install.sh
|
--- a/init-ostree-install.sh
|
||||||
+++ b/init-ostree-install.sh
|
+++ b/init-ostree-install.sh
|
||||||
@@ -86,7 +86,9 @@ OPTIONAL:
|
@@ -85,7 +85,9 @@ OPTIONAL:
|
||||||
BSZ=# - MB size of boot partition
|
BSZ=# - MB size of boot partition
|
||||||
RSZ=# - MB size of root partition
|
RSZ=# - MB size of root partition
|
||||||
VSZ=# - MB size of var partition (0 for auto expand)
|
VSZ=# - MB size of var partition (0 for auto expand)
|
||||||
@ -31,7 +31,7 @@ index c46650f..0a84179 100644
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,7 +110,7 @@ conflict_label() {
|
@@ -107,7 +109,7 @@ conflict_label() {
|
||||||
local op=$1
|
local op=$1
|
||||||
local 'label' 'd' 'devs' 'conflict' 'i' 'fstype'
|
local 'label' 'd' 'devs' 'conflict' 'i' 'fstype'
|
||||||
conflict=1
|
conflict=1
|
||||||
@ -40,7 +40,7 @@ index c46650f..0a84179 100644
|
|||||||
devs=$(blkid -t LABEL=$label -o device |grep -v $INSTDEV)
|
devs=$(blkid -t LABEL=$label -o device |grep -v $INSTDEV)
|
||||||
if [ "$devs" != "" ] ; then
|
if [ "$devs" != "" ] ; then
|
||||||
i=0
|
i=0
|
||||||
@@ -547,6 +549,8 @@ IP=""
|
@@ -546,6 +548,8 @@ IP=""
|
||||||
MAX_TIMEOUT_FOR_WAITING_LOWSPEED_DEVICE=60
|
MAX_TIMEOUT_FOR_WAITING_LOWSPEED_DEVICE=60
|
||||||
OSTREE_KERNEL_ARGS=${OSTREE_KERNEL_ARGS=%OSTREE_KERNEL_ARGS%}
|
OSTREE_KERNEL_ARGS=${OSTREE_KERNEL_ARGS=%OSTREE_KERNEL_ARGS%}
|
||||||
KS=""
|
KS=""
|
||||||
@ -49,7 +49,7 @@ index c46650f..0a84179 100644
|
|||||||
|
|
||||||
if [ "$OSTREE_KERNEL_ARGS" = "%OSTREE_KERNEL_ARGS%" ] ; then
|
if [ "$OSTREE_KERNEL_ARGS" = "%OSTREE_KERNEL_ARGS%" ] ; then
|
||||||
OSTREE_KERNEL_ARGS="ro rootwait"
|
OSTREE_KERNEL_ARGS="ro rootwait"
|
||||||
@@ -643,6 +647,10 @@ read_args() {
|
@@ -642,6 +646,10 @@ read_args() {
|
||||||
RSZ=$optarg ;;
|
RSZ=$optarg ;;
|
||||||
VSZ=*)
|
VSZ=*)
|
||||||
VSZ=$optarg ;;
|
VSZ=$optarg ;;
|
||||||
@ -60,7 +60,7 @@ index c46650f..0a84179 100644
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
# defaults if not set
|
# defaults if not set
|
||||||
@@ -655,6 +663,9 @@ read_args() {
|
@@ -654,6 +662,9 @@ read_args() {
|
||||||
if [ "$INSTGPG" = "" ] ; then INSTGPG=1 ; fi
|
if [ "$INSTGPG" = "" ] ; then INSTGPG=1 ; fi
|
||||||
if [ "$INSTFLUX" = "" ] ; then INSTFLUX=1 ; fi
|
if [ "$INSTFLUX" = "" ] ; then INSTFLUX=1 ; fi
|
||||||
if [ "$INSTSBD" = "" ] ; then INSTSBD=2 ; fi
|
if [ "$INSTSBD" = "" ] ; then INSTSBD=2 ; fi
|
||||||
@ -70,7 +70,7 @@ index c46650f..0a84179 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
shell_start() {
|
shell_start() {
|
||||||
@@ -779,6 +790,40 @@ grub_partition() {
|
@@ -778,6 +789,40 @@ grub_partition() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ index c46650f..0a84179 100644
|
|||||||
sgdisk $a -p ${dev}
|
sgdisk $a -p ${dev}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -943,6 +988,40 @@ if [ -n "${KS}" ]; then
|
@@ -958,6 +1003,40 @@ if [ -n "${KS}" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ index c46650f..0a84179 100644
|
|||||||
# Early curl exec
|
# Early curl exec
|
||||||
|
|
||||||
if [ "${ECURL}" != "" -a "${ECURL}" != "none" ] ; then
|
if [ "${ECURL}" != "" -a "${ECURL}" != "none" ] ; then
|
||||||
@@ -1145,6 +1224,42 @@ if [ "$BL" = "grub" -a "$INSTFMT" != "0" ] ; then
|
@@ -1161,6 +1240,42 @@ if [ "$BL" = "grub" -a "$INSTFMT" != "0" ] ; then
|
||||||
mkfs.ext4 -F -L fluxdata ${fs_dev}${FLUXPART}
|
mkfs.ext4 -F -L fluxdata ${fs_dev}${FLUXPART}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -12,10 +12,10 @@ Signed-off-by: Charles Short <charles.short@windriver.com>
|
|||||||
1 file changed, 9 insertions(+)
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
|
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
|
||||||
index 0a84179..d777682 100644
|
index 2988ba2..a2ccf10 100644
|
||||||
--- a/init-ostree-install.sh
|
--- a/init-ostree-install.sh
|
||||||
+++ b/init-ostree-install.sh
|
+++ b/init-ostree-install.sh
|
||||||
@@ -1512,6 +1512,15 @@ if [ -d ${PHYS_SYSROOT}/ostree/1/usr/homedirs/home ] ; then
|
@@ -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
|
tar --xattrs --xattrs-include='*' -xf - -C /var1/home 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ Signed-off-by: Robert Church <robert.church@windriver.com>
|
|||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
|
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
|
||||||
index d777682..f05f7ba 100644
|
index a2ccf10..cc7a507 100644
|
||||||
--- a/init-ostree-install.sh
|
--- a/init-ostree-install.sh
|
||||||
+++ b/init-ostree-install.sh
|
+++ b/init-ostree-install.sh
|
||||||
@@ -1241,9 +1241,9 @@ if [ "$BL" = "grub" -a "$INSTFMT" != "0" ] ; then
|
@@ -1257,9 +1257,9 @@ if [ "$BL" = "grub" -a "$INSTFMT" != "0" ] ; then
|
||||||
|
|
||||||
pi=$((pi+1))
|
pi=$((pi+1))
|
||||||
vgcreate --yes --force cgts-vg ${fs_dev}${pi}
|
vgcreate --yes --force cgts-vg ${fs_dev}${pi}
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
From: Jim Somerville <jim.somerville@windriver.com>
|
||||||
|
Date: Thu, 7 Apr 2022 18:22:07 +0000
|
||||||
|
Subject: Make /boot/efi mount as rw
|
||||||
|
|
||||||
|
Signed-off-by: Jim Somerville <jim.somerville@windriver.com>
|
||||||
|
---
|
||||||
|
init-ostree-install.sh | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
|
||||||
|
index cc7a507..e11289a 100644
|
||||||
|
--- a/init-ostree-install.sh
|
||||||
|
+++ b/init-ostree-install.sh
|
||||||
|
@@ -1589,6 +1589,12 @@ if [ -d /sys/firmware/efi/efivars ] ;then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
+############################################
|
||||||
|
+# StarlingX: Do not mount the otaefi partition ro in fstab
|
||||||
|
+# Caution... If someone resets the /etc/fstab with OSTree this change is lost...
|
||||||
|
+echo "Removing ro from otaefi mount in fstab"
|
||||||
|
+sed -i "s:\(LABEL=otaefi.*\) ro:\1 defaults:g" ${PHYS_SYSROOT}/ostree/?/etc/fstab
|
||||||
|
+
|
||||||
|
if [ "$INSTPOST" = "shell" ] ; then
|
||||||
|
echo " Entering interactive install shell, please exit to continue when done"
|
||||||
|
shell_start
|
@ -2,3 +2,4 @@
|
|||||||
0002-debian-Add-CentOS-compatible-initial-AIO-partitionin.patch
|
0002-debian-Add-CentOS-compatible-initial-AIO-partitionin.patch
|
||||||
0003-debian-Copy-sysroot-var-log-to-LVM-volume.patch
|
0003-debian-Copy-sysroot-var-log-to-LVM-volume.patch
|
||||||
0004-Wipe-signatures-and-zero-first-4KiB.patch
|
0004-Wipe-signatures-and-zero-first-4KiB.patch
|
||||||
|
0005-Make-boot-efi-mount-as-rw.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user