Howto install Windows in Ubuntu Hoary for free
It's not totally free, because you need a Windows Install CD.
From the start, this was in my case: How to Make Photoshop and Dreamweaver work under Ubuntu ..but read on if you need other Windows applications or Even other OS's under Ubuntu.
There are several other solutions out there, it's just a bit difficult to chooce the right one.
In this little howto we will take a brief look at some of the solutions and guide you through how to set up the free emulator that I have tested with win2000 and win98.
Before we start:
Guest = Your Operating System installed in the emulator
Host = In this case, Ubuntu Hoary
Do this at your own risk, there are know problems with different graphic cards, refresh rate and color settings.
If you notice any flickering on the screen when you change the screen resolution on the guest OS, try to shutdown first the guest, then completely reboot the host. if still it is flickering, there are probably something wrong with your graphic drivers or settings in the Xorg file.
I did this with a Fresh installation of Ubuntu Hoary Hedgehog 5.04 with 2.6.10-5 i386 kernel, Proper Nvidia drivers, Wireless Network and 768mb memory.
Please note that you preferably have some gigabites available while setting this up. I recommend taking some backups of both the guest and the host while configuring this.
First ...we will take a brief look at what I tried before I ended up with something that worked for me.
Crossover Office (Not Free)
Running Windows Programs under Linux, such as Office, Photoshop, Dreamweaver.. and lots more.
Note: Missing functions in Photoshop, unreadable menus.. supports a lot of Windows applications, but not the right for me.
Win4LinPro (Not Free)
Windows umulator for Windows2000 and WindowsXP (must be with sp2 or sp1)
Note: I tried this with WinXP, it was far from useable for my purpose, way to slow even with KQemu accelerator)
Win4Lin (Not Free)
Windows umulator for Win95 and Win98, WinME
Note: Needs a custom kernel wich is quite difficult under ubuntu, I have still not tried this, but will soon give it a go..
Qemu with KQemu (Free)
Emulator for Win95 and Win98, WinME, Win2000, WinXP, Knoppix, lot's and lots of different OS's.
Note: This is the ONE.. this is what we will go through here. I tried this with Win98, Win2000, Knoppix and will continue to try different OS's here. It is not as fast as VMware with Win2000, but it's a good free alternative.
VMware Workstation (Not Free)
Emulator for Windows all and lots of other OS's ...I had some problems with Win98.
Note: VMware is the best solution I have tried, I had a lot of trouble with crashes, screen flickering etc... but after I installed Qemu with KQemu it seems to work fine. I have no idea why and I don't think there are any relations. As long as I don't change screen resolution in the guest it's pretty stable now.
OK.. Let's start...
Step 1. RUNNING QEMU WITH WIN98
If you are just installing Win98, with the current version (qemu-0.7.0) KQemu will not work anyway, so you don't need to install it.
Win98 only, Just do:
$ apt-get install qemu
...and jump to step 2
If you deside to install Qemu with the KQemu accelerator you just need to start win98 with the extra command -no-kqemu , we will get back to this later anyway.
Step 1. RUNNING QEMU WITH KQEMU ACCELERATOR
Some of this information I ripped from: Nano Florestan at http://oui.com.br/n/content.php?article.21 a lot of the credits should go to him.
First we need to remove any previously installed Qemu and compile it with Kqemu
$ sudo apt-get remove qemu
Go to: http://fabrice.bellard.free.fr/qemu/download.html
...and download these 2 files:
1) QEMU source code (Not the binary for i386 which I took the first time, silly me)
2) QEMU Accelerator Module
0.7.0 is the current version.
$ tar zxvf qemu-0.7.0.tar.gz
The Kqemu shall be unpacked into a subdirectory of the new qemu-0.7.0 directory
$ cd qemu-0.7.0
$ tar zxvf /location of downloaded files/kqemu-0.6.2-1.tar.gz
NOTE: Some people have reported permission errors during installation, the following command will correct the problem.
$ sudo chmod -R 775 /path/to/qemu-0.7.0
You now need to make sure you have some extra packets. First make sure you have the kernel headers installed by:
$ uname -r
..this will output the kernel version
Open Synaptic package manager and search for packages called "linux-headers". Several packages start with this name. Install the one that corresponds to your processor and your kernel version.
Still in Synaptic, choose the package you have just installed, click Properties and go to the "Installed Files" tab. Write down the directory where the files were copied. In my case, they were copied to: /usr/src/linux-headers-2.6.10-5-386/
$ gedit configure
change the: kernel_path="/usr/src/linux-headers-2.6.10-5-386"
$ sudo apt-get install libsdl1.2-dev
$ sudo apt-get install zlib1g-dev
Then check that everything is correct with:
If everything is correct and you recieve no errors, proceed with:
Correct output to make will go on and on and output a lot of text...
If you did'nt get any errors you are now ready to install. If you get any errors or this does'nt work at all, make sure you have a gcc compiler in your system.
Now we are ready to install:
Note: Please check AgenT's suggestion of doing checkinstall instead of make install: http://www.ubuntuforums.org/showthre...873#post200873
$ sudo make install
If everything went ok, you can now start the qemu with the command
$ sudo modprobe kqemu
Then we need to make this start when the computer boots
$ sudo gedit /etc/init.d/bootmisc.sh
Add these lines to the end just before "exit;"
# Start Qemu with KQemu accelerator
mknod /dev/kqemu c 250 0 # Create the KQEMU device
chmod 666 /dev/kqemu # Make it accessible to all users
Step 2. MAKING A VIRITUAL DISK WITH QEMU
First create a directory for the guest OS's. This should be done as the user you will use while running the guest OS
$ cd /home/your username
$ mkdir Qemu
$ cd Qemu
Then we will create the virtual hard drive, in my case for Win98 I used 2 gigabyte and 3,5 gigabyte for Win2000. We set the size with the (amount)M
$ qemu-img create hd.img 3500M
Step 3. INSTALLING THE GUEST OS
So... we now have the disk and need to install something on it..
first lets hava a look at the options for booting with Qemu
-boot gives the parameter of which device to boot from.
a = floppy
d = cdrom
c = hard drive
will tell qemu where to find the floppy drive
will tell qemu to boot from a bootdisk image. You can download images from www.bootdisk.com
PS: you can download an .exe bootdisk extractor and open it with Archive Manager and extract the bootdisk image
will tell qemu where to find the cdrom drive.
will tell qemu to use an iso instead of your cdrom drive.
Will tell qemu which viritual harddrive to use. you can also use secondary drive with -hdb /path/to/your/new/viritual/secondary/hd.img
So here we go... If we have a bootable install cd and just want to use the cdrom drive, this is how it goes:
$ qemu -boot d -cdrom /dev/cdrom -hda hd.img
If you need to start with different parameters, just modify and add to the end. If you install Win98, dont forget to add -no-kqemu at the end.
When the installation ask you to reboot, change the -boot d flag to -boot c for the virtual hard drive
Step 4. STARTING THE GUEST OS
Well.. we're sort of already there, again it's mostly just to change the -boot flag
$ qemu -boot c -fda /dev/fda -cdrom /dev/cdrom -hda hd.img -user-net -pci -m 256 -k en
Description of other flags used in this startup:
Keybord layout.. works with some languages
Lets you connect to the net
-pci -m 256
Amount of memory provided the guest OS
Note: I will not go into details about networking here.. at least not yet. Internet should probably work from the guest without any modifications. To set up shared folders between the guest and the host, a tip is. Install samba, then share the folders with SMB and add the flag -smb /shared/folder to your startup command.
Step 5. PERFORMANCE TWEAKING THE GUEST OS
Before you start tweaking the guest OS.. just copy the hd.img
$ cp hd.img hd.img.backup
Now find a good performance tweek site on the net for removing all unwanted processes for your OS
EDIT: Additional information from sebdah
For you guys who wants to tweak WinXP: Check TweakXP.com, it should be everything you need!
Step 6. CREATING A LAUNCER
Now finally you may want a launcher for your new OS..
Rightclick on the panel where you want to create the launcher and choose:
Add to Panel > Custom Application Launcher >
Command: qemu -boot c -fda /dev/fda -cdrom /dev/cdrom -hda /path/to/your/hd.img -user-net -pci -m 256 -k en
Choose an icon for you new OS
Note: modify the command starter after your needs.
CHANGING CD'S IN THE GUEST
Some people have reported problems changing CD's while running the guest OS.
rcerreto has posted a solution here:
LINKS TO USEFULL INFORMATION
Free Operating System Zoo
Please correct me if something is wrong or can be done better.