| How to install Linux on Windows using qemu |
|
|
| Written by axel | |||||||||||||
|
You have decided to install Linux but dual boot is not an option for you, either because you are afraid messing up your hard disk drive and your MBR or because you want to run at the same time Windows and Linux. The solution for this is to make a virtual installation on your original Windows installation. The program that will help us doing this is Qemu. Qemu is a generic and open source machine emulator and virtualizer as explained in its official web site http://fabrice.bellard.free.fr/qemu/ . So, let’s get started! ** Note: If you omit the steps reffering to qemu this guide could be used as a How to install Fedora Core 6 guide as well. It covers all steps needed in addition to my How to partition your HDD to install Linux guide. First of all download kqemu. Kqemu is a Qemu accelerator. It will help us achieve better emulation speeds. This is the official page for qemu http://www.h7.dion.ne.jp/~qemu-win/ Download Kqemu from here and install it. Then download qemu and unzip it in one of your folders I have unzipped it under C:\Program Files\qemu-0.9.0-windows Now we have to create an image file. The image file is a virtual hard disk drive in which we are going to install our Linux distribution. This why our hard disk drive remains untouched and we can get rid of Linux just by deleting this image file. So, open a cmd go to the directory you have installed qemu cd “c:\Program Files\qemu-0.9.0-windows” and type this command qemu-img.exe create fc.img –f raw 5G This way we tell qemu to create a virtual disk called fc.img in the current directory. This disk will be in raw format and will have a size of 5GB. You can change the size to meet your needs. Next we boot into our Linux distribution. If you have Linux iso already burned in a dvd/cd use the following command. qemu.exe -L . -m 256 -hda fc.img -cdrom "\\.\d:" -boot d -L sets BIOS to our current location -m sets RAM at 256MB -had fc.img is our virtual drive -cdrom shows the location of your cdrom drive (mine is d:) -boot tells qemu to boot from d Alternatively you can use your .iso file like this. qemu.exe -L . -m 256 -hda fc.img -cdrom distribution.iso -boot d Here I have choosen to install Fedora Core 6. So, the following could be also used as a 'How to install Fedora Core 6' guide. All the steps are the same. You may of course choose any Linux distribution you like. The following screen will appear. Just press ‘Enter’. If you have already tested the md5 hashes of your .iso you may skip this step. Now we are ready to configure our Fedora Core 6 installation. Press ‘Next’. Choose the language you want to use during your installation progress. And the appropriate keyboard. Since we have created a raw partition there is no file system on it. So don’t get afraid from the following message and press ‘Yes’ Here we can see the image file we have created. Choose ‘Create custom layout’ If you want to learn more information on what each partition we will create does you may read me How to partition your HDD to install Linux guide. Next click on word ‘Free’ and press ‘New’. First we are going to create our / (root) partition. Here I choose it to be 5000MB. Don’t forget to select ‘Mount Point:’ /' Now we will create the swap partition. Click again on word ‘Free’ and press ‘New’. Use the space left for the swap partition and choose ‘swap’ as File System Type. If you allocate less space than the available RAM you’ll get the following message. But it’s ok. Now we will configure our boot loader options. Leave the settings as they are. Next we can configure the networking of the qemu installation. You have to use open vpn as explained here . I have selected the name ‘virtual’ for my virtual pc. Next we configure the system time. You should unckeck ‘System clock uses UTC’ In this screen we create our root account. Just type a password and don’t forget it! Next you can choose to customize your installation which means to choose which packets to install. You may select ‘Customize now’ but in case you don’t understand what to do just leave everything untouched. If you want to install both KDE and Gnome you should also check ‘Customize now’. Here I choose to install only KDE. I like it better! I also selected to have Greek Language Support for my system. When you are done press ‘Next’. Fedora will check the dependencies of your selected packages. When everything is ready you will see the following screen. Press ‘Next’ Fedora will begin packages installation. This could take some time, so be patient. When all the packages have installed press ‘Reboot’ After rebooting you will get the following error message. Return to your cmd and exit qemu by pressing ctrl+c. Then type the following command. This way you tell qemu to boot from c qemu.exe -L . -m 512 -hda fc.img –boot c The grub screen will appear And Fedora will start booting. Some configurations are still left to be done. Press ‘Forward’. Select ‘Yes, I agree to the Licence Agreement’ and press ‘Forward’. You can either select to have a firewall or not. It is better to disable SELinux to avoid miscellaneous problems. Configure date and time. Next create your user. Here I have created a use named ‘axel’. This will be the user you will use to enter the system later. Reboot and after a while you will prompted to enter your user name. If you don’t see this screen enter your username name and password and type ‘reboot’ Congratulations! You have successfully installed Linux on Windows! For further customizing your Fedora Core 6 installation you may refer to my guides Fedora Core 6 up and Running Part 1 and Fedora Core 6 up and Running Part 2.
Did you enjoy this article? Please share it!
Set as favorite
Bookmark
Email This
Hits: 9808 Comments (4)
![]()
dee
said:
|
|||||||||||||
| thank you so much for your helpful guide. By the way, how do you share folders between windows and linux? I installed ubuntu | |
|
report abuse
vote down
vote up
|
axel
said:
Thanks for your reply. If you want to share files with size under 32M you can use tftp. Run qemu with this parameter as well -tfpt / and then from ubuntu run tftp like this tftp -m binary 10.0.2.2 For larger files you have to set up networking as described here http://www.h7.dion.ne.jp/~qemu...32-en.html But I haven't tried so far. |
|
|
report abuse
vote down
vote up
|
Moritz
said:
|
Hi Axel, is this qemu similar to VMware? coz my friend recommend me to install VMware to run virtual OS on my windows. what is the difference between the virtual OS and the OS that you install in different partition that you told me? i have done the partition now, however i got abit of trouble with the ubuntu, it is a bit different with the fedora, esp with the "preparing disk space" stage. and also, last night i put the cd with ubuntu image, and then i follow the installation guide. however at the preparing disk space i stopped and quit the setup. Then, when i restart the computer i already got 2 choices of OS (see illustration), but the ubuntu does not work, it shows the loading but hten only shows some command line. the windows still works perfectly and i dont loss anything, illustration: Choose which Operating System you want to run: 1. Windows XP professional 2. ubuntu my question, if i repeat the process after you give me the guide with the ubuntu? will it delete and replace that OS or i will have three choices of OS at the startup (illustration)? Choose which Operating System you want to run: 1. Windows XP professional 2. ubuntu 3. ubuntu if this does happen, how to delete the second one? Many-many thanks for you Axel, sorry for all the questions... |
|
|
report abuse
vote down
vote up
|
| < Prev | Next > |
|---|







If you want to share files with size under 32M you can use tftp. Run qemu with this parameter as well -tfpt / and then from ubuntu run tftp like this tftp -m binary 10.0.2.2 For larger files you have to set up networking as described here