60 lines
2.0 KiB
Diff
60 lines
2.0 KiB
Diff
From 4f745732b8b56a54dd2ce87157c00d44255eda3b Mon Sep 17 00:00:00 2001
|
|
From: classabbyamp <void@placeviolette.net>
|
|
Date: Sun, 2 Jun 2024 06:31:30 -0400
|
|
Subject: [PATCH] core-services, shutdown.d: force legacy mount iface for
|
|
remount
|
|
|
|
With util-linux>=2.40, filesystems that do not support remounting with
|
|
different options fail because the new kernel mount interface is used.
|
|
This breaks booting an overlayfs (like live ISOs).
|
|
|
|
By setting `LIBMOUNT_FORCE_MOUNT2=always`, we force `mount(8)` to use
|
|
the old kernel mount interface, which ignores changed options.
|
|
|
|
see also:
|
|
* https://github.com/util-linux/util-linux/issues/2576
|
|
* https://github.com/void-linux/void-mklive/issues/369
|
|
---
|
|
core-services/03-filesystems.sh | 4 ++--
|
|
shutdown.d/80-filesystems.sh | 2 +-
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh
|
|
index bb7eac0..6035cad 100644
|
|
--- a/core-services/03-filesystems.sh
|
|
+++ b/core-services/03-filesystems.sh
|
|
@@ -3,7 +3,7 @@
|
|
[ -n "$VIRTUALIZATION" ] && return 0
|
|
|
|
msg "Remounting rootfs read-only..."
|
|
-mount -o remount,ro / || emergency_shell
|
|
+LIBMOUNT_FORCE_MOUNT2=always mount -o remount,ro / || emergency_shell
|
|
|
|
if [ -x /sbin/dmraid -o -x /bin/dmraid ]; then
|
|
msg "Activating dmraid devices..."
|
|
@@ -74,7 +74,7 @@ if [ -z "$FASTBOOT" ]; then
|
|
fi
|
|
|
|
msg "Mounting rootfs read-write..."
|
|
-mount -o remount,rw / || emergency_shell
|
|
+LIBMOUNT_FORCE_MOUNT2=always mount -o remount,rw / || emergency_shell
|
|
|
|
msg "Mounting all non-network filesystems..."
|
|
mount -a -t "nosysfs,nonfs,nonfs4,nosmbfs,nocifs" -O no_netdev || emergency_shell
|
|
diff --git a/shutdown.d/80-filesystems.sh b/shutdown.d/80-filesystems.sh
|
|
index 95dcce4..7a83de3 100644
|
|
--- a/shutdown.d/80-filesystems.sh
|
|
+++ b/shutdown.d/80-filesystems.sh
|
|
@@ -3,7 +3,7 @@ if [ -z "$VIRTUALIZATION" ]; then
|
|
swapoff -a
|
|
umount -r -a -t nosysfs,noproc,nodevtmpfs,notmpfs
|
|
msg "Remounting rootfs read-only..."
|
|
- mount -o remount,ro /
|
|
+ LIBMOUNT_FORCE_MOUNT2=always mount -o remount,ro /
|
|
fi
|
|
|
|
sync
|
|
--
|
|
2.45.1
|
|
|