Introduction: Install Fedora 8 (Werewolf) on Windows XP With QEMU

Picture of Install Fedora 8 (Werewolf) on Windows XP With QEMU

The Complete Tutorial (a PDF Version is available)

To understand this tutorial you need some knowledge of a PC running Windows XP and a good background in Linux and Fedora. The aim of the tutorial is to show/focus on the differences and on the settings to be done when trying to run a Linux system inside the QEMU emulator.

Please consult the Qemu web site for more informations on this emulator.

Main part which is not presented is the QEMU accelerator that I could not install on the configured PC.

Step 1: FETCH AND INSTALL QEMU

QEMU home site is here, you can download the source code and the binaries there.

Latest version on Windows as of today is [http://http//lassauge.free.fr/qemu/ qemu-0.9.1-windows].

Step 2: FETCH THE BOOT.ISO FEDORA 8 IMAGE

A complete list of mirrors for downloading Fedora8 can be found here.

Select the boot.iso file under i386/os/images/.

For example:
ftp://ftp.funet.fi/pub/mirrors/Feeder.redhat.com/pub/Feeder/linux/releases/8/Feeder/i386/os/images/boot.iso

Step 3: CREATE a BLANK VIRTUAL DISK FOR FEDORA 8

Once the windows binary is installed (simply unzip the binary file in a new directory) you can create a new virtual disk:

In a windows command windows use the following command:
qemu-img create myimage.img mysize

For example for a 10 G disk image:
qemu-img.exe  create fedora8.img 10G

This will display:
Formating 'fedora8.img', fmt=raw, size=10485760 kB

... and the new image (a 10G bytes file) is now ready.

Step 4: USE NETINSTALL WITH THE BOOT.ISO IMAGE

Picture of USE NETINSTALL WITH THE BOOT.ISO IMAGE

4.1 START QEMU WITH THIS IMAGE

For example if using the installed Qemu-0.9.1:
qemu.exe -L Bios -m 256 -hda Images\fedora8.img -soundhw all -localtime                 -M pc -net nic,model=ne2k_pci -net user -no-acpi -boot d -cdrom Images\boot-F8.iso

Option description:
+-----------------------------------+-----------------------------------------------------------+| -L Bios			    |	Local path of all BIOS relatively to the qemu.exe file  || -m 256			    |	Memory is set to 256 Mbytes                             || -hda Images\fedora8.img	    |	First hard drive is the image created in step           ||				    |	above (warning: since Fedora 7 all drives               ||				    |	including ATA are detected as SCSI. Here the            ||				    |	disk will be named sda in Fedora)                       || -net nic,model=ne2k_pci -net user |	Network card is a NE2000-PCI in Qemu user               ||				    |	mode network                                            || -boot d -cdrom Images\boot-F8.iso |	Boot from CDROM (d) and use the downloaded iso          ||				    |	file as the cdrom image                                 |+-----------------------------------+-----------------------------------------------------------+

The cdrom image will start automatically (see first image).

4.2 ANACONDA INSTALLER

The Anaconda installer is then starting.

1. Choose your language (French for me) in the first screen.

OK, I must apologize, starting from here all screen dumps are in French, but it should not be so different as the English screens: a first good step to start playing with i18n :->

2. Choose the keyboard.

3. Installation method: choose HTTP or FTP (FTP works sometimes better).

4. TCP/IP configuration: disable IPv6 and choose "Dynamic IP Configuration" DHCP as this will be provided to the running anaconda by Qemu (See "3.7.3 Using the user mode network stack" in the Qemu documentation: http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC30).

5. HTTP Configuration: select the source web site (for example ftp.funet.fi) and the complete path up to /os/.
In our example: /pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/i386/os/


6. The installer is now fetching .img files from the selected web site (Alt-F3: switches to the debug screen).

Now it's a quite long process and every error from now on leads to a complete crash and you have to restart from point 4.1. Biggest probability is a blocked stage2.img file.

Step 5: ANACONDA INSTALLER: GRAPHICAL INSTALLATION

Picture of ANACONDA INSTALLER: GRAPHICAL INSTALLATION

5.1 Start

After this point the graphical (X11 version) version of Anaconda is starting.

5.2 Format disk

The QEMU disk image is detected and formatting is needed, click Yes or Next in the following screens.

5.3 Network setting

All default values are OK for QEMU.

5.4 Time setting

All default values are OK for QEMU.
Warning: you should certainly uncheck “system clock in UTC”, because you’re using the locale corrected clock from your Windows XP host system.

5.5 Root password

Choose a password for the root user of your guest system.
Now the installation tool is ready to fetch the list of packages from the ftp or http server: this could be a quite long task; depending on your network connection.

5.6 Packages

Now you can choose the type of installation: as we are using a netinstall, it’s better to choose the smallest possible set (this will be updated later, on a rpm by rpm basis). Note that you can now also add custom repositories at this install step:
Uncheck all “supplementary tasks” and select custom installation now (this will be longer to setup, but the download time will be reduced) and proceed with Next.

For all categories, remove what you do not need for the base install: no devel packages, no office tools, no server tools, and so on. Carefully review each category and click the “Optional Packages” button to review the detailed lists. When done, proceed with “Next” until requested to start the “real” installation.

Now prepare a good book and several cups of coffee as you see the progress bar slowly going to the right of the screen after formatting the disk: After up to several hours (this was my case!) you can restart the freshly installed guest Fedora 8.

Warning: when you reboot the current QEMU emulated machine you will go again to the installer (imagine you forgot to remove the CD)… because you are still using the netinstall iso image as boot device.

Step 6: FIRST BOOT

Picture of FIRST BOOT

6.1 LAUNCH QEMU

For finalising the installation of the new system you must first restart QEMU with this modified command line (to use the updated disk image as the boot device) :
qemu.exe -L Bios -m 256 -hda Images\fedora8.img -soundhw all -localtime -M pc                    -net nic,model=ne2k_pci -net user -no-acpi
It will then start grub from the freshly installed disk image and the kernel + init + the graphical boot display are now starting...

6.2 FIRSTBOOT APPLICATION

Welcome screen is displayed and you will need to configure for all different steps (seen on the left of the display).

6.2.1 Firewall

In your guest machine this is not needed.

6.2.2 SELinux

In your guest machine this is not needed.

6.2.3 Date and time

Update time if needed. If you have a running ntp server on your network you'll better choose to enable ntp.

6.2.4 Hardware profile

You can check here the QEMU emulated machine:

Audio device is an ES1370 and graphic card is a GD 5446. I choose not to send the profile but it’s up to you.

6.2.5 Create user

Add at least one user and now it’s time to really restart and have fun with your installed Fedora 8...

Step 7: ADDITIONAL CONFIGURATIONS

Picture of ADDITIONAL CONFIGURATIONS

Once rebooted, you can now upgrade/install the missing packets.

7.1 LOGIN SCREEN

New Fedora theme for gdm with face option.

7.2 UPGRADING

For upgrade first start a yum update process (log as root in a terminal window):
root% yum update

7.3 CORRECT CLOCK SETTING

If you forgot to uncheck the box in step 3, you can use the Settings menu to uncheck it (this needs to be done as root, and you will be prompted for the root password to do this)

Step 8: SHARE DATA BETWEEN HOST AND GUEST SYSTEMS

Picture of SHARE DATA BETWEEN HOST AND GUEST SYSTEMS
Some definitions:
+-------+------------------------------------------------------+------------+| Host	| System where Qemu is started : the real hardware     | Windows XP |+-------+------------------------------------------------------+------------+| Guest	| System « running under » Qemu in the virtual machine | Fedora 8   |+-------+------------------------------------------------------+------------+
To ease the access to the host machine, add this line (as root) to /etc/hosts:
10.0.2.2 qemu

Using CIFS (windows share):
In the host system, enable folder sharing (right click on the desired folder).

In the guest system, connect with smbclient (rpm package samba-client-3.0.26a-6.fc8) to be able to browse the shared directory and copy some files.

The command line in the guest Fedora 8 is:
smbclient ‘\\10.0.2.2\T45466’ –U lassauge –W FR

Options:
+-----------------------+-------------------------------------------------------+| smbclient		| ftp-like to connect to windows share                  || \\10.0.2.2\T45466	| Host system is seen at IP:10.0.2.2.                   ||			| T45466 is the name given to the share in host system. || –U lassauge		| User ‘lassauge’ (known from host system)              || –W FR			| Workgroup of user lassauge in the host system.        |+-----------------------+-------------------------------------------------------+

Now a simple get is enough to copy from the shared folder.

Afraid of command lines?

The graphical way in Fedora 8 is:
Main menu->Shortcuts->Connect to a server… Then fill the fields in the popup window.
When it's finished right-click on the new icon (The one with “SMB” which appeared on the desktop) and choose Browse. Windows password is then asked and finally you can browse the shared folder with nautilus.

Step 9: XORG CONFIGURATION

Picture of XORG CONFIGURATION
As the default size of the X screen is a bit too small, we can modify the X.org configuration to have some biggest resolutions, additionally we will also configure the wheel buttons for the mouse (as this is not detected).

Use a text editor to modify the file /etc/X11/xorg.conf. Before Device; insert the following section:
Section "Monitor"  Identifier "Monitor0"  HorizSync 31.5 - 95.0  VertRefresh 59.0 - 75.0EndSection
In the Screen section, between Device and DefaultDepth, add this line:
  Monitor "Monitor0" 
Finally, in subsection Display add this list:
  Modes "1152x864" "1024x768" "832x624" "800x600" "640x480" 

Now for the mouse, in subsection Input Device "VMMouse"€ add this:
  Option      "Protocol" "Auto"  Option      "Buttons" "5"  Option      "ZAxisMapping "4 5"
The final xorg.conf file should be like this one (except in Input Device "Keyboard0" which depends on the keyboard chosen in anaconda -€“ see 5.2):
Section "ServerLayout"        Identifier     "Default Layout"        Screen      0  "Screen0" 0 0        InputDevice    "Keyboard0" "CoreKeyboard"        InputDevice    "VMMouse" "CorePointer"EndSectionSection "InputDevice"        Identifier  "Keyboard0"        Driver      "kbd"        Option      "XkbModel" "pc105"        Option      "XkbLayout" "fr"        Option      "XkbVariant" "latin9"EndSectionSection "InputDevice"        Identifier  "VMMouse"        Driver      "vmmouse"        Option      "Device" "/dev/input/mice"        Option      "Protocol" "Auto"        Option      "Buttons" "5"        Option      "ZAxisMapping” "4 5"EndSectionSection "Monitor"        Identifier "Monitor0"        HorizSync 31.5 - 95.0        VertRefresh 59.0 - 75.0EndSectionSection "Device"        Identifier  "Videocard0"        Driver      "cirrus"EndSectionSection "Screen"        Identifier "Screen0"        Device     "Videocard0"        Monitor     "Monitor0"        DefaultDepth     24        SubSection "Display"                Viewport   0 0                Depth     24                Modes "1152x864" "1024x768" "832x624" "800x600" "640x480"        EndSubSectionEndSection
Log off and reconnect to see the new graphical screen. Note that the poor emulated graphic card has only 4 Mbytes of RAM an cannot reach higher resolutions (this value in confirmed by reading /var/log/Xorg.0.log :
(--) CIRRUS(0): VideoRAM: 4096 kByte

Check the screen dump after the update (in the last image), and compare with the one in step 8 (the second image).

Step 10: SHARED CLIPBOARD

Picture of SHARED CLIPBOARD

For exchanging copy/paste values between host and guest system, you can use a network clipboard.

Download Share Clip for both systems.

1. On Windows first start Share Clipboard.

2. On the guest Fedora you must first ensure that compat-libstdc++ is installed (use yum install compat-libstdc++ if it’s not the case) before starting the linux version of Share Clip. Then click on Connect and use the IP address of the host system (as seen from the guest): 10.0.2.2.

Now each copy paste is reflected in both Share Clips !

Step 11: This Is the END

Picture of This Is the END
Now you have a running Fedora 8 inside you windows XP computer thanks to QEMU....

Have a good play...

Additional informations:

Comments

Arbitror (author)2009-04-11

I don't know about you, but I'm using fedora 10!

Gozer404 (author)Arbitror2009-04-20

Yes... me too :-> I've just not redone the instructable with Fedora 10, it's nearly the same actions to be done.... By the way I'm working on one with OpenSolaris10 on Qemu....

Arbitror (author)Gozer4042009-04-20

Nevermind, I have converted to openSUSE. It has WAY more features than fedora 10, and even my prefered Linux Ubuntu!

Gozer404 (author)2008-04-28

Instructable updated today for more readability by using the now known formatting options. See How Do I Format Text ?

LinuxH4x0r (author)2008-04-03

Great job! I use fedora 8, and fedora core 5 on my desktop, and I might do this on my MacBook laptop using Q

sardines454 (author)2008-04-03

This is great and really well written. Good job.