Page 1 of 11 123 ... LastLast
Results 1 to 10 of 490

Thread: Howto: install Windows in Ubuntu Hoary for free

Hybrid View

  1. #1
    Join Date
    May 2005
    Location
    Sweden
    Beans
    442
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Howto: install Windows in Ubuntu Hoary for free

    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:

    $ ./configure

    If everything is correct and you recieve no errors, proceed with:

    $ make

    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
    /sbin/modprobe kqemu
    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


    -fda /dev/fda
    will tell qemu where to find the floppy drive
    -fda /path/to/your/bootdisk.img
    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


    -cdrom /dev/cdrom
    will tell qemu where to find the cdrom drive.
    -cdrom /path/to/your/install_cd.iso
    will tell qemu to use an iso instead of your cdrom drive.


    -hda /path/to/your/new/viritual/hd.img
    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:

    -k en
    Keybord layout.. works with some languages

    -user-net
    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
    Win2000: http://www.techspot.com/tweaks/win2k...es/print.shtml

    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 >
    Name: Win2000
    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.



    MISC

    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:
    http://ubuntuforums.org/showpost.php...&postcount=256



    LINKS TO USEFULL INFORMATION

    http://fabrice.bellard.free.fr/qemu/index.html
    http://fabrice.bellard.free.fr/qemu/qemu-doc.html
    http://www.debian-administration.org/?article=40
    http://oui.com.br/n/content.php?article.21
    http://www.carlsonhome.net/computer_help_log.php

    Free Operating System Zoo
    http://free.oszoo.org/

    Have fun...


    Please correct me if something is wrong or can be done better.
    Last edited by Lunde; August 2nd, 2005 at 03:12 PM.
    Fredrik Lunde | Vergic AB
    www.vergic.com

  2. #2
    Join Date
    May 2005
    Beans
    41

    Re: Howto: install Windows in Ubuntu Hoary for free

    How fast is it? Would it be faster than using VNC to run windows programs? Thanks.

  3. #3
    Join Date
    May 2005
    Location
    Winooski, VT
    Beans
    112
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Howto: install Windows in Ubuntu Hoary for free

    Quote Originally Posted by kingzasz
    How fast is it? Would it be faster than using VNC to run windows programs? Thanks.
    I haven't used this solution yet, but I'd have to assume it'd much faster than any VNC connection. I've run WinXPsp2 inside a VMware session full screen, you almost couldn't tell there was a host OS underneath.

  4. #4
    Join Date
    May 2005
    Location
    Umeå - Sweden
    Beans
    29

    Re: Howto: install Windows in Ubuntu Hoary for free

    Quote Originally Posted by Arthemys
    I haven't used this solution yet, but I'd have to assume it'd much faster than any VNC connection. I've run WinXPsp2 inside a VMware session full screen, you almost couldn't tell there was a host OS underneath.
    One way to get a eindows-cd for free is to order a free 180 day trial CD from microsoft..
    You'll never put up with windows for longer than that anyway!
    I <3 my unicycle!

  5. #5
    Join Date
    Mar 2005
    Beans
    6,040

    Re: Howto: install Windows in Ubuntu Hoary for free

    thanks for the detailed howto. i've been meaning to set up qemu for a while, this will perhaps get me going.

    is it possible to set things up so that one can boot into the same installation of windows both natively (with grub) and in a virtualization / emulation environment such as vmware or qemu, kind of like how things work with wine? (i'm sure the short answer is "no" but.. maybe there's a "but" )
    Previously known as 23meg

  6. #6
    Join Date
    Mar 2005
    Beans
    Hidden!

    Re: Howto: install Windows in Ubuntu Hoary for free

    One thing you may want to add. Instead of using "make install", you could use checkinstall (apt-get install checkinstall or use Synaptic). checkinstall is the best way to install compiled programs because it will make and install deb's instead of just installing the program! This means that you will have QEMU installed as if it were installed via apt-get or Synaptic! Neat stuff! To remove all you would have to do is apt-get remove qemu or removie via Synaptic. That is, everything would be done the same way as if you were to install a deb.

    Quick rundown for any source code package using configure:
    Code:
    ./configure
    make
    checkinstall
    In other words, just replace the step "make install" with "checkinstall". That's it!

    WARNING: make sure you are not running anything that touches your apt database. This means that you should not have Synaptic open or have apt-get running while using checkinstall. This will screw up checkinstall because it will be unable to install the deb files that it makes since the resources will be used by apt-get/Synaptic.
    STOP!
    Before you sign up to Dropbox, click here to read my post showing you how to get an additional 500mb free! That's 2.5GB of free space!

  7. #7
    Join Date
    May 2005
    Location
    Sweden
    Beans
    442
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Howto: install Windows in Ubuntu Hoary for free

    Quote Originally Posted by 23meg
    thanks for the detailed howto. i've been meaning to set up qemu for a while, this will perhaps get me going.

    is it possible to set things up so that one can boot into the same installation of windows both natively (with grub) and in a virtualization / emulation environment such as vmware or qemu, kind of like how things work with wine? (i'm sure the short answer is "no" but.. maybe there's a "but" )
    not with grub i think, but maybe if we can figure out how to mount a disk as a RW image, we can then boot up the native installation as -hda /path to image.

    Quote Originally Posted by AgenT
    One thing you may want to add. Instead of using "make install", you could use checkinstall (apt-get install checkinstall or use Synaptic). checkinstall is the best way to install compiled programs because it will make and install deb's instead of just installing the program! This means that you will have QEMU installed as if it were installed via apt-get or Synaptic! Neat stuff! To remove all you would have to do is apt-get remove qemu or removie via Synaptic. That is, everything would be done the same way as if you were to install a deb.

    Quick rundown for any source code package using configure:
    Code:
    ./configure
    make
    checkinstall
    In other words, just replace the step "make install" with "checkinstall". That's it!

    WARNING: make sure you are not running anything that touches your apt database. This means that you should not have Synaptic open or have apt-get running while using checkinstall. This will screw up checkinstall because it will be unable to install the deb files that it makes since the resources will be used by apt-get/Synaptic.
    Thanks! this looks like a better way of doing it..

    Quote Originally Posted by mulino
    What to prefer, if one has no glue which emulator to use? Why use qemu instead of wine?
    VMware is the best I think... Qemu is to me after all I tried, the second best, there is a big difference from a native installation, but as a tool for small applications it's good I did a Photoshop job in Qemu with no problems, it's a bit slow, but better then rebooting. There are other great benefits to Qemu, like the possibuility of running testing servers like a stripped down Slackware with Apache and Mysql or the Breezy Badger Development Release. When I have more time, I will look more into the possibuilities.

    ...but if you only want a coupple of programs, then WIne or Crossover Office may be your solution

  8. #8
    Join Date
    May 2005
    Location
    Sweden
    Beans
    442
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Howto: install Windows in Ubuntu Hoary for free

    Quote Originally Posted by 23meg
    thanks for the detailed howto. i've been meaning to set up qemu for a while, this will perhaps get me going.

    is it possible to set things up so that one can boot into the same installation of windows both natively (with grub) and in a virtualization / emulation environment such as vmware or qemu, kind of like how things work with wine? (i'm sure the short answer is "no" but.. maybe there's a "but" )
    I tried something funny, I don't have a Windows native om my PC... But I have a secondary Ubuntu on another hard drive. What I tried was to trick Qemu to think that the drive was an image by:

    ln -s /dev/hdb /path/to/qemu/ubuntu.img
    then use the flag -hda /path/to/qemu/ubuntu.img

    ..and it looks like it's reading the disk, The message is:

    ata0 master: Qemu HARDDISK ATA-2 Hard-Disk (19595 MBytes)

    Booting from Hard Disk...
    Missing operating system_

    OK I fully understand why it did'nt boot my ubuntu, the fstab would be wrong, the bootloader is somewhere on my hda, the partitions would probably have wrong names etc... but if it was a Windows on that disk, It may work. This is the closest I can get to testing this. If somebody esle tests this please leave a note here if it works.

    Note: I dont know what this would do to the file system, I don't think it would do any damage, but just keep it in mind.

  9. #9
    Join Date
    Apr 2005
    Location
    Swiss mountains
    Beans
    13

    Question Re: Howto: install Windows in Ubuntu Hoary for free

    What to prefer, if one has no glue which emulator to use? Why use qemu instead of wine?

  10. #10
    Join Date
    Apr 2005
    Location
    Not-So-Sunny Hawaii
    Beans
    Hidden!

    Re: Howto: install Windows in Ubuntu Hoary for free

    Quote Originally Posted by mulino
    What to prefer, if one has no glue which emulator to use? Why use qemu instead of wine?
    if WINE doesn't support the programs you need to use

Page 1 of 11 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •