Verified Commit 697d750a authored by nl6720's avatar nl6720
Browse files

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
parents a4c9d8c3 57a8d9bb
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment