5 export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
7 echo "/root/lib" >> /etc/ld.so.conf
8 echo "/root/usr/lib" >> /etc/ld.so.conf
10 mountpoint="/live/image"
11 LIVE_MEDIA_PATH="live"
13 root_persistence="live-rw"
14 home_persistence="home-rw"
15 root_snapshot_label="live-sn"
16 home_snapshot_label="home-sn"
19 USERFULLNAME="Live user"
22 mkdir -p "${mountpoint}"
24 [ -f /etc/live.conf ] && . /etc/live.conf
25 export USERNAME USERFULLNAME HOSTNAME
27 . /scripts/live-helpers
29 if [ ! -f /live.vars ]
38 for ARGUMENT in $(cat /proc/cmdline)
42 ACCESS="${ARGUMENT#access=}"
47 DEFCONSOLE="${ARGUMENT#*=}"
59 FETCH="${ARGUMENT#fetch=}"
64 HOSTNAME="${ARGUMENT#hostname=}"
66 export HOSTNAME LIVECONF
70 USERNAME="${ARGUMENT#username=}"
72 export USERNAME LIVECONF
76 USERFULLNAME="${ARGUMENT#userfullname=}"
78 export USERFULLNAME LIVECONF
87 STATICIP="${ARGUMENT#ip=}"
89 if [ -z "${STATICIP}" ]
97 keyb=*|kbd-chooser/method=*)
102 klayout=*|console-setup/layoutcode=*)
103 KLAYOUT="${ARGUMENT#*=}"
107 kvariant=*|console-setup/variantcode=*)
108 KVARIANT="${ARGUMENT#*=}"
112 kmodel=*|console-setup/modelcode=*)
113 KMODEL="${ARGUMENT#*=}"
118 KOPTIONS="${ARGUMENT#koptions=}"
127 live-media=*|bootfrom=*)
128 LIVE_MEDIA="${ARGUMENT#*=}"
132 live-media-encryption=*|encryption=*)
133 LIVE_MEDIA_ENCRYPTION="${ARGUMENT#*=}"
134 export LIVE_MEDIA_ENCRYPTION
138 LIVE_MEDIA_OFFSET="${ARGUMENT#live-media-offset=}"
139 export LIVE_MEDIA_OFFSET
143 LIVE_MEDIA_PATH="${ARGUMENT#live-media-path=}"
144 export LIVE_MEDIA_PATH
147 live-media-timeout=*)
148 LIVE_MEDIA_TIMEOUT="${ARGUMENT#live-media-timeout=}"
149 export LIVE_MEDIA_TIMEOUT
152 locale=*|debian-installer/locale=*)
153 LOCALE="${ARGUMENT#*=}"
158 MODULE="${ARGUMENT#module=}"
163 NETBOOT="${ARGUMENT#netboot=}"
168 NFSOPTS="${ARGUMENT#nfsopts=}"
173 NFS_COW="${ARGUMENT#nfscow=}"
178 NOACCESSIBILITY="Yes"
179 export NOACCESSIBILITY
203 NOCONSOLEKEYBOARD="Yes"
204 export NOCONSOLEKEYBOARD
228 NOKPERSONALIZER="Yes"
229 export NOKPERSONALIZER
238 NOLANGUAGESELECTOR="Yes"
239 export NOLANGUAGESELECTOR
253 NOPOWERMANAGEMENT="Yes"
254 export NOPOWERMANAGEMENT
258 NOPROGRAMCRASHES="Yes"
259 export NOPROGRAMCRASHES
263 NORESTRICTEDMANAGER="Yes"
264 export NORESTRICTEDMANAGER
278 NOUPDATENOTIFIER="Yes"
279 export NOUPDATENOTIFIER
294 export NOXSCREENSAVER
307 preseed/file=*|file=*)
308 LOCATION="${ARGUMENT#*=}"
318 location="${ARGUMENT#url=}"
320 mount -n -o bind /sys /root/sys
321 mount -n -o bind /proc /root/proc
322 mount -n -o bind /dev /root/dev
324 mkdir -p /root/var/run/network
326 chroot /root wget -P /tmp "${location}"
327 chroot /root ifdown -a
333 LOCATION="/tmp/$(basename "${location}")"
337 question="${ARGUMENT%%=*}"
338 value="${ARGUMENT#*=}"
339 PRESEEDS="${PRESEEDS}\"${question}=${value}\" "
354 TIMEZONE="${ARGUMENT#timezone=}"
364 TODISK="${ARGUMENT#todisk=}"
375 MODULETORAM="${ARGUMENT#toram=}"
376 export TORAM MODULETORAM
385 UNIONTYPE="${ARGUMENT#union=}"
390 UTC="${ARGUMENT#utc=}"
400 XVIDEOMODE="${ARGUMENT#xvideomode=}"
406 # sort of compatibility with netboot.h from linux docs
407 if [ -z "${NETBOOT}" ]
409 if [ "${ROOT}" = "/dev/nfs" ]
413 elif [ "${ROOT}" = "/dev/cifs" ]
420 if [ -z "${MODULE}" ]
426 if [ -z "${UNIONTYPE}" ]
437 if [ -d "${DIRECTORY}"/"${LIVE_MEDIA_PATH}" ]
439 for FILESYSTEM in squashfs ext2 ext3 xfs dir
441 if [ "$(echo ${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM})" != "${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}" ]
453 if [ "${IGNORE_UUID}" ] || [ ! -e /conf/uuid.conf ]
459 uuid="$(cat /conf/uuid.conf)"
461 for try_uuid_file in "${mountpoint}/.disk/casper-uuid"*
463 [ -e "${try_uuid_file}" ] || continue
465 try_uuid="$(cat "${try_uuid_file}")"
467 if [ "${uuid}" = "${try_uuid}" ]
476 get_backing_device ()
479 *.squashfs|*.ext2|*.ext3)
480 echo $(setup_loop "${1}" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}")
488 panic "Unrecognized live filesystem: ${1}"
493 match_files_in_dir ()
495 # Does any files match pattern ${1} ?
498 if [ "$(echo ${pattern})" != "${pattern}" ]
506 mount_images_in_directory ()
513 if match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.squashfs" ||
514 match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.ext2" ||
515 match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.ext3" ||
516 match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.dir"
518 [ -n "${mac}" ] && adddirectory="${directory}/${LIVE_MEDIA_PATH}/${mac}"
519 setup_unionfs "${directory}/${LIVE_MEDIA_PATH}" "${rootmnt}" "${adddirectory}"
527 sysfs_path="${1#/sys}"
529 if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-[ide|scsi|usb])"
539 # FIXME: do something better like the scan of supported filesystems
543 vfat|iso9660|udf|ext2|ext3|ntfs)
555 copyto="${copyfrom}_swap"
557 if [ -z "${MODULETORAM}" ]
559 size=$(fs_size "" ${copyfrom} "used")
561 MODULETORAMFILE="${copyfrom}/${LIVE_MEDIA_PATH}/${MODULETORAM}"
563 if [ -f "${MODULETORAMFILE}" ]
565 size=$( expr $(ls -la ${MODULETORAMFILE} | awk '{print $5}') / 1024 + 5000 )
567 log_warning_msg "Error: toram-module ${MODULETORAM} (${MODULETORAMFILE}) could not be read."
572 if [ "${copytodev}" = "ram" ]
575 freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( cat /proc/meminfo | grep Cached | head -n 1 | awk '/Cached/{print $2}' - ) )
576 mount_options="-o size=${size}k"
581 # it should be a writable block device
582 if [ -b "${copytodev}" ]
586 fstype=$(get_fstype "${dev}")
587 freespace=$(fs_size "${dev}")
589 [ "$quiet" != "y" ] && log_warning_msg "${copytodev} is not a block device."
594 if [ "${freespace}" -lt "${size}" ]
596 [ "${quiet}" != "y" ] && log_warning_msg "Not enough free ${free_string} (${freespace}k free, ${size}k needed) to copy live media in ${copytodev}."
600 # begin copying (or uncompressing)
602 echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"
603 mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"
605 if [ "${extension}" = "tgz" ]
608 tar zxf "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
609 rm -f "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
610 mount -r --move "${copyto}" "${rootmnt}"
613 if [ -n "${MODULETORAMFILE}" ]
615 cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
617 cp -a ${copyfrom}/* ${copyto} # "cp -a" from busybox also copies hidden files
622 mount -r --move ${copyto} ${copyfrom}
633 modprobe -q af_packet # For DHCP
638 ipconfig ${DEVICE} | tee /netboot.config
640 # source relevant ipconfig output
641 OLDHOSTNAME=${HOSTNAME}
642 . /tmp/net-${DEVICE}.conf
643 [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
646 if [ "${NFSROOT}" = "auto" ]
648 NFSROOT=${ROOTSERVER}:${ROOTPATH}
651 if [ -n "${FETCH}" ] && do_httpmount
657 if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ]
659 NFSROOT=${ROOTSERVER}:${NFSROOT}
662 [ "${quiet}" != "y" ] && log_begin_msg "Trying netboot from ${NFSROOT}"
664 if [ "${NETBOOT}" != "nfs" ] && do_cifsmount
674 [ "${quiet}" != "y" ] && log_end_msg
681 extension=$(echo "${FETCH}" | sed 's/\(.*\)\.\(.*\)/\2/')
683 case "${extension}" in
685 [ "${quiet}" != "y" ] && log_begin_msg "Trying wget ${FETCH} -O ${mountpoint}/$(basename ${FETCH})"
686 mkdir -p "${mountpoint}/${LIVE_MEDIA_PATH}"
687 wget "${FETCH}" -O "${mountpoint}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
688 [ ${?} -eq 0 ] && rc=0
689 [ "${extension}" = "tgz" ] && live_dest="ram"
693 [ "${quiet}" != "y" ] && log_begin_msg "Unrecognized archive extension for ${FETCH}"
705 if [ -z "${NFSOPTS}" ]
710 [ "${quiet}" != "y" ] && log_begin_msg "Trying nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}"
712 # FIXME: This for loop is an ugly HACK round an nfs bug
713 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13
715 nfsmount -o nolock -o ro ${NFSOPTS} "${NFSROOT}" "${mountpoint}" && rc=0 && break
726 if [ -x "/sbin/mount.cifs" ]
728 if [ -z "${NFSOPTS}" ]
730 CIFSOPTS="-ouser=root,password="
732 CIFSOPTS="${NFSOPTS}"
735 [ "${quiet}" != "y" ] && log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}"
738 if mount.cifs "${NFSROOT}" "${mountpoint}" "${CIFSOPTS}"
752 size=$(fs_size "${fromdev}" "" "used")
754 if [ -b "${fromdev}" ]
757 if [ -n "${HOMEMOUNTED}" -a "${snap_type}" = "HOME" ]
759 todev=$(cat /proc/mounts | grep -s " $(base_path ${todir}) " | awk '{print $1}' )
760 freespace=$(df -k | grep -s ${todev} | awk '{print $4}')
762 freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( cat /proc/meminfo | grep Cached | head -n 1 | awk '/Cached/{print $2}' - ))
765 tomount="/mnt/tmpsnap"
767 if [ ! -d "${tomount}" ]
769 mkdir -p "${tomount}"
772 fstype=$(get_fstype "${fromdev}")
774 if [ -n "${fstype}" ]
777 mount -t "${fstype}" -o ro,noatime "${fromdev}" "${tomount}"
778 cp -a "${tomount}"/* ${todir}
781 log_warning_msg "Unrecognized fstype: ${fstype} on ${fromdev}:${snap_type}"
786 if echo ${fromdev} | grep -qs loop
788 losetup -d "${fromdev}"
795 [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the snapshot ${snap_type} medium"
801 # Look for ${snap_label}.* in block devices and copy the contents to ${snap_mount}
802 # and remember the device and filename for resync on exit in live-initramfs.init
807 snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3")
809 if [ ! -z "${snapdata}" ]
811 snapdev="$(echo ${snapdata} | cut -f1 -d ' ')"
812 snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
813 snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
815 if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\)'
817 # squashfs or ext2/ext3 snapshot
818 dev=$(get_backing_device "${snapback}/${snapfile}")
820 if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"
822 log_warning_msg "Impossible to include the ${snapfile} Snapshot"
827 if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio -i -u -d 2>/dev/null)
829 log_warning_msg "Impossible to include the ${snapfile} Snapshot"
836 dev=$(find_cow_device "${snap_label}")
840 if echo "${dev}" | grep -qs loop
842 # strange things happens, user confused?
843 snaploop=$( losetup ${dev} | awk '{print $3}' | tr -d '()' )
844 snapfile=$(basename ${snaploop})
845 snapdev=$(cat /proc/mounts | awk '{print $2,$1}' | grep -es "^$( dirname ${snaploop} )" | cut -f2 -d ' ')
850 if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"
852 log_warning_msg "Impossible to include the ${snap_label} Snapshot"
855 if [ -n "${snapfile}" ]
857 # it was a loop device, user confused
862 log_warning_msg "Impossible to include the ${snap_label} Snapshot"
867 echo "export ${snap_type}SNAP="${snap_mount}":${snapdev}:${snapfile}" >> /etc/live.conf # for resync on reboot/halt
873 image_directory="${1}"
875 addimage_directory="${3}"
876 modprobe -q -b ${UNIONTYPE}
878 # run-init can't deal with images in a subdir, but we're going to
879 # move all of these away before it runs anyway. No, we're not,
880 # put them in / since move-mounting them into / breaks mono and
885 # Let's just mount the read-only file systems first
888 minor_kernel_version=$(uname -r|cut -c 5-|sed 's/[^0-9].*//')
890 if [ "${NETBOOT}" = "nfs" ] && [ "${minor_kernel_version}" -lt 22 ]
892 # go aroung a bug in nfs-unionfs locking for unionfs <= 1.4
898 # Read image names from ${MODULE}.module if it exists
899 if [ -e "${image_directory}/filesystem.${MODULE}.module" ]
901 for IMAGE in $(cat ${image_directory}/filesystem.${MODULE}.module)
903 image_string="${image_string} ${image_directory}/${IMAGE}"
905 elif [ -e "${image_directory}/${MODULE}.module" ]
907 for IMAGE in $(cat ${image_directory}/${MODULE}.module)
909 image_string="${image_string} ${image_directory}/${IMAGE}"
912 # ${MODULE}.module does not exist, create a list of images
913 for FILESYSTEM in squashfs ext2 ext3 xfs dir
915 for IMAGE in "${image_directory}"/*."${FILESYSTEM}"
919 image_string="${image_string} ${IMAGE}"
924 if [ -n "${addimage_directory}" ] && [ -d "${addimage_directory}" ]
926 for FILESYSTEM in squashfs ext2 ext3 xfs dir
928 for IMAGE in "${addimage_directory}"/*."${FILESYSTEM}"
932 image_string="${image_string} ${IMAGE}"
939 image_string="$(echo ${image_string} | sed -e 's/ /\n/g' | sort )"
942 [ -n "${MODULETORAMFILE}" ] && image_string="${image_directory}/$(basename ${MODULETORAMFILE})"
946 for image in ${image_string}
948 imagename=$(basename "${image}")
952 # it is a plain directory: do nothing
953 rofsstring="${image}=${roopt}:${rofsstring}"
954 rofslist="${image} ${rofslist}"
955 elif [ -f "${image}" ]
957 backdev=$(get_backing_device "${image}")
958 fstype=$(get_fstype "${backdev}")
960 if [ "${fstype}" = "unknown" ]
962 panic "Unknown file system type on ${backdev} (${image})"
965 mkdir -p "${croot}/${imagename}"
966 echo "debug: Can not mount backdev ${backdev} (image = ${image}) on croot/imagename ${croot}/${imagename}"
967 mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
971 rofsstring=${rofsstring%:}
975 # Looking for "${root_persistence}" device or file
976 if [ -n "${PERSISTENT}" ]
978 cowprobe=$(find_cow_device "${root_persistence}")
980 if [ -b "${cowprobe}" ]
982 cowdevice=${cowprobe}
983 cow_fstype=$(get_fstype "${cowprobe}")
985 [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent medium"
989 elif [ -n "${NFS_COW}" ]
991 # check if there are any nfs options
992 if echo ${NFS_COW}|grep -q ','
994 nfs_cow_opts="-o nolock,$(echo ${NFS_COW}|cut -d, -f2-)"
995 nfs_cow=$(echo ${NFS_COW}|cut -d, -f1)
997 nfs_cow_opts="-o nolock"
1003 cowdevice=$(echo ${nfs_cow}|sed "s/client_mac_address/${mac}/")
1006 panic "unable to determine mac address"
1013 if [ "${cow_fstype}" = "nfs" ]
1015 [ "${quiet}" != "y" ] && log_begin_msg \
1016 "Trying nfsmount ${nfs_cow_opts} ${cowdevice} /cow"
1017 nfsmount ${nfs_cow_opts} ${cowdevice} /cow || \
1018 panic "Can not mount ${cowdevice} on /cow"
1020 mount ${cowdevice} -t ${cow_fstype} -o rw,noatime /cow || \
1021 panic "Can not mount ${cowdevice} on /cow"
1024 rofscount=$(echo ${rofslist} |wc -w)
1026 if [ -n "${EXPOSED_ROOT}" ]
1028 if [ ${rofscount} -ne 1 ]
1030 panic "only one RO file system supported with exposedroot: ${rofslist}"
1032 exposedrootfs=${rofslist%% }
1034 mount --bind ${exposedrootfs} ${rootmnt} || \
1035 panic "bind mount of ${exposedrootfs} failed"
1037 cow_dirs='/var/tmp /var/lock /var/run /var/log /var/spool
1038 /home /var/lib/live'
1040 for dir in ${cow_dirs}; do
1042 mount -t ${UNIONTYPE} \
1043 -o rw,noatime,dirs=/cow${dir}=rw:${exposedrootfs}${dir}=ro \
1044 ${UNIONTYPE} "${rootmnt}${dir}" || \
1045 panic "mount ${UNIONTYPE} on ${rootmnt}${dir} failed with option \
1046 rw,noatime,dirs=/cow${dir}=rw:${exposedrootfs}${dir}=ro"
1049 mount -t ${UNIONTYPE} -o noatime,dirs=/cow=rw:${rofsstring} \
1050 ${UNIONTYPE} "${rootmnt}" || panic "mount ${UNIONTYPE} on \
1051 ${rootmnt} failed with option noatime,dirs=/cow=rw:${rofsstring}"
1054 # tmpfs file systems
1055 mkdir -p "${rootmnt}/live"
1056 mount -t tmpfs tmpfs ${rootmnt}/live
1058 # Adding other custom mounts
1059 if [ -n "${PERSISTENT}" ]
1061 # directly mount /home
1062 # FIXME: add a custom mounts configurable system
1063 homecow=$(find_cow_device "${home_persistence}" )
1065 if [ -b "${homecow}" ]
1067 mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home"
1068 export HOMEMOUNTED=1 # used to proper calculate free space in do_snap_copy()
1070 [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent home medium"
1073 # Look for other snapshots to copy in
1074 try_snap "${root_snapshot_label}" "${rootmnt}" "ROOT"
1075 try_snap "${home_snapshot_label}" "${rootmnt}/home" "HOME"
1078 if [ -n "${SHOWMOUNTS}" ]
1080 for d in ${rofslist}
1082 mkdir -p "${rootmnt}/live/${d##*/}"
1086 # do nothing # mount -o bind "${d}" "${rootmnt}/live/${d##*/}"
1090 mount --move "${d}" "${rootmnt}/live/${d##*/}"
1096 # shows cow fs on /cow for use by live-snapshot
1097 mkdir -p "${rootmnt}/live/cow"
1098 mount -o move /cow "${rootmnt}/live/cow"
1105 skip_uuid_check="${3}"
1107 if [ -z "${devname}" ]
1109 devname=$(sys2dev "${sysdev}")
1112 if [ -n "${LIVE_MEDIA_OFFSET}" ]
1114 loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '')
1115 devname="${loopdevname}"
1118 fstype=$(get_fstype "${devname}")
1120 if is_supported_fs ${fstype}
1122 mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
1124 if is_live_path ${mountpoint} && \
1125 ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
1130 umount ${mountpoint}
1134 if [ -n "${LIVE_MEDIA_OFFSET}" ]
1136 losetup -d "${loopdevname}"
1146 # first look at the one specified in the command line
1147 if [ ! -z "${LIVE_MEDIA}" ]
1149 if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check"
1155 # don't start autodetection before timeout has expired
1156 if [ -n "${LIVE_MEDIA_TIMEOUT}" ]
1158 if [ "${timeout}" -lt "${LIVE_MEDIA_TIMEOUT}" ]
1164 # or do the scan of block devices
1165 for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram)
1167 devname=$(sys2dev "${sysblock}")
1168 fstype=$(get_fstype "${devname}")
1170 if /lib/udev/cdrom_id ${devname} > /dev/null
1172 if check_dev "null" "${devname}"
1176 elif is_nice_device "${sysblock}"
1178 for dev in $(subdevices "${sysblock}")
1180 if check_dev "${dev}"
1185 elif [ "${fstype}" = "squashfs" -o \
1186 "${fstype}" = "ext2" -o \
1187 "${fstype}" = "ext3" ]
1189 # This is an ugly hack situation, the block device has
1190 # an image directly on it. It's hopefully
1191 # live-initramfs, so take it and run with it.
1192 ln -s "${devname}" "${devname}.${fstype}"
1193 echo "${devname}.${fstype}"
1203 if [ -x /sbin/usplash_write ]
1205 /sbin/usplash_write "PULSATE"
1209 set_usplash_timeout ()
1211 if [ -x /sbin/usplash_write ]
1213 /sbin/usplash_write "TIMEOUT 120"
1227 [ "${quiet}" != "y" ] && log_begin_msg "Running /scripts/live-premount"
1229 run_scripts /scripts/live-premount
1230 [ "${quiet}" != "y" ] && log_end_msg
1232 # Needed here too because some things (*cough* udev *cough*)
1233 # changes the timeout
1237 if [ ! -z "${NETBOOT}" ] || [ ! -z "${FETCH}" ]
1241 livefs_root="${mountpoint}"
1243 panic "Unable to find a live file system on the network"
1246 # Scan local devices for the image
1247 for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
1249 livefs_root=$(find_livefs ${i})
1251 if [ -n "${livefs_root}" ]
1260 if [ -z "${livefs_root}" ]
1262 panic "Unable to find a medium containing a live file system"
1268 elif [ "${TODISK}" ]
1270 live_dest="${TODISK}"
1273 if [ "${live_dest}" ]
1275 log_begin_msg "Copying live media to ${live_dest}"
1276 copy_live_to "${livefs_root}" "${live_dest}"
1280 if [ -n "${MODULETORAMFILE}" ]
1282 setup_unionfs "${livefs_root}" "${rootmnt}"
1285 mac="$(echo ${mac} | sed 's/-//g')"
1286 mount_images_in_directory "${livefs_root}" "${rootmnt}" "${mac}"
1291 maybe_break live-bottom
1292 [ "${quiet}" != "y" ] && log_begin_msg "Running /scripts/live-bottom"
1295 run_scripts /scripts/live-bottom
1296 [ "${quiet}" != "y" ] && log_end_msg
1300 cp live.log "${rootmnt}/var/log/"