...
 
Commits (2)
......@@ -105,6 +105,16 @@ Cmdline_old ()
export LIVE_MEDIA
;;
live-media-uuid=*)
LIVE_MEDIA_UUID="${_PARAMETER#*=}"
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
......
......@@ -17,13 +17,14 @@ is_live_path()
matches_uuid ()
{
if [ "${IGNORE_UUID}" ] || [ ! -e /conf/uuid.conf ]
if [ "${IGNORE_UUID}" ] || ([ ! -e /conf/uuid.conf ] && [ ! "${LIVE_MEDIA_UUID}" ])
then
return 0
fi
path="${1}"
uuid="$(cat /conf/uuid.conf)"
uuid="${LIVE_MEDIA_UUID:-${uuid}}"
for try_uuid_file in "${path}/.disk/live-uuid"*
do
......@@ -98,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" ]
......@@ -195,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}" ]
......@@ -204,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
......
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
live-boot (1:20151213) unstable; urgency=medium
[ Iain R. Learmonth ]
......
......@@ -78,6 +78,11 @@ If specified, an MD5 sum is calculated on the live media during boot and compare
Let you specify the name(s) and the options of the interface(s) that should be configured at boot time. Do not specify this if you want to use dhcp (default). It will be changed in a future release to mimick official kernel boot param specification (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp).
.IP "\fBip\fR=[\fIfrommedia\fR]" 4
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
......