[or-cvs] r11461: Add QEMU (Windows) to full and setup auto-run so the CD can (in incognito/trunk: . arch/x86/overlay root_overlay/usr/share/incognito)

double at seul.org double at seul.org
Mon Sep 17 19:00:42 UTC 2007


Author: double
Date: 2007-09-17 15:00:42 -0400 (Mon, 17 Sep 2007)
New Revision: 11461

Added:
   incognito/trunk/arch/x86/overlay/autorun.inf
   incognito/trunk/arch/x86/overlay/run.bat
Modified:
   incognito/trunk/ChangeLog
   incognito/trunk/livecd-stage2.sh
   incognito/trunk/root_overlay/usr/share/incognito/readme.html
Log:
Add QEMU (Windows) to full and setup auto-run so the CD can be run without booting.


Modified: incognito/trunk/ChangeLog
===================================================================
--- incognito/trunk/ChangeLog	2007-09-17 18:58:16 UTC (rev 11460)
+++ incognito/trunk/ChangeLog	2007-09-17 19:00:42 UTC (rev 11461)
@@ -1,5 +1,9 @@
 changes since 20070824.1:
 
+	- Full version CD may be run in a virtual PC. For computers that do
+	not allow booting from media this allows Incognito to run on a Windows
+	x86 platform. Note that keystroke recorders may still be able to
+	capture what you type!
 	- On tiny changed back from dhcp to dhcpcd as it is more robust and
 	some cards drop link status after the initial IP address. Full needs
 	to use dhcp because that is what NetworkManager uses.

Added: incognito/trunk/arch/x86/overlay/autorun.inf
===================================================================
--- incognito/trunk/arch/x86/overlay/autorun.inf	                        (rev 0)
+++ incognito/trunk/arch/x86/overlay/autorun.inf	2007-09-17 19:00:42 UTC (rev 11461)
@@ -0,0 +1,3 @@
+[autorun]
+open=run.bat
+

Added: incognito/trunk/arch/x86/overlay/run.bat
===================================================================
--- incognito/trunk/arch/x86/overlay/run.bat	                        (rev 0)
+++ incognito/trunk/arch/x86/overlay/run.bat	2007-09-17 19:00:42 UTC (rev 11461)
@@ -0,0 +1,10 @@
+ at echo off
+echo .
+echo Running Incognito CD/USB in a virtual PC.
+echo .
+echo Type CTRL-ALT-F to toggle fullscreen mode.
+echo .
+
+set DRIVE=%CD:~0,1%
+start /B %DRIVE%:\qemu\qemu.exe -m 256M -localtime -usb -L %DRIVE%://qemu -cdrom //./%DRIVE%: -boot d
+

Modified: incognito/trunk/livecd-stage2.sh
===================================================================
--- incognito/trunk/livecd-stage2.sh	2007-09-17 18:58:16 UTC (rev 11460)
+++ incognito/trunk/livecd-stage2.sh	2007-09-17 19:00:42 UTC (rev 11461)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+source /etc/catalyst/catalyst.conf
+
 # Build a livecd-stage2 ensuring the .svn directories don't make it on
 
 SPEC="$1"
@@ -39,6 +41,9 @@
 	sed -i "s/livecd\/root_overlay:.*/livecd\/root_overlay: ${DIR//\//\\/}\/root_overlay/" "${DIR}/livecd-stage2.spec"
 fi
 
+# Remove SVN directories
+find "${DIR}" -xdev -type d -a -name ".svn" -print0 | xargs -0 rm -rf
+
 # Do branding replacement
 # TODO: Get these two from somewhere else
 INCOGNITO="Incognito"
@@ -63,15 +68,28 @@
 
 export INCOGNITO INCOGNITO_TITLE INCOGNITO_VERSION
 
-# Remove SVN directories
-find "${DIR}" -xdev -type d -a -name ".svn" -print0 | xargs -0 rm -rf
-
 find "${DIR}" -type f | while read FILE; do
 	sed -i "s/__INCOGNITO__/${INCOGNITO//\//\/}/" "${FILE}"
 	sed -i "s/__INCOGNITO_TITLE__/${INCOGNITO_TITLE//\//\/}/" "${FILE}"
 	sed -i "s/__INCOGNITO_VERSION__/${INCOGNITO_VERSION//\//\/}/" "${FILE}"
 done
 
+# Install QEMU
+[[ -e "${DIR}/overlay/run.bat" ]] && QEMU_INSTALL=1
+QEMU_URL="http://www.h6.dion.ne.jp/~kazuw/qemu-win/qemu-0.9.0-windows.zip"
+QEMU_FILE="${distdir}/$(basename ${QEMU_URL})"
+KQEMU_URL="http://www.h6.dion.ne.jp/~kazuw/qemu-win/Kqemu-1.3.0pre11-install.exe"
+KQEMU_FILE="${distdir}/$(basename ${KQEMU_URL})"
+if [[ "${QEMU_INSTALL}" == "1" ]]; then
+	[[ -e "${QEMU_FILE}" ]] || wget -O "${QEMU_FILE}" "${QEMU_URL}"
+	[[ -e "${KQEMU_FILE}" ]] || wget -O "${KQEMU_FILE}" "${KQEMU_URL}"
+	( cd "${DIR}" ; unzip "${QEMU_FILE}" >/dev/null )
+	mkdir "${DIR}/overlay/qemu"
+	for QEMU_TARGET in *.bin *.dll keymaps qemu.exe License; do
+		mv "${DIR}"/qemu-0.9.0-windows/${QEMU_TARGET}  "${DIR}/overlay/qemu"
+	done
+fi
+
 # Build it
 NICECMD=""
 [[ -x "/usr/bin/ionice" ]] && NICECMD="/usr/bin/ionice -c 3"

Modified: incognito/trunk/root_overlay/usr/share/incognito/readme.html
===================================================================
--- incognito/trunk/root_overlay/usr/share/incognito/readme.html	2007-09-17 18:58:16 UTC (rev 11460)
+++ incognito/trunk/root_overlay/usr/share/incognito/readme.html	2007-09-17 19:00:42 UTC (rev 11461)
@@ -436,6 +436,11 @@
 The tiny version gives you the menu option of running the CD/USB from RAM. During the boot process the entire CD is copied into RAM and run from there. The CD will eject at this time or you may remove the USB drive when the boot progress screen is displayed. The full CD is too large for most computers to run from RAM but if you'd like to then hit [Tab] on the boot option and add " docache" after the boot line.
 </p>
 
+<h3>Running the CD from a Windows session</h3>
+<p>
+Incognito full may be run inside a Windows session in case the computer cannot boot media. <a href="http://fabrice.bellard.free.fr/qemu/">QEMU</a> is used to run the CD in a virtual PC. CTRL-ALT-F can be used to make the virtual machine full screen. Note that this will work for Windows 2000/XP or greater. A security concern that is not covered in this case is a keystroke logger. Keystrokes still run through the host operating system and can be logged, so beware.
+</p>
+
 <h2>Configuration copied from USB drive</h2>
 
 <p>



More information about the tor-commits mailing list