Download the iso from http://www.damnsmalllinux.org/
And run that as a live CD using the command
qemu -cdrom dsl2.5.iso
This tells QEMU to start up with the DSL CD image as the emulated CD-ROM. And there it is -- a beautiful DSL instance. I decided I also wanted to install DSL to an (emulated) hard drive so I could save settings between boots. To do this, I created a 250MB disk image with command:
qemu-img create dsl.img 250M
Boot DSL again and run the installation process (including writing to the emulated master boot record so one could boot from this emulated hard drive image in the future):
qemu -cdrom dsl2.5.iso -boot d dsl.img
When the installation is complete, you could boot into my new DSL installation with the command:
qemu dsl.img
Explained in other way
Unpack your QEMU somewhere (see QemuOnOs). Use the qemu-img.exe command to create a file for the hard disk image. I successfully fit a DSL install in 150 MB. It's pretty tight though, I have only 10MB left after install. I named my file c.img.
You should also have the DSL iso handy. I suggest that you copy it in the qemu folder for convenience. Mine is named dsl-1.5.iso. You only need it there for installation. Open a command prompt and start the emulation with this:
qemu.exe -L . -m 192 -hda c.img -cdrom dsl-1.5.iso -boot d -enable-audio -localtime
See the qemu doc for the meaning of it. -m 192 is the amount of memory to use for the guest OS. Obviously should be adjusted according the the amount of physical memory you have.
If everything goes well, DSL should boot and you should be looking at some X desktop. Open an xterm there (as root, just spend a minute getting familiar with the shell. Right click on the desktop, that's pretty much all you need to know). You need to create a partition on you virtual hard disk. Use fdisk for that. If you don't know how what or why, google it. star fdisk like this:
fdisk /dev/hda
Then at the prompt, it's probably a similar series of command like this (from memory) n, p, 1, , , w. This should create a new primary partition named hda1, filling the entire space of the virtual disk.
Then run the dsl installer:
dsl-hdinstall
And follow the onscreen instructions. At the end of the installation, you should just close the emulated os. Relaunch qemu without the cd image.
qemu.exe -L . -m 192 -hda c.img -boot c -enable-audio -localtime
And then finish the install. With hat last command, I also created a batch file so I just double click to launch the emulation. You can also remove the dsl-1.5.iso as this time.
There you have it. A fully emulated OS. Portable. Litterally. Copy the qemu folder on your thumb drive and you are good to go
See http://qemu-buch.de/d/Gast-Systeme/_x86-Architektur/_Linux for further information.
Hosted by http://qemu-buch.de