Commit a5ff1370 authored by Kristian Klausen's avatar Kristian Klausen

Add option to specific alternative mount opts for live-media

parent f952837f
......@@ -110,6 +110,11 @@ Cmdline_old ()
export LIVE_MEDIA_UUID
;;
live-media-mount-opts=*)
LIVE_MEDIA_MOUNT_OPTS="${_PARAMETER#*=}"
export LIVE_MEDIA_MOUNT_OPTS
;;
live-media-encryption=*|encryption=*)
LIVE_MEDIA_ENCRYPTION="${_PARAMETER#*=}"
export LIVE_MEDIA_ENCRYPTION
......
......@@ -99,6 +99,7 @@ check_dev ()
sysdev="${1}"
devname="${2}"
skip_uuid_check="${3}"
mount_opts="${LIVE_MEDIA_MOUNT_OPTS:-ro,noatime}"
# support for fromiso=.../isofrom=....
if [ -n "$FROMISO" ]
......@@ -196,7 +197,7 @@ check_dev ()
then
devuid=$(blkid -o value -s UUID "$devname")
[ -n "$devuid" ] && grep -qs "\<$devuid\>" /var/lib/live/boot/devices-already-tried-to-mount && continue
mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
mount -t ${fstype} -o "${mount_opts}" "${devname}" ${mountpoint} || continue
[ -n "$devuid" ] && echo "$devuid" >> /var/lib/live/boot/devices-already-tried-to-mount
if [ -n "${FINDISO}" ]
......@@ -205,10 +206,10 @@ check_dev ()
then
umount ${mountpoint}
mkdir -p /live/findiso
mount -t ${fstype} -o ro,noatime "${devname}" /live/findiso
mount -t ${fstype} -o "${mount_opts}" "${devname}" /live/findiso
loopdevname=$(setup_loop "/live/findiso/${FINDISO}" "loop" "/sys/block/loop*" 0 "")
devname="${loopdevname}"
mount -t iso9660 -o ro,noatime "${devname}" ${mountpoint}
mount -t iso9660 -o "${mount_opts}" "${devname}" ${mountpoint}
else
umount ${mountpoint}
fi
......
......@@ -2,6 +2,7 @@ live-boot (1:20160426) UNRELEASED; urgency=medium
[ Kristian Klausen ]
* Allow overriding UUID embedded in the initramfs with new option (live-media-uuid).
* Add option to specific alternative mount opts for live-media (live-media-mount-opts).
-- Kristian Klausen <klausenbusk@hotmail.com> Tue, 26 Apr 2016 19:17:42 +0200
......
......@@ -80,6 +80,9 @@ Let you specify the name(s) and the options of the interface(s) that should be c
If this variable is set, dhcp and static configuration are just skipped and the system will use the (must be) media\-preconfigured /etc/network/interfaces instead.
.IP "\fBlive\-media\-uuid\fR=\fIUUID\fR" 4
Override UUID embedded in the initramfs.
.IP "\fBlive\-media\-mount\-opts\fR=\fIOPTS\fR" 4
This specific which mount opts to use for mounting live-media.
Default: ro,noatime
.IP "{\fBlive\-media\fR|\fBbootfrom\fR}=\fIDEVICE\fR" 4
If you specify one of this two equivalent forms, live\-boot will first try to find this device for the "/live" directory where the read\-only root filesystem should reside. If it did not find something usable, the normal scan for block devices is performed.
.br
......
Markdown is supported
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