+ live-boot (3.0~a24-1) unstable; urgency=low
+
+ * Removing quotes from udev path_id command to actually execute the
+ command.
+
+ -- Daniel Baumann <daniel@debian.org> Sun, 04 Dec 2011 09:58:23 +0100
+
+ live-boot (3.0~a23-1) unstable; urgency=low
+
+ [ Tails developers ]
+ * Enabling whiteouts support for aufs.
+
+ [ Daniel Baumann ]
+ * Update udevs path_id changes as of version 174, thanks to Baurzhan
+ Muftakhidinov <baurthefirst@gmail.com> for spotting it.
+
+ [ Tails developers ]
+ * Adding persistent-encryption={none|luks}.
+ * Making persistent-encryption=luks strict.
+ * Making sure dm-crypt is loaded when dealing with LUKS devices.
+ * Adding persistent-storage=TYPE...
+ * Removing now obsolete persistent=* arguments.
+ * Adding persistent-method=METHOD...
+ * Fixing an incorrectly redirected newline.
+ * Clarifying what happens when you don't retry decrypting a device.
+ * Refactoring device scanning in find_{cow_device,files}.
+ * Making use of is_supported_fs in find_cow_devices (like in
+ find_files).
+ * Refactoring overlay and snapshot scanning code.
+ * Fixing a "sh: bad number" when $offset is not passed to
+ setup_loop().
+ * Disabling persistent-encryption=luks if dependencies are
+ unavailable.
+ * Adding persistent-read-only boot parameter.
+ * Changing persistent-encryption to accept a list TYPE... instead.
+ * Updating live-boot man page for persistent-encryption.
+ * Updating live-boot man page for persistent-storage.
+ * Updating live-boot man page for persistent-method.
+ * Updating and rewording live-boot man page for the persistent option.
+ * Making persistent-read-only work for home-rw overlays.
+ * Making persistent-read-only work for live-rw overlays.
+ * Updating live-boot man page for persistent-read-only.
+ * Adding workaround for a busybox bug with grep -w.
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 28 Nov 2011 18:26:11 +0100
+
+ live-boot (3.0~a22-1) unstable; urgency=low
+
+ [ Daniel Baumann ]
+ * Using compression level 9 also for binary packages.
+ * Updating matching in is_nice_device to, amongst others, match for
+ virtio devices.
+ * Include overlayfs modules in initramfs if existing.
+
+ [ Marco Amadori ]
+ * Fix live-snapshot exclude.list handling (Closes: #610337)
+
+ [ Daniel Baumann ]
+ * Sorting overrides in rules alphabetically.
+
+ -- Daniel Baumann <daniel@debian.org> Fri, 04 Nov 2011 11:37:28 +0100
+
+ live-boot (3.0~a21-1) unstable; urgency=low
+
+ [ Daniel Baumann ]
+ * Silencing rmdir calls in makefile.
+ * Printing out a warning message in initramfs-tools hook if backend is
+ installed but no live-boot package, exiting early and not breaking
+ update-initramfs (Closes: #639884).
+
+ [ Tails developers ]
+ * Fixing cache_path: cache non-executable libs dependencies as well.
+ * Fixing cache_path: taking into account the three forms of ldd output
+ lines.
+ * Adding a white_listed_devices parameter to find_cow_device and
+ find_files.
+ * Factorizing loops on removable/non-removable devices.
+ * Adding support for persistent-media={removable,removable-usb}.
+ * Silencing umount in case live/image was unmounted already, extracted
+ from a patch by Michael Schierl <schierlm@gmx.de>.
+ * Erroring out in case a "wrong" filesystem was chosen.
+
+ [ Daniel Baumann ]
+ * Using /usr/share/live-boot instead of unreliable
+ /usr/share/doc/live-boot in validateroot bootscript, stripped live
+ systems may or may not carry /usr/share/doc.
+
+ -- Daniel Baumann <daniel@debian.org> Thu, 08 Sep 2011 21:06:28 +0200
+
+ live-boot (3.0~a20-1) unstable; urgency=low
+
+ [ Daniel Baumann ]
+ * Updating section for live-boot-doc.
+
+ [ Ben Armstrong ]
+ * Cross-referencing lb_config --bootappend-live.
+
+ [ Daniel Baumann ]
+ * Correcting bootappend-live reference in live-boot manpage.
+ * Applying patch from grml to update forgotten use of live.log with
+ live-boot.log.
+ * Applying reformated patch from Ulrich Dangel <mru@grml.org> to add
+ support for lvm and md devices.
+
+ -- Daniel Baumann <daniel@debian.org> Thu, 04 Aug 2011 21:20:47 +0200
+
+live-boot (3.0~a19-1+grml.01) grml-testing; urgency=low
+
+ * Depend on quilt with a version to quiet lintian
+ * Add debian/control headers Origin, Bugs
+
+ -- Christian Hofstaedtler <ch@grml.org> Wed, 30 Nov 2011 13:24:41 +0100
+
+live-boot (3.0~a19-1+grml.00) unstable; urgency=low
+
+ * Resync with Debian. This brings in:
+ [ Daniel Baumann ]
+ * Updating and correcting sendsigs.omit support for /run (Closes: #628188).
+ * Removing accidentally twice included English files when installing manpages.
+ * Correct rmdir call in top-level Makefiles uninstall target to not fail if there was no prior live-boot installation.
+ * Making references to debian more distribution neutral.
+ * Replacing reference to old alioth page in live-snapshot.
+ * Splitting out documentation so that it can be accesses separately from the initramfs code.
+ * Adding conflicts/replaces for live-boot to live-boot-doc to not break upgrades.
+
+ * Grml changes:
+ [ Ulrich Dangel ]
+ * [8424e93] Use quilt instead of dpatch
+ * [86ca4d5] Remove old manpage live-snapshot.it.1.txt
+ * [7fb9e91] Support comma delimited devices in live-media-path
+ * [6b21c57] Depend on the same live-boot-initramfs-tools/live-boot-backend version.
+
+ [ Christian Hofstaedtler ]
+ * Rename packages to not clash with Debian.
+ * Resynced with Debian.
+
+ -- Christian Hofstaedtler <ch@grml.org> Mon, 25 Jul 2011 02:26:40 +0200
+
live-boot (3.0~a19-1) unstable; urgency=low
* Correct rmdir call in top-level Makefiles uninstall target to not
-- Daniel Baumann <daniel@debian.org> Sat, 11 Jun 2011 11:24:15 +0200
+live-boot (3.0~a17-1+grml.01) unstable; urgency=low
+
+ * [6666658] Do not fail in multiarch environment when
+ installing libnss_dns.so.
+ * [ebdefd9] Drop installation of localized manpages
+ from upstream Makefile.
+
+ -- Michael Prokop <mika@grml.org> Wed, 08 Jun 2011 12:15:23 +0200
+
+live-boot (3.0~a17-1+grml.00) unstable; urgency=low
+
+ [ Christian Hofstaedtler ]
+ * [c9a70fd] Add dpatch support to build process.
+ * [a9ddc0a] Readd Grml patches.
+ * [675f2b2] Remove unused boot scripts.
+ * [c4993d4] Update debian/control for Grml.
+ * [0716b66] Ensure 10validateroot is executable.
+ * [b5b937f] Always honor the "nodhcp" boot option.
+ * [10cf847] Don't mess around with kernel/initramfs-tools' ip=.
+ * [aa93321] Networking_grml: DNS for systems without resolvconf.
+ * [2a859b8] Merge dhcphostname support into 23networking-grml.
+ * [10caf0b] Support DNS in boot environment.
+
+ [ Michael Prokop ]
+ * [6cd3977] Add patch number 19 to revert the toram bootoption
+ to expected behaviour.
+ * [65fa11b] Support dns bootoption.
+
+ [ Ulrich Dangel ]
+ * [df17b43] Support lvm devices for live-media.
+ * [8ff045c] Support raid devices as well.
+ * [2ad3c30] Change output to live-boot.log.
+ * [34b4518] Explicit specify offset parameter for setup_loop.
+ [Closes: issue1003]
+ * [3ac64e5] Remove dba from uploader as this is a Grml project.
+ * [b289379] Support static ip configuration.
+ * [1371673] Improve static version.
+ * [9487c5d] Change nodhcp patch to unset the DHCP option as well.
+ * [1662374] Support nodhcp bootoption.
+ * [7847abd] Ignore devices with no file matching the findiso parameter.
+ * [7158e84] Don't show an error message if /live/image is already
+ unmounted.
+
+ -- Michael Prokop <mika@grml.org> Sun, 05 Jun 2011 21:29:14 +0200
+
live-boot (3.0~a17-1) unstable; urgency=low
[ Daniel Baumann ]
Source: live-boot
Section: misc
Priority: optional
-Maintainer: Debian Live Project <debian-live@lists.debian.org>
-Uploaders: Daniel Baumann <daniel@debian.org>
-Build-Depends: debhelper (>= 8)
+Maintainer: Grml Team <team@grml.org>
+Build-Depends: debhelper (>= 8), quilt (>= 0.46-7~)
Standards-Version: 3.9.2
Homepage: http://live.debian.net/devel/live-boot/
-Vcs-Browser: http://live.debian.net/gitweb/?p=live-boot.git
-Vcs-Git: git://live.debian.net/git/live-boot.git
+Vcs-Browser: http://git.grml.org/?p=live-boot-grml.git
+Vcs-Git: git://git.grml.org/live-boot-grml.git
+Origin: Grml
+Bugs: mailto:bugs@grml.org
-Package: live-boot
+Package: live-boot-grml
Architecture: all
-Depends: ${misc:Depends}, live-boot-initramfs-tools | live-boot-backend
-Recommends: live-boot-doc, eject, file, rsync, uuid-runtime
+Depends: ${misc:Depends}, live-boot-grml-initramfs-tools
+Recommends: live-boot-grml-doc, eject, file, rsync, uuid-runtime
+Conflicts: live-boot
+Replaces: live-boot
+Provides: live-boot
Suggests: curlftpfs, cryptsetup, httpfs2, unionfs-fuse, wget
Description: Debian Live - System Boot Scripts
live-boot contains the scripts that configure a Debian Live system during the
.
In addition to live-boot, a backend for the initrd generation is required, such
as live-boot-initramfs-tools.
+ .
+ Please notice that this package is maintained by the grml.org team.
+ This is NOT a fork of Debian's live-boot, it's just a customized
+ version to better fit Grml's needs.
-Package: live-boot-doc
+Package: live-boot-grml-doc
+ Section: doc
Architecture: all
Depends: ${misc:Depends}
-Conflicts: live-boot (<< 3.0~a18~)
-Replaces: live-boot
+Conflicts: live-boot (<< 3.0~a18~), live-boot-doc
+Replaces: live-boot, live-boot-doc
+Provides: live-boot-doc
Description: Debian Live - System Boot Scripts (documentation)
live-boot contains the scripts that configure a Debian Live system during the
boot process (early userspace).
.
This package contains the documentation.
+ .
+ Please notice that this package is maintained by the grml.org team.
+ This is NOT a fork of Debian's live-boot, it's just a customized
+ version to better fit Grml's needs.
-Package: live-boot-initramfs-tools
+Package: live-boot-grml-initramfs-tools
Architecture: all
Depends:
${misc:Depends}, busybox | busybox-initramfs, initramfs-tools, udev
boot process (early userspace).
.
This package contains the initramfs-tools backend.
+ .
+ Please notice that this package is maintained by the grml.org team.
+ This is NOT a fork of Debian's live-boot, it's just a customized
+ version to better fit Grml's needs.
find "${path}" -type f | xargs cat > /dev/null 2>&1
elif [ -f "${path}" ]
then
- if [ -x "${path}" ]
+ if file -L "${path}" | grep -q 'dynamically linked'
then
- if file -L "${path}" | grep -q 'dynamically linked'
- then
- for lib in $(ldd "${path}" | awk '{ print $3 }')
- do
- cache_path "${lib}"
- done
- fi
+ # ldd output can be of three forms:
+ # 1. linux-vdso.so.1 => (0x00007fffe3fb4000)
+ # This is a virtual, kernel shared library and we want to skip it
+ # 2. libc.so.6 => /lib/libc.so.6 (0x00007f5e9dc0c000)
+ # We want to cache the third word.
+ # 3. /lib64/ld-linux-x86-64.so.2 (0x00007f5e9df8b000)
+ # We want to cache the first word.
+ ldd "${path}" | while read line
+ do
+ if echo "$line" | grep -qs ' => '
+ then
+ continue
+ elif echo "$line" | grep -qs ' => '
+ then
+ lib=$(echo "${line}" | awk '{ print $3 }')
+ else
+ lib=$(echo "${line}" | awk '{ print $1 }')
+ fi
+ cache_path "${lib}"
+ done
fi
cat "${path}" >/dev/null 2>&1
#!/usr/bin/make -f
+build:
+ # this is needed because dpatch doesn't do file modes on diffs.
+ chmod a+rx scripts/live-bottom/*
+ chmod a+rx hooks/*
+ # regular build.
+ dh build
+
%:
- dh ${@}
+ dh ${@} --with quilt
override_dh_auto_install:
dh_auto_install -- DESTDIR=debian/tmp
# Removing useless files
- rm -f debian/tmp/usr/share/doc/live-boot/COPYING
+ rm -f debian/tmp/usr/share/doc/live-boot-grml/COPYING
+ # Some more useless files
+ rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/12fstab
+ rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/23networking
+ rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/24preseed
+ rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/30accessibility
# live-boot-initramfs-tools
- mkdir -p debian/live-boot-initramfs-tools/usr/share
- mv debian/tmp/usr/share/initramfs-tools debian/live-boot-initramfs-tools/usr/share
+ mkdir -p debian/live-boot-grml-initramfs-tools/usr/share
+ mv debian/tmp/usr/share/initramfs-tools debian/live-boot-grml-initramfs-tools/usr/share
- override_dh_installinit:
- dh_installinit -p live-boot-grml --no-restart-on-upgrade --no-start --update-rcd-params='start 89 0 6 .'
+ override_dh_builddeb:
+ dh_builddeb -- -Zgzip -z9
override_dh_install:
dh_install --fail-missing
- dh_installinit -p live-boot --no-restart-on-upgrade --no-start --update-rcd-params='start 89 0 6 .'
+
+ override_dh_installinit:
++ dh_installinit -p live-boot-grml --no-restart-on-upgrade --no-start --update-rcd-params='start 89 0 6 .'
export PERSISTENT
;;
- persistent=*)
- PERSISTENT="${ARGUMENT#persistent=}"
- if [ -z "${PERSISTENT}" ]
- then
- PERSISTENT="Yes"
- fi
- export PERSISTENT
+ persistent-encryption=*)
+ PERSISTENT_ENCRYPTION="${ARGUMENT#*=}"
+ export PERSISTENT_ENCRYPTION
+ ;;
+
+ persistent-media=*)
+ PERSISTENT_MEDIA="${ARGUMENT#*=}"
+ export PERSISTENT_MEDIA
+ ;;
+ persistent-method=*)
+ PERSISTENT_METHOD="${ARGUMENT#*=}"
+ export PERSISTENT_METHOD
;;
persistent-path=*)
PERSISTENT_PATH="${ARGUMENT#persistent-path=}"
export PERSISTENT_PATH
;;
+ persistent-read-only)
+ PERSISTENT_READONLY="Yes"
+ export PERSISTENT_READONLY
+ ;;
+
+ persistent-storage=*)
+ PERSISTENT_STORAGE="${ARGUMENT#persistent-storage=}"
+ export PERSISTENT_STORAGE
+ ;;
persistent-subtext=*)
root_persistence="${root_persistence}-${ARGUMENT#persistent-subtext=}"
UNIONTYPE="aufs"
export UNIONTYPE
fi
+
+ if [ -z "${PERSISTENT_ENCRYPTION}" ]
+ then
+ PERSISTENT_ENCRYPTION="none"
+ export PERSISTENT_ENCRYPTION
+ elif echo ${PERSISTENT_ENCRYPTION} | grep -qe "\<luks\>"
+ then
+ if ! modprobe dm-crypt
+ then
+ log_warning_msg "Unable to load module dm-crypt"
+ PERSISTENT_ENCRYPTION=$(echo ${PERSISTENT_ENCRYPTION} | sed -e 's/\<luks,\|,\?luks$//g')
+ export PERSISTENT_ENCRYPTION
+ fi
+
+ if [ ! -x /lib/cryptsetup/askpass ] || [ ! -x /sbin/cryptsetup ]
+ then
+ log_warning_msg "cryptsetup in unavailable"
+ PERSISTENT_ENCRYPTION=$(echo ${PERSISTENT_ENCRYPTION} | sed -e 's/\<luks,\|,\?luks$//g')
+ export PERSISTENT_ENCRYPTION
+ fi
+ fi
+
+ if [ -n "${PERSISTENT}" ] && [ -z "${PERSISTENT_METHOD}" ]
+ then
+ PERSISTENT_METHOD="snapshot,overlay"
+ export PERSISTENT_METHOD
+ fi
+
+ if [ -n "${PERSISTENT}" ] && [ -z "${PERSISTENT_STORAGE}" ]
+ then
+ PERSISTENT_STORAGE="filesystem,file"
+ export PERSISTENT_STORAGE
+ fi
}
is_live_path ()
{
sysfs_path="${1#/sys}"
- if /lib/udev/path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci|)"
+ if [ -e /lib/udev/path_id ]
+ then
+ # squeeze
+ PATH_ID="/lib/udev/path_id"
+ else
+ # wheezy/sid (udev >= 174)
+ PATH_ID="/sbin/udevadm test-builtin path_id"
+ fi
+
+ if ${PATH_ID} "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-[^-]*-(ide|sas|scsi|usb|virtio)|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci)"
then
return 0
elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$'
fi
}
- find_snap ()
- {
- # Look for ${snap_label}.* in block devices
- snap_label="${1}"
- black_listed_devices="${2}"
-
- if [ "${PERSISTENT}" != "nofiles" ]
- then
- # search for image files
- snapdata=$(find_files "${PERSISTENT_PATH}${snap_label}.squashfs ${PERSISTENT_PATH}${snap_label}.cpio.gz ${PERSISTENT_PATH}${snap_label}.ext2 ${PERSISTENT_PATH}${snap_label}.ext3 ${PERSISTENT_PATH}${snap_label}.ext4 ${PERSISTENT_PATH}${snap_label}.jffs2" "${black_listed_devices}")
- fi
-
- if [ -z "${snapdata}" ]
- then
- snapdata=$(find_cow_device "${snap_label}" "${black_listed_devices}")
- fi
- echo "${snapdata}"
- }
-
try_snap ()
{
# copy the contents of previously found snapshot to ${snap_mount}
return 1
fi
- echo "export ${snap_type}SNAP=${snap_relpath}:${snapdev}:${snapfile}" >> snapshot.conf # for resync on reboot/halt
+ if [ -z ${PERSISTENT_READONLY} ]
+ then
+ echo "export ${snap_type}SNAP=${snap_relpath}:${snapdev}:${snapfile}" >> snapshot.conf # for resync on reboot/halt
+ fi
return 0
}
if [ "${UNIONTYPE}" = "aufs" ]
then
- roopt="rr"
+ roopt="rr+wh"
noxino_opt="noxino,"
elif [ "${UNIONTYPE}" = "unionfs-fuse" ]
then
# Looking for "${root_persistence}" device or file
if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
+
if [ -z "${QUICKUSBMODULES}" ]
then
# Load USB modules
done
fi
- # search for label and files (this could be hugely optimized)
- cowprobe=$(find_cow_device "${root_persistence}")
- if [ -b "${cowprobe}" ]
+ case "${PERSISTENT_MEDIA}" in
+ removable)
+ whitelistdev="$(removable_dev)"
+ ;;
+ removable-usb)
+ whitelistdev="$(removable_usb_dev)"
+ ;;
+ *)
+ whitelistdev=""
+ ;;
+ esac
+
+ if echo ${PERSISTENT_METHOD} | grep -qe "\<overlay\>"
then
- # Blacklist /cow device, to avoid inconsistent setups for overlapping snapshots
- # makes sense to have both persistence for /cow and /home mounted, maybe also with
- # snapshots to be sure to really store some e.g key config files,
- # but not on the same media
- blacklistdev="${cowprobe}"
- PERSISTENCE_IS_ON="1"
- export PERSISTENCE_IS_ON
+ overlays="${root_persistence} ${home_persistence}"
fi
- # homecow just mount something on /home, this should be generalized some way
- homecow=$(find_cow_device "${home_persistence}" "${blacklistdev}")
- if [ -b "${homecow}" ]
+
+ if echo ${PERSISTENT_METHOD} | grep -qe "\<snapshot\>"
+ then
+ snapshots="${root_snapshot_label} ${home_snapshot_label}"
+ fi
+
+
+ for media in $(find_persistent_media "${overlays}" "${snapshots}" "${blacklistdev}" "${whitelistdev}")
+ do
+ media="$(echo ${media} | tr ":" " ")"
+ case ${media} in
+ ${root_persistence}=*)
+ cowprobe="${media#*=}"
+ ;;
+ ${home_persistence}=*)
+ homecow="${media#*=}"
+ ;;
+ ${root_snapshot_label}=*)
+ root_snapdata="${media#*=}"
+ ;;
+ ${home_snapshot_label}=*)
+ # This second type should be removed when snapshot will get smarter,
+ # hence when "/etc/live-snapshot*list" will be supported also by
+ # ext2|ext3|ext4|jffs2 snapshot types.
+ home_snapdata="${media#*=}"
+ ;;
+ *)
+ ;;
+ esac
+ done
+
+ if [ -b "${cowprobe}" ] || [ -b "${homecow}" ]
then
PERSISTENCE_IS_ON="1"
export PERSISTENCE_IS_ON
fi
- root_snapdata=$(find_snap "${root_snapshot_label}" "${blacklistdev}")
- # This second type should be removed when snapshot will get smarter,
- # hence when "/etc/live-snapshot*list" will be supported also by
- # ext2|ext3|ext4|jffs2 snapshot types.
- home_snapdata=$(find_snap "${home_snapshot_label}" "${blacklistdev}")
if [ -b "${cowprobe}" ]
then
cowdevice=${cowprobe}
cow_fstype=$(get_fstype "${cowprobe}")
- cow_mountopt="rw,noatime"
+ if [ -z "${PERSISTENT_READONLY}" ]
+ then
+ cow_mountopt="rw,noatime"
+ else
+ cow_mountopt="ro,noatime"
+ fi
if [ "${FORCEPERSISTENTFSCK}" = "Yes" ]
then
fsck -y ${cowdevice}
fi
- else
- log_warning_msg "Unable to find the persistent medium"
- cowdevice="tmpfs"
- cow_fstype="tmpfs"
- cow_mountopt="rw,noatime,mode=755"
fi
elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENT}" ]
then
nfs_cow_opts="-o nolock"
nfs_cow=${NFS_COW}
fi
+
+ if [ -n "${PERSISTENT_READONLY}" ]
+ then
+ nfs_cow_opts="${nfs_cow_opts},nocto,ro"
+ fi
+
mac="$(get_mac)"
if [ -n "${mac}" ]
then
else
panic "unable to determine mac address"
fi
- else
+ fi
+
+ if [ -z "${cowdevice}" ]
+ then
cowdevice="tmpfs"
cow_fstype="tmpfs"
cow_mountopt="rw,noatime,mode=755"
if [ "${UNIONTYPE}" != "unionmount" ]
then
+ if [ -n "${PERSISTENT_READONLY}" ]
+ then
+ persistent_root="/$(basename ${cowdevice})-backing"
+ mkdir -p ${persistent_root}
+ else
+ persistent_root="/cow"
+ fi
if [ "${cow_fstype}" = "nfs" ]
then
log_begin_msg \
- "Trying nfsmount ${nfs_cow_opts} ${cowdevice} /cow"
- nfsmount ${nfs_cow_opts} ${cowdevice} /cow || \
- panic "Can not mount ${cowdevice} (n: ${cow_fstype}) on /cow"
+ "Trying nfsmount ${nfs_cow_opts} ${cowdevice} ${persistent_root}"
+ nfsmount ${nfs_cow_opts} ${cowdevice} ${persistent_root} || \
+ panic "Can not mount ${cowdevice} (n: ${cow_fstype}) on ${persistent_root}"
else
- mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || \
- panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on /cow"
+ mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} ${persistent_root} || \
+ panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on ${persistent_root}"
fi
fi
*)
- unionmountopts="-o noatime,${noxino_opt}dirs=${unionrw}=rw:${unionro}=${roopt}"
+ if [ -n "${PERSISTENT_READONLY}" ]
+ then
+ mount -t tmpfs -o rw,noatime,mode=755 tmpfs "${unionrw}"
+ unionmountopts="-o noatime,${noxino_opt}dirs=${unionrw}=rw:${persistent_root}=${roopt}:${unionro}=${roopt}"
+ else
+ unionmountopts="-o noatime,${noxino_opt}dirs=${unionrw}=rw:${unionro}=${roopt}"
+ fi
mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}"
;;
esac || \
if [ -b "${homecow}" ]
then
- mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home"
+ if [ -z "${PERSISTENT_READONLY}" ]
+ then
+ mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home"
+ else
+ homerw="/cow/home"
+ homero="/$(basename ${homecow})-backing"
+ homemountpoint="${rootmnt}/home"
+ mkdir -p ${homerw} ${homero} ${homemountpoint}
+ mount -t $(get_fstype "${homecow}") -o ro "${homecow}" "${homero}"
+ mount -t "${UNIONTYPE}" -o "noatime,${noxino_opt}dirs=${homerw}=rw:${homero}=${roopt}" "${UNIONTYPE}" "${homemountpoint}"
+ fi
export HOMEMOUNTED=1 # used to proper calculate free space in do_snap_copy()
else
log_warning_msg "Unable to find the persistent home medium"
loopdevname=$(setup_loop "/isofrom/${ISO_NAME}" "loop" "/sys/block/loop*" "" '')
devname="${loopdevname}"
else
- echo "Warning: unable to mount $ISO_DEVICE." >>/live.log
+ echo "Warning: unable to mount $ISO_DEVICE." >>/live-boot.log
fi
fi
fi
umount $mountpoint
fi
fi
+
+ IFS=","
+ for device in ${devname}
+ do
+ case "$device" in
+ *mapper*)
+ # Adding lvm support
+ if [ -x /scripts/local-top/lvm2 ]
+ then
+ ROOT="$device" resume="" /scripts/local-top/lvm2
+ fi
+ ;;
+
+ /dev/md*)
+ # Adding raid support
+ if [ -x /scripts/local-top/mdadm ]
+ then
+ cp /conf/conf.d/md /conf/conf.d/md.orig
+ echo "MD_DEVS=$device " >> /conf/conf.d/md
+ /scripts/local-top/mdadm
+ mv /conf/conf.d/md.orig /conf/conf.d/md
+ fi
+ ;;
+ esac
+ done
+ unset IFS
+
+ [ -n "$device" ] && devname="$device"
+
[ -e "$devname" ] || continue
if [ -n "${LIVE_MEDIA_OFFSET}" ]
echo ${mountpoint}
return 0
else
- umount ${mountpoint}
+ umount ${mountpoint} 2>/dev/null
fi
fi
# first look at the one specified in the command line
case "${LIVE_MEDIA}" in
removable-usb)
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)")
+ for sysblock in $(removable_usb_dev "sys")
do
- if [ "$(cat ${sysblock}/removable)" = "1" ]
- then
- if readlink ${sysblock} | grep -q usb
+ for dev in $(subdevices "${sysblock}")
+ do
+ if check_dev "${dev}"
then
- for dev in $(subdevices "${sysblock}")
- do
- if check_dev "${dev}"
- then
- return 0
- fi
- done
+ return 0
fi
- fi
+ done
done
return 1
;;
removable)
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)")
+ for sysblock in $(removable_dev "sys")
do
- if [ "$(cat ${sysblock}/removable)" = "1" ]
- then
- for dev in $(subdevices "${sysblock}")
- do
- if check_dev "${dev}"
- then
- return 0
- fi
- done
- fi
+ for dev in $(subdevices "${sysblock}")
+ do
+ if check_dev "${dev}"
+ then
+ return 0
+ fi
+ done
done
return 1
;;
# or do the scan of block devices
# prefer removable devices over non-removable devices, so scan them first
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | egrep -v "/(loop|ram|dm-|fd)")
- do
- if [ "$(cat ${sysblock}/removable)" = "1" ]
- then
- removable_devices_to_scan="$removable_devices_to_scan $sysblock"
- else
- nonremovable_devices_to_scan="$nonremovable_devices_to_scan $sysblock"
- fi
- done
- devices_to_scan="$removable_devices_to_scan $nonremovable_devices_to_scan"
+ devices_to_scan="$(removable_dev 'sys') $(non_removable_dev 'sys')"
for sysblock in $devices_to_scan
do
then
# We found a memdisk, set up phram
modprobe phram phram=memdisk,${MEMDISK}
+ modprobe phram phram=memdisk,${MEMDISK}
# Load mtdblock, the memdisk will be /dev/mtdblock0
modprobe mtdblock