+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 <cjwatson@ubuntu.com> 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 <martin.pitt@ubuntu.com> 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 <cjwatson@ubuntu.com> 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 <scott@ubuntu.com> 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
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
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
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,
if [ "${UNIONTYPE}" = "aufs" ]
then
roopt="rr,noxino"
+ elif [ "${UNIONTYPE}" = "unionfs-fuse" ]
+ then
+ roopt="RO"
else
roopt="ro"
fi
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.
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 /:
;;
*)
- 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
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}
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
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
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
+++ /dev/null
-#!/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
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
}
modprobe -q -b "${module}"
- if [ -x /sbin/udevadm ]
- then
- # lenny
- udevadm settle
- else
- # etch
- udevsettle
- fi
+ udevadm settle
for loopdev in ${pattern}
do
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
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
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 ..."