Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2022-01-10 16:19:05 +0200
committernl6720 <nl6720@gmail.com>2022-01-10 16:19:05 +0200
commit697d750a64dbece971f8a33234a11a769dfdeda9 (patch)
treefd6ca665244e5638a2dd2d48325ef040f3494fda
parenta4c9d8c3aa25fce0d1fb98be4150ebd25ec99e4b (diff)
parent57a8d9bb182295a3f83be2e06148c94261385dff (diff)
Merge branch '9-cowspace-can-no-longer-be-on-same-device-as-archiso-files'
* 9-cowspace-can-no-longer-be-on-same-device-as-archiso-files: hooks/archiso: mount cow_device read-only at first and remount it read-write right after Closes #9 See merge request mkinitcpio/mkinitcpio-archiso!12
-rw-r--r--hooks/archiso5
1 files changed, 4 insertions, 1 deletions
diff --git a/hooks/archiso b/hooks/archiso
index 59c5765..7e40077 100644
--- a/hooks/archiso
+++ b/hooks/archiso
@@ -244,7 +244,10 @@ archiso_mount_handler() {
fi
if [ -n "${cow_device}" ]; then
- _mnt_dev "${cow_device}" "/run/archiso/cowspace" "-w" "${cow_flags}"
+ # Mount cow_device read-only at first and remount it read-write right after. This prevents errors when the
+ # device is already mounted read-only somewhere else (e.g. if cow_device and archisodevice are the same).
+ _mnt_dev "${cow_device}" "/run/archiso/cowspace" "-r" "${cow_flags}"
+ mount -o remount,rw "/run/archiso/cowspace"
else
msg ":: Mounting /run/archiso/cowspace (tmpfs) filesystem, size=${cow_spacesize}..."
mkdir -p /run/archiso/cowspace