Running Linux on Windows Like Normal Programs

Using small Linux distro like Puppy Linux and open source emulator like QEMU, it is possible to run and stop Linux like normal windows programs. By creating virtual hard disks and using software like WinImage you can actually transfer data between Linux and Window. You can also create a virtual network between Windows and the guest OS for sharing and transferring files. And not to forget SAMBA in this context.

Screenshot of Puppy Linux

About Puppy Linux

1. Its small size 60-70 MB with full fledged GUI.
2. Rich collection of software like text editors, Mozilla, multimedia players ,ghostscript and support for networking.
3. Nice GUI tools for performing common and configuration tasks. This is something which windows users are very used to.
4. It even has a small web server and Tcl/Tk.

About QEMU

QEMU is an open source and fast emulator. The best thing about it is size (only 6MB).Though for now windows port is in alpha stage, it rocks. I like its simple command line interface for starting.

Getting Started

First download QEMU for Windows (Alpha)and unzip it to some directory.QEMU comes with a demonstration Linux distro image. Open the qemu-win.bat file, you see the following:

REM Start qemu on windows.
START qemu.exe -L . -m 128 -hda linux.img -enable-audio -localtime

Now download puppy Linux from any of its sites. I downloaded puppy-1.0.3-mozilla.iso which is about 62 MB in size. It has Mozilla as default browser. Copy it to same directory as qemu-win.bat file. Modify the qemu-win.bat file to:

REM Start qemu on windows.
@ECHO OFF START qemu.exe -L . -m 128 -hda linux.img -cdrom puppy-1.0.3-mozilla.iso -enable-audio -localtime -boot d -user-net

Hey! you have a full fledged Linux system running inside windows.

Starting Network

At the Puppy Linux shell type the following:

#dhcpcd eth0

Get the address for eth0 of emulator.I always get the address for eth0 as .On your windows machine you can get your ip using ipconfig (say it is Puppy Linux shell type:


If it is successful, start Mozilla and point it to some site on your IIS web server (Assuming you have one or else install one). In the screen shot you can see a site hosted on IIS server being accessed with Puppy Linux running Mozilla. By enabling directory browsing of the site you can even share files between both operating systems. Below is screenshot of Mozilla on Puppy displaying a page hosted by IIS on Windows 2003.

Enabling Sound

Enabling sound is also very easy.QEMU supports SB16 emulation .This is something I like about running Linux on QEMU , no problems with sound card .But Puppy could not detect sound card by itself. I used help documentation accompanying with puppy was of great help. Make sure you started QEMU with ‘audio’ option.

#cd /lib/modules/2.4.27/sound
#modprobe -v sb

You should see following entries in output of lsmod


I just put a simple audio file on my web server and pointed Mozilla to the site. From directory listing you can save the file and/or play it using gxine. Below is screenshot showing gxine playing a wave file. The sound may be quite squeaky though ;-)

Transferring Data using Virtual Hard disk Images

If you are a samba fan then you should definitely try installing and running samba with QEMU+PuppyLinux. Another nice way of sharing data between host and guest OS is using ‘disk images’. QEMU comes with a utility qemu-win.exe which can convert different types and sized virtual hard disks for use with Puppy Linux .I could successfully create qcow and raw formatted disk images. The advantage of qcow format is its small size which grows as you write to it. The advantage of raw format is that you can format it and use with a program like WinImage.Now comes the question of accessing this data .WinImage is an excellent program for this. It can even write(inject) files into a (raw formatted) virtual image files with FAT. Then I used FreeDOS floppy image and QEMU to format it to FAT16. Now you can use such a hardisk as ‘hda’ or ‘hdb’ of QEMU , mount it on puppy Linux and save data on it.

Doing More interesting things!

There are many more interesting things still you can try out. Firstly you can try out samba and experiment using OpenVPN(QEMU TAP version). There are many additional packages called dot-pups available for Pupply Linux here.I think combination of QEMU and Puppy Linux is just the perfect combination for small Linux that runs inside windows like normal programs. Moreover the executables for QEMU and Puppy Linux ISO occupy just around 70 MB of disk space and give you a full fledged Linux system with GUI and networking. This combination I think will be very helpful for those interesting in making small Linux distro ,students and hackers.

Puppy Linux download

Puppy DotPups


Puppy Home Site

QEMU for Windows TAP patch

QEMU with OpenVPN

How to use my album script on your website

I assume you have very basic knowledge of HTML. There are quite a few steps to be followed:

1] Download the zip archive from this location and unzip it to a folder.

2] Get all your images into the ‘hh’ folder. You will have to resize all images to 640*480 for displaying. Also thumbnails of 100*75 are required. Put the thumbnails into same directory with a different name. You can use GIMP to do the job of creating thumbnails and Picassa to resize images to 640*480.

3] Once you have thumbnails and images, the fun begins. Now you need to get a Google Map key. Visit this site and register to get your 86 charactor Google Map Key. Edit the photoalbum.html page and replace the #######… in first <script> tag with your google map id.

4] Open the images.xml file in notepad or any XML Editor. It is this file that contains all important information. To find latitude and longitude you can search for the place in wikimapia. Move the desired location to the center of the screen for maximum accuracy. On the address bar you should be able to see something like . You can get the coordinates from this query string. Here latitude of place is 17.991438 and longitude =73.027003 . If you see closely you can even get the zoom !(z=17). Enter one tag for each image . Make sure that you entered the right paths for images and thumbnails. An example file is given here:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="images.xsl"?>
<caption>Nice big mushrooms in the garden.</caption>
<tooltip>Somewhere here (I think!)</tooltip>

5] Do not enter any special charactors or line breaks into the text inside <caption> and <tooltip> tags. Right now the script is unable to handle it and produces errors.

6] Now upload all the files to your website , simple access the photoalbum.html file and your album should be working ! You can comment on this using email address specified in the FAQ section of the website or drop a comment.