Summary

This spec describes adding Qemu to the LiveCD to boot under Win32.

Rationale

Users may find themselves unwilling to try a LiveCD or make the switch to Ubuntu; a virtualized LiveCD would give users a way to use Ubuntu easily until they feel comfortable enough to commit.

Use cases

There are several.

Scope

The LiveCD should offer to run inside Qemu under Win32.

Design

Use Qemu for emulation to execute the LiveCD directly.

Use Qvm86 for virtualization when ready, and only with the user's explicit consent.

Unaccellerated Qemu

The Qvm86 and Kqemu modules function as Windows drivers; in many cases, users may not wish to install these. Security flaws in the design or implementation of these modules may expose the end user to root kits; we should therefor target primarily unaccelerated Qemu environments.

The LiveCD runs fairly well under Qemu without Qvm86; operations may be slightly slow. Recent versions of Qemu (0.8.2) seem to be workable to a point; Kqemu seems to double emulation speed, Qvm86 should provide approximately the same gains when it's workable. We can probably claim Qemu runs Ubuntu at 1/5 to 1/2 your machine's full speed.

See LiveCDQemuWin32/Benchmarks for more benchmarks.

Once loaded, both systems seem rather responsive; Edgy seems much more responsive than Dapper, especially in terms of screen drawing. Feisty has not been tested yet; but should supply some enhancements:

Implementation

The CD should have a section in the Windows auto-run catalog about running the CD as a LiveCD. This section should mention the ability to run it in a slower, emulated environment:

You can try out Ubuntu by using this CD as a LiveCD.  A LiveCD supplies a functional desktop without installation to the hard disk; the entire Ubuntu Linux operating system and all applications run from the CD.

To use the LiveCD, reboot your computer with this CD in the drive.  The boot menu will offer you the option to Start or Install Ubuntu; this option will take you to the Ubuntu Linux desktop.  If you only wish to use Ubuntu as a LiveCD, then simply do not click the "Install" icon on the desktop.

Alternately, you can try out the LiveCD from within your current operating system.  This CD can launch an emulator which will run Ubuntu at 1/5 to 1/2 your computer's current speed.  Some functions may not work in this mode, and the system may feel slightly sluggish.  You can safely close the window Ubuntu is running in when finished.

It should be noted that Qvm86 functions as a Windows driver; users may not wish to install this driver even when it becomes an option.

Code

The below code runs Qemu with the CD in Windows D:, booting from the CD:

C:\qemu> qemu -L . -cdrom //./d: -net user -net nic -m 384

Broken down, this command does the following:

Current Status:

make -fwin32/Makefile.gcc zlib1.dll
sudo cp -a zlib.h zconf.h /usr/i586-mingw32msvc/include
sudo cp -a libzdll.a /usr/i586-mingw32msvc/lib/libz.a
paul@katu:~/src/upload/qemu-win32/qemu-0.8.0$ cp -a ../zlib-1.2.3/upstream/tarballs/zlib-1.2.3/zlib1.dll .
paul@katu:~/src/upload/qemu-win32/qemu-0.8.0$ wine ./qemu-img.exe
qemu-img version 0.8.0, Copyright (c) 2004-2005 Fabrice Bellard
usage: qemu-img command [command options]

$ cp -a ../../sdl-1.2.9-win32/bin/SDL.dll .
paul@katu:~/src/upload/qemu-win32/qemu-0.8.0$ wine ./i386-softmmu/qemu.exe  | head
QEMU PC emulator version 0.8.0, Copyright (c) 2003-2005 Fabrice Bellard
usage: qemu [options] [disk_image]

Hzzzzah!

More links:

Data preservation and migration

Outstanding issues

http://fabrice.bellard.free.fr/qemu/qemu-doc.html#TOC56

http://www.libsdl.org/release/SDL-devel-1.2.9-mingw32.tar.gz

sudo apt-get install mingw32-binutils mingw32 mingw32-runtime

cp -al qemu-0.8.0/ qemu-0.8.0-win32

export PATH=/home/paul/src/upload/sdl-1.2.9-win32/bin/:$PATH
./configure --enable-mingw32 --cross-prefix=i586-mingw32msvc-

ERROR: "i586-mingw32msvcgcc" looks like gcc 4.x
QEMU is known to have problems when compiled with gcc 4.x
It is recommended that you use gcc 3.x to build QEMU
To use this compiler anyway, configure with --disable-gcc-check

make install

*lots of errors*

BoF agenda and discussion


CategorySpec

LiveCDQemuWin32 (last edited 2008-08-06 16:15:37 by localhost)