From 87831fc3e26bc691705cc590c8e9d1d7e5a4dc4f Mon Sep 17 00:00:00 2001 From: liushanwen Date: Fri, 13 Sep 2024 16:05:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9grub=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=B8=BArw=E5=90=8E=EF=BC=8Cusr=E7=9B=AE=E5=BD=95=E5=8F=98?= =?UTF-8?q?=E6=88=90=E5=8F=AA=E8=AF=BB=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 6 ++++++ scripts/local | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index cb0b21f..ef43523 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.142kylin13.1.9test3) nile; urgency=medium + + * 修改grub参数为rw后,usr目录变成可读写了 + + -- liushanwen Fri, 13 Sep 2024 16:04:13 +0800 + initramfs-tools (0.142kylin13.1.9test1) nile; urgency=medium * 添加overlayfs文件系统驱动 diff --git a/scripts/local b/scripts/local index 1c8b138..f2fce9f 100644 --- a/scripts/local +++ b/scripts/local @@ -222,8 +222,13 @@ local_mount_root() mount ${roflag} ${FSTYPE:+-t "${FSTYPE}"} ${ROOTFLAGS} "${ROOT}" "/tmproot" root_real_path=$(readlink -f "/tmproot${OSTREEROOT}") mount -o bind "${root_real_path}" "${rootmnt?}" + + mount -o ro,bind "${rootmnt?}/usr" "${rootmnt?}/usr" mount -o ro,bind,remount "${rootmnt?}/usr" "${rootmnt?}/usr" + mount -o ro,bind "/tmproot" "${rootmnt?}/sysroot" + mount -o ro,bind,remount "/tmproot" "${rootmnt?}/sysroot" + mount -o rw,bind "/tmproot/var" "${rootmnt?}/var" mount -o rw,bind "/tmproot/var" "${rootmnt?}/sysroot/ostree/deploy/openkylin/var" fi