From 830a5495c60db52e990da295b1b38ba36260dd9f Mon Sep 17 00:00:00 2001 From: Christoph Senkel Date: Tue, 28 Nov 2023 11:14:48 +0100 Subject: [PATCH] switch to gpt-auto --- .../_boot/file.include/usr/local/sbin/update-kernel-cmdline | 2 +- .../file.include/etc/kernel/cmdline.d/99-no-gpt-auto.cfg | 1 - .../file.include/etc/kernel/cmdline.d/99-usr-verity.cfg | 1 + .../file.include/usr/local/sbin/update-kernel-cmdline | 2 +- .../base/file.include/etc/kernel/cmdline.d/99-root-options.cfg | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 features/_readonly/file.include/etc/kernel/cmdline.d/99-no-gpt-auto.cfg create mode 100644 features/_readonly/file.include/etc/kernel/cmdline.d/99-usr-verity.cfg create mode 100644 features/base/file.include/etc/kernel/cmdline.d/99-root-options.cfg diff --git a/features/_boot/file.include/usr/local/sbin/update-kernel-cmdline b/features/_boot/file.include/usr/local/sbin/update-kernel-cmdline index 1c284895e..a80f4dbd7 100755 --- a/features/_boot/file.include/usr/local/sbin/update-kernel-cmdline +++ b/features/_boot/file.include/usr/local/sbin/update-kernel-cmdline @@ -10,5 +10,5 @@ for i in "${configDir}"/*-*.cfg; do source $i done -echo "root=${DEVICE} ${CMDLINE_LINUX}" > /etc/kernel/cmdline.new +echo "root=gpt-auto ${CMDLINE_LINUX} systemd.gpt_auto" > /etc/kernel/cmdline.new mv /etc/kernel/cmdline.new /etc/kernel/cmdline diff --git a/features/_readonly/file.include/etc/kernel/cmdline.d/99-no-gpt-auto.cfg b/features/_readonly/file.include/etc/kernel/cmdline.d/99-no-gpt-auto.cfg deleted file mode 100644 index 229ec44aa..000000000 --- a/features/_readonly/file.include/etc/kernel/cmdline.d/99-no-gpt-auto.cfg +++ /dev/null @@ -1 +0,0 @@ -CMDLINE_LINUX="$CMDLINE_LINUX systemd.gpt_auto=no rd.systemd.gpt_auto=no" diff --git a/features/_readonly/file.include/etc/kernel/cmdline.d/99-usr-verity.cfg b/features/_readonly/file.include/etc/kernel/cmdline.d/99-usr-verity.cfg new file mode 100644 index 000000000..2f63aa066 --- /dev/null +++ b/features/_readonly/file.include/etc/kernel/cmdline.d/99-usr-verity.cfg @@ -0,0 +1 @@ +CMDLINE_LINUX="$CMDLINE_LINUX mount.usr=/dev/mapper/verity_usr mount.usrfstype=ext4 mount.usrflags=ro systemd.verity" \ No newline at end of file diff --git a/features/_secureboot/file.include/usr/local/sbin/update-kernel-cmdline b/features/_secureboot/file.include/usr/local/sbin/update-kernel-cmdline index 1c284895e..3ed3ff7c0 100755 --- a/features/_secureboot/file.include/usr/local/sbin/update-kernel-cmdline +++ b/features/_secureboot/file.include/usr/local/sbin/update-kernel-cmdline @@ -10,5 +10,5 @@ for i in "${configDir}"/*-*.cfg; do source $i done -echo "root=${DEVICE} ${CMDLINE_LINUX}" > /etc/kernel/cmdline.new +echo "root=gpt-auto ${CMDLINE_LINUX}" > /etc/kernel/cmdline.new mv /etc/kernel/cmdline.new /etc/kernel/cmdline diff --git a/features/base/file.include/etc/kernel/cmdline.d/99-root-options.cfg b/features/base/file.include/etc/kernel/cmdline.d/99-root-options.cfg new file mode 100644 index 000000000..67f45c454 --- /dev/null +++ b/features/base/file.include/etc/kernel/cmdline.d/99-root-options.cfg @@ -0,0 +1 @@ +CMDLINE_LINUX="$CMDLINE_LINUX rootflags=rw,errors=remount-ro,prjquota,discard" \ No newline at end of file