Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/hooks/archiso
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/archiso')
-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