Hi.

These are patches to use cryptsetup volumes for persistent storage and to explicitly set Xorg video driver.

Cryptsetup must be used with usual "cryptopts=source=UUID=$(UUID),target=$(TARGET)". For USB devices it may be necessary to specify "rootdelay=$SECONDS" in order to wait for USB media.

Xdriver is specifed with "xdriver=$(DRIVER)". This is because fglrx (and possibly other drivers) are not detected correctly

Bye.



--- /usr/share/initramfs-tools/scripts/live-bottom/21xdriver	1969-12-31 18:00:00.000000000 -0600
+++ config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/21xdriver	2008-02-25 20:39:54.000000000 -0600
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+#set -e
+
+# initramfs-tools header
+
+PREREQ=""
+
+prereqs()
+{
+	echo "${PREREQ}"
+}
+
+case "${1}" in
+	prereqs)
+		prereqs
+		exit 0
+		;;
+esac
+
+# live-initramfs header
+
+if [ -n "${NOXAUTOCONFIG}" ]
+then
+	exit 0
+fi
+
+. /scripts/live-functions
+
+log_begin_msg "Configuring X kludges..."
+
+# live-initramfs script
+
+if [ -n "$XDRIVER" ]
+then
+	mount -n -o bind /sys /root/sys
+	mount -n -o bind /proc /root/proc
+	mount -n -o bind /dev /root/dev
+
+chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
+set xserver-xorg/autodetect_video_card false
+set xserver-xorg/config/device/driver ${XDRIVER}
+EOF
+
+	chroot /root dexconf
+
+	umount /root/sys
+	umount /root/proc
+	umount /root/dev
+fi
+
+log_end_msg
--- /usr/share/initramfs-tools/scripts/live	2007-11-18 10:21:41.000000000 -0600
+++ config/chroot_local-includes/usr/share/initramfs-tools/scripts/live	2008-02-16 05:05:59.000000000 -0600
@@ -396,6 +396,11 @@
 				export XDEBCONF
 				;;
 
+			xdriver=*)
+			        XDRIVER="${ARGUMENT#xdriver=}"
+				export XDRIVER
+				;;
+
 			xvideomode=*)
 				XVIDEOMODE="${ARGUMENT#xvideomode=}"
 				export XVIDEOMODE
@@ -1162,7 +1167,7 @@
 	fi
 
 	# or do the scan of block devices
-	for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram)
+	for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v 'dm-')
 	do
 		devname=$(sys2dev "${sysblock}")
 		fstype=$(get_fstype "${devname}")
@@ -1216,6 +1221,11 @@
 
 mountroot ()
 {
+    
+        if [ -x /scripts/local-top/cryptroot ]; then
+	    /scripts/local-top/cryptroot
+	fi
+
 	exec 6>&1
 	exec 7>&2
 	exec > live.log
--- /usr/share/initramfs-tools/scripts/live-helpers	2007-11-18 10:21:41.000000000 -0600
+++ config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-helpers	2008-02-16 05:10:24.000000000 -0600
@@ -34,6 +34,13 @@
 	local FSTYPE
 	local FSSIZE
 
+	# fstype misreports LUKS devices
+	is_luks "${1}"
+	if [ $? -eq 0 ]; then
+	    /lib/udev/vol_id -t ${1} 2>/dev/null
+	    return
+	fi
+
 	eval $(fstype < ${1})
 
 	if [ "${FSTYPE}" != "unknown" ]
@@ -306,3 +313,16 @@
 
 	echo ${mac}
 }
+
+is_luks()
+{
+    devname="${1}"
+    if [ -x /sbin/cryptsetup ]
+    then
+	/sbin/cryptsetup isLuks "${devname}" 2>/dev/null
+	return $?
+    else
+	return 1
+    fi
+
+}
_______________________________________________
debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to