From: Daniel Baumann Date: Sun, 18 Apr 2010 18:42:11 +0000 (+0200) Subject: Adding upstream version 1.177.1. X-Git-Tag: upstream/1.177.1 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=refs%2Ftags%2Fupstream%2F1.177.1;p=live-boot-grml.git Adding upstream version 1.177.1. --- diff --git a/docs/ChangeLog.casper b/docs/ChangeLog.casper index 8fd98ea..5457e52 100644 --- a/docs/ChangeLog.casper +++ b/docs/ChangeLog.casper @@ -1,3 +1,51 @@ +casper (1.177) karmic; urgency=low + + * Port from Debian (thanks, Daniel Baumann): + - Added live-media-path as suggested by Jordi Pujol. + - Tail casper.log and show its messages during boot (thanks, Michal + Suchanek; LP: #363886). + + -- Colin Watson Thu, 04 Jun 2009 03:10:59 +0100 + +casper (1.176) karmic; urgency=low + + [ Colin Watson ] + * Fix symlinking of anacron to /bin/true. + + [ Martin Pitt ] + * Drop scripts/casper-bottom/38jockey_disable_check: Some drivers, like wl + or printer drivers, do need to be advertised in a live system. Jockey has + been fixed to not advertise video drivers automatically if the packages + aren't available (such as in the live system), and even if we should ever + put them back, it is easier to disable the notifications in jockey's + handlers instead of here. (LP: #381687) + + -- Martin Pitt Tue, 02 Jun 2009 15:40:05 +0200 + +casper (1.175) karmic; urgency=low + + * Suppress error message if + /root/usr/share/applications/firefox-fav.desktop doesn't exist. + * Add unionfs-fuse support. + * Automatically fall back to unionfs-fuse if the default union filesystem + is not available but unionfs-fuse is. + + -- Colin Watson Sun, 24 May 2009 12:28:00 +0100 + +casper (1.174) karmic; urgency=low + + * debian/control: Increase dependency on initramfs-tools to get the version + that uses blkid, depend on util-linux as well + * hooks/casper: No need to copy vol_id into the initramfs image.· + * scripts/casper-bottom/13swap: Use blkid -o udev -p instead of vol_id, + there's probably a much cleaner way to check for RAID like this, but + this is the direct equivalent. + * scripts/casper-helpers (get_fstype): use a blkid call to get the type· + * scripts/casper-helpers (find_cow_device): use a blkid call to get the + label + + -- Scott James Remnant Tue, 12 May 2009 13:29:41 +0100 + casper (1.173) jaunty; urgency=low * Don't use head -n1 in where_is_mounted, we don't have head in the diff --git a/hooks/live b/hooks/live index 6862407..5973d20 100755 --- a/hooks/live +++ b/hooks/live @@ -116,6 +116,12 @@ manual_add_modules unlzma manual_add_modules aufs manual_add_modules unionfs +# Filesystem: unionfs-fuse +if [ -x /usr/bin/unionfs-fuse ] +then + copy_exec /usr/bin/unionfs-fuse /bin +fi + # Filesystem: vfat manual_add_modules nls_cp437 manual_add_modules nls_iso8859-1 diff --git a/scripts/live b/scripts/live index f79eaff..0fb6adf 100755 --- a/scripts/live +++ b/scripts/live @@ -762,16 +762,8 @@ do_netmount () modprobe -q af_packet # For DHCP - if [ -x /sbin/udevadm ] - then - # lenny - udevadm trigger - udevadm settle - else - # etch - udevtrigger - udevsettle - fi + udevadm trigger + udevadm settle ipconfig ${DEVICE} | tee /netboot.config @@ -1094,7 +1086,25 @@ setup_unionfs () image_directory="${1}" rootmnt="${2}" addimage_directory="${3}" - modprobe -q -b ${UNIONTYPE} + + case ${UNIONTYPE} in + aufs|unionfs) + modprobe -q -b ${UNIONTYPE} + + if ! cut -f2 /proc/filesystems | grep -q "^${UNIONTYPE}\$" && [ -x /bin/unionfs-fuse ] + then + echo "${UNIONTYPE} not available, falling back to unionfs-fuse." + echo "This might be really slow." + + UNIONTYPE="unionfs-fuse" + fi + ;; + esac + + if [ "${UNIONTYPE}" = unionfs-fuse ] + then + modprobe fuse + fi # run-init can't deal with images in a subdir, but we're going to # move all of these away before it runs anyway. No, we're not, @@ -1110,6 +1120,9 @@ setup_unionfs () if [ "${UNIONTYPE}" = "aufs" ] then roopt="rr,noxino" + elif [ "${UNIONTYPE}" = "unionfs-fuse" ] + then + roopt="RO" else roopt="ro" fi @@ -1232,16 +1245,8 @@ setup_unionfs () modprobe -q -b ${module} done - if [ -x /sbin/udevadm ] - then - # lenny - udevadm trigger - udevadm settle - else - # etch - udevtrigger - udevsettle - fi + udevadm trigger + udevadm settle # For some reason, udevsettle does not block in this scenario, # so we sleep for a little while. @@ -1357,16 +1362,27 @@ setup_unionfs () for dir in ${cow_dirs}; do mkdir -p /cow${dir} - mount -t ${UNIONTYPE} \ - -o rw,noatime,dirs=/cow${dir}=rw:${exposedrootfs}${dir}=ro \ - ${UNIONTYPE} "${rootmnt}${dir}" || \ - panic "mount ${UNIONTYPE} on ${rootmnt}${dir} failed with option \ - rw,noatime,dirs=/cow${dir}=rw:${exposedrootfs}${dir}=ro" + + case "${UNIONTYPE}" in + unionfs-fuse) + (ulimit -n 16384; unionfs-fuse -o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid /cow=RW:${exposedrootfs}${dir} "${rootmnt}${dir}" || panic "mount ${UNIONTYPE} on ${rootmnt}${dir} failed with option cow,noinitgroups,default_permissions,allow_other,use_ino,suid=/cow=RW:${exposedrootfs}${dir}") + ;; + + *) + mount -t ${UNIONTYPE} -o rw,noatime,dirs=/cow${dir}=rw:${exposedrootfs}${dir}=ro ${UNIONTYPE} "${rootmnt}${dir}" || panic "mount ${UNIONTYPE} on ${rootmnt}${dir} failed with option rw,noatime,dirs=/cow${dir}=rw:${exposedrootfs}${dir}=ro" + ;; + esac done else - mount -t ${UNIONTYPE} -o noatime,dirs=/cow=rw:${rofsstring} \ - ${UNIONTYPE} "${rootmnt}" || panic "mount ${UNIONTYPE} on \ - ${rootmnt} failed with option noatime,dirs=/cow=rw:${rofsstring}" + case "${UNIONTYPE}" in + unionfs-fuse) + (ulimit -n 16384; unionfs-fuse -o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid /cow=RW:${rofsstring} "${rootmnt}" || panic "mount ${UNIONTYPE} on ${rootmnt} failed with option cow,noinitgroups,default_permissions,allow_other,use_ino,suid=/cow:RW:${rofsstring}") + ;; + + *) + mount -t ${UNIONTYPE} -o noatime,dirs=/cow=rw:${rofsstring} ${UNIONTYPE} "${rootmnt}" || panic "mount ${UNIONTYPE} on ${rootmnt} failed with option noatime,dirs=/cow=rw:${rofsstring}" + ;; + esac fi # Correct the permissions of /: @@ -1409,7 +1425,15 @@ setup_unionfs () ;; *) - mount -o move "${d}" "${rootmnt}/live/${d##*/}" + case "${UNIONTYPE}" in + unionfs-fuse) + mount -o bind "${d}" "${rootmnt}/live/${d##*/}" + ;; + + *) + mount -o move "${d}" "${rootmnt}/live/${d##*/}" + ;; + esac ;; esac done @@ -1730,12 +1754,24 @@ mountroot () log_end_msg + # unionfs-fuse needs /dev to be bind-mounted for the duration of + # live-bottom; udev's init script will take care of things after that + if [ "${UNIONTYPE}" = unionfs-fuse ] + then + mount -n -o bind /dev "${rootmnt}/dev" + fi + maybe_break live-bottom log_begin_msg "Running /scripts/live-bottom\n" run_scripts /scripts/live-bottom log_end_msg + if [ "${UNIONFS}" = unionfs-fuse ] + then + umount "${rootmnt}/dev" + fi + exec 1>&6 6>&- exec 2>&7 7>&- kill ${tailpid} diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab index f1dc2e3..cd78edf 100755 --- a/scripts/live-bottom/12fstab +++ b/scripts/live-bottom/12fstab @@ -66,9 +66,14 @@ then continue fi + # udev (>= 146) no longer provides vol_id if [ -x /lib/udev/vol_id ] then + # lenny /lib/udev/vol_id ${device%%[0-9]*} 2>/dev/null | grep -q "^ID_FS_USAGE=raid" && continue + else + # squeeze + /sbin/blkid -o udev -p ${device%%[0-9]*} | grep -q "^ID_FS_USAGE=raid" && continue fi magic=$(/bin/dd if="${device}" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue diff --git a/scripts/live-bottom/21xvidemode b/scripts/live-bottom/21xvidemode index 1312530..3fb9190 100755 --- a/scripts/live-bottom/21xvidemode +++ b/scripts/live-bottom/21xvidemode @@ -47,29 +47,9 @@ then exit 0 fi -if [ $(cat /root/etc/debian_version | sed 's|\..*$||') -ge 4 ] +if [ -x "$(which xrandr 2>/dev/null)" ] then - # lenny or newer - if [ -x "$(which xrandr 2>/dev/null)" ] - then - echo "xrandr -s ${XVIDEOMODE} || /bin/true" >> /root/etc/X11/Xsession.d/21xvidemode - fi -else - # etch - mount -o bind /sys /root/sys - mount -o bind /proc /root/proc - mount -o bind /dev /root/dev - -chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF -set xserver-xorg/config/monitor/mode-list ${XVIDEOMODE} -set xserver-xorg/config/display/modes ${XVIDEOMODE} -EOF - - chroot /root dexconf - - umount /root/sys - umount /root/proc - umount /root/dev + echo "xrandr -s ${XVIDEOMODE} || /bin/true" >> /root/etc/X11/Xsession.d/21xvidemode fi log_end_msg diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking index 72aaf12..4ebb944 100755 --- a/scripts/live-bottom/23networking +++ b/scripts/live-bottom/23networking @@ -46,16 +46,8 @@ iface lo inet loopback EOF -if [ -x /sbin/udevadm ] -then - # lenny - udevadm trigger - udevadm settle -else - # etch - udevtrigger - udevsettle -fi +udevadm trigger +udevadm settle if [ -z "${NETBOOT}" -a -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ] then diff --git a/scripts/live-bottom/38jockey_disable_check b/scripts/live-bottom/38jockey_disable_check deleted file mode 100755 index 1a642e1..0000000 --- a/scripts/live-bottom/38jockey_disable_check +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -if [ -n "${NOJOCKEY}" ] -then - exit 0 -fi - -. /scripts/live-functions - -log_begin_msg "Disabling jockey driver check" - -rm -f /root/etc/xdg/autostart/jockey*.desktop - -log_end_msg diff --git a/scripts/live-helpers b/scripts/live-helpers index 6edd51c..6777f99 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -76,16 +76,14 @@ is_supported_fs () get_fstype () { - # udev >=146-1 no longer provides vol_id: + # udev (>= 146) no longer provides vol_id if [ -x /lib/udev/vol_id ] then + # lenny /lib/udev/vol_id -t ${1} 2>/dev/null else - eval $(blkid -o udev "${1}") - if [ -n "$ID_FS_TYPE" ] - then - echo "${ID_FS_TYPE}" - fi + # squeeze + /sbin/blkid -s TYPE -o value $1 2>/dev/null fi } @@ -191,14 +189,7 @@ setup_loop () modprobe -q -b "${module}" - if [ -x /sbin/udevadm ] - then - # lenny - udevadm settle - else - # etch - udevsettle - fi + udevadm settle for loopdev in ${pattern} do @@ -350,17 +341,18 @@ find_cow_device () done fi - # udev >=146-1 no longer provides vol_id: + # udev (>= 146) no longer provides vol_id if [ -x /lib/udev/vol_id ] then + # lenny if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ] then echo "${devname}" return 0 fi else - eval $(blkid -o udev "${devname}") - if [ "$ID_FS_LABEL" = "${pers_label}" ] + # squeeze + if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ] then echo "${devname}" return 0 diff --git a/scripts/init-premount/select_eth_device b/scripts/live-premount/select_eth_device similarity index 64% rename from scripts/init-premount/select_eth_device rename to scripts/live-premount/select_eth_device index 4323880..dfeac3d 100755 --- a/scripts/init-premount/select_eth_device +++ b/scripts/live-premount/select_eth_device @@ -30,28 +30,25 @@ for ARGUMENT in $(cat /proc/cmdline); do esac done -if [ "$bootconf" != "BOOT=nfs" ] && [ "$NETBOOT" = "" ]; then - # Not a net boot : nothing to do - exit 0 -fi - -# be sure this has been run (*should* be done by scripts/init-premount/udev) -if [ -x /sbin/udevadm ] +if [ "$bootconf" != "BOOT=nfs" ] && + [ "$NETBOOT" = "" ] && + [ "$FETCH" = "" ] && + [ "$FTPFS" = "" ] && + [ "$HTTPFS" = "" ] then - # lenny - udevadm trigger - udevadm settle -else - # etch - udevtrigger - udevsettle + # Not a net boot : nothing to do + exit 0 fi # we want to do some basic IP modprobe -q af_packet # Available Ethernet interfaces ? -l_interfaces=$(cd /sys/class/net/ && ls -d eth* 2>/dev/null) +l_interfaces="" +echo "Waiting for ethernet card(s) up... If this fails, maybe the ethernet card is not supported by the kernel `uname -r`?" +while [ -z "$l_interfaces" ]; do + l_interfaces="$(cd /sys/class/net/ && ls -d eth* 2>/dev/null)" +done if [ $(echo $l_interfaces | wc -w) -lt 2 ]; then # only one interface : no choice @@ -59,6 +56,18 @@ if [ $(echo $l_interfaces | wc -w) -lt 2 ]; then exit 0 fi +# If user force to use specific device, write it +for ARGUMENT in $(cat /proc/cmdline); do + case "${ARGUMENT}" in + live-netdev=*) + NETDEV="${ARGUMENT#live-netdev=}" + echo "DEVICE=$NETDEV" >> /conf/param.conf + echo "Found live-netdev parameter in /proc/cmdline. Force to use network device $NETDEV." + exit 0 + ;; + esac +done + while true; do echo -n "Looking for a connected Ethernet interface ..."