Debian on Windows
This explains how to run Debian on Windows using QEMU for Windows.
The following commands assume that the qemu binaries and files are located in C:\Qemu and C:\Qemu has been added to your path.
Download the Debian ISO image from http://www.debian.org/CD/
Get the debian-503-i386-CD-1.iso (or a more recent version) and save it to a location such as C:\qemu_images. I renamed mine to debian-503.iso. If you download more than just the first iso, then adjust your naming accordingly.
We need to create a disk image file that we can use to load an OS image on. The command used to create these images file is called qemu-img. The qemu-img binary supports multiple formats including raw, cow, qcow and vdmk2 among others. Raw format appears to be the most platform neutral and independent, while the most versatile format appears to be qcow, which supports compression and encryption, as well as copy-on-write (COW). To create our image file to load Debian onto, run the commands:
qemu-img create -f qcow C:\qemu_images\debian-5.img 4G
You can verify that it built out the image the way you expected to by invoking the command:
qemu-img info debian-5.img
You do not need to specify the full path in the above command as qemu-img already knows that.
The information provided by the above command:
image: debian-5.img file format: qcow virtual size: 4.0G (4294967296 bytes) disk size: 17K
The first thing to do is to boot the Debian image off of CDROM or ISO image, yet add in the virtual disk image defined by "-hda debian-5.img". Because we're specifying -boot d, QEMU will boot off the Debian CD or ISO image first.
qemu.exe -L C:\Qemu -m 384 -hda C:\qemu_images\debian-5.img -cdrom C:\qemu_images\debian-503.iso -soundhw all -localtime -boot d
Debian should boot as if booted from a CD. Complete the installation. Debian will be installed to C:\qemu_images\debian-5.img. When it is complete run the following command to load your new Debian installation from the debian-5.img:
qemu.exe -L C:\Qemu -m 384 -hda C:\qemu_images\debian-5.img -cdrom C:\qemu_images\debian-503.iso -soundhw all -localtime
Note that here we don't use the -boot d option and therefore boot from "harddisk" image debian-5.img specified with -hda.
The -cdrom C:\qemu_images\debian-503.iso section tells qemu to use the Debian ISO as the cd that is in the emulated cdrom drive. This will allow you to install additional packages from the cd.
Have fun!
See http://qemu-buch.de/d/Gast-Systeme/_x86-Architektur/_Linux for further information.
Hosted by http://qemu-buch.de