Skip to content
Snippets Groups Projects
Commit 03c296cb authored by Christian Hesse's avatar Christian Hesse :stuck_out_tongue_winking_eye: Committed by Gerardo Pozzi
Browse files

add boot params archisoflags= and cow_flags= for mount options


Having files on btrfs subvolumes requires to give mount options. Add
boot params archisoflags= and cow_flags= for this purpose. Boot
parameters could look like this:

... archisodevice=/dev/sdaX archisoflags=subvolume=isos
cow_device=/dev/sdaX cow_flags=subvolume=persist ...

Signed-off-by: default avatarChristian Hesse <mail@eworm.de>
parent d1e95f85
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,7 @@ run_hook() {
[[ -z "${archisobasedir}" ]] && archisobasedir="arch"
[[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch"
[[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}"
[[ -z "${archisoflags}" ]] && archisoflags="defaults"
[[ -z "${cow_spacesize}" ]] && cow_spacesize="256M"
if [[ -n "${cow_label}" ]]; then
......@@ -121,6 +122,7 @@ run_hook() {
cow_persistent="N"
fi
[[ -z "${cow_flags}" ]] && cow_flags="defaults"
[[ -z "${cow_directory}" ]] && cow_directory="persistent_${archisolabel}/${arch}"
[[ -z "${cow_chunksize}" ]] && cow_chunksize="8"
......@@ -135,7 +137,7 @@ archiso_mount_handler() {
local newroot="${1}"
if ! mountpoint -q "/run/archiso/bootmnt"; then
_mnt_dev "${archisodevice}" "/run/archiso/bootmnt" "-r"
_mnt_dev -o "${archisoflags}" "${archisodevice}" "/run/archiso/bootmnt" "-r"
if [[ "${copytoram}" != "y" ]]; then
echo $(readlink -f ${archisodevice}) >> /run/archiso/used_block_devices
fi
......@@ -164,7 +166,7 @@ archiso_mount_handler() {
fi
if [[ -n "${cow_device}" ]]; then
_mnt_dev "${cow_device}" "/run/archiso/cowspace" "-r"
_mnt_dev -o "${cow_flags}" "${cow_device}" "/run/archiso/cowspace" "-r"
echo $(readlink -f ${cow_device}) >> /run/archiso/used_block_devices
mount -o remount,rw "/run/archiso/cowspace"
else
......
......@@ -21,6 +21,8 @@ INDEX
Default: (unset)
* archisodevice= Set the device node where archiso medium is located.
Default: "/dev/disk/by-label/${archisolabel}"
* archisoflags= Set extra mount options, e.g. for btrfs subvolumes.
Default: defaults
* archisobasedir= Set the base directory where all files reside.
Default: "arch"
* copytoram= If set to "y" or just "copytoram" without arguments,
......@@ -35,6 +37,8 @@ INDEX
Default: (unset)
* cow_device= Like cow_label= but using device node.
Default: (unset) or "/dev/disk/by-label/${cow_label}"
* cow_flags= Set extra mount options, e.g. for btrfs subvolumes.
Default: defaults
* cow_directory= Set a directory inside ${cow_device}.
Default: "/persistent_${archisolabel}/${arch}"
* cow_persistent= Set if snapshot is persistent "P" or non-persistent "N".
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment