====== Running the eeePC OS in a virtual machine ====== ===== Introduction ===== This page explains how to run the eeePC OS in a virtual machine.\\ It describes the work done by user TundraMan on eeeuser, and almost all information on the original version of this page was taken from the eeeuser thread: [[http://forum.eeeuser.com/viewtopic.php?id=3394|http://forum.eeeuser.com/viewtopic.php?id=3394]].\\ The setup for Qemu was tested on Ubuntu Gutsy (7.10). It assumes that you have Qemu installed. ===== Qemu ===== - Open a terminal create a new directory and cd into it - Extract the image tarball from the CD (P701L.gz) into your fresh directory - Create a new disk image file 'qemu-img create good.img 4001M' - dd the P701L image into the new image 'dd if=P701L of=good.img bs=512 conv=nocreat,notrunc' - Figure out the next available loop device 'sudo losetup -f' (use the returned number in the next step) - Get the image as a device 'sudo losetup /dev/loop0 good.img' (again replace 0 with the right number from 5) - Ensure this was successful 'echo $?' should return 0 - Partition the second drive 'sudo fdisk -C 486 /dev/loop0' - Create the partition: n, p, 2, , , w - Format the partition 'sudo parted /dev/loop0', mkfs, 2, ext2, Ignore, Ignore, quit - Remove the loopback device 'sudo losetup -d /dev/loop0' - Create a mount point for the loopback 'sudo mkdir /mnt/loop' - Mount the first partition 'sudo mount -o loop,offset=32256 good.img /mnt/loop' - Fixup the xorg.conf file. 'sudo vi /mnt/loop/etc/X11/xorg.conf' change intel to vesa and screen resolutions to 800x600 (a copy of an updated Xorg.conf can be found later on this page) - Umount the loopback file system 'sudo umount /mnt/loop/' You disk image file is now ready to go. With ubuntu the bios.bin file shipped with qemu will not function so we have to grab the newest one from http://bochs.sourceforge.net/getcurrent.html. very important --> Download the latest source tarball. From the tarball extract the 'bios/BIOS-bochs-latest' and copy it over the existing /usr/share/qemu/bios.bin file <--very important. You are almost there now.\\ Alternately you can download BIOS-bochs-latest from [[http://www.effem.110mb.com|http://www.effem.110mb.com]] (only the bios, not the bochs tarball). Next you can run qemu by typing:\\ **qemu -hda good.img -m 512**\\ It will format the second partition as ext3 and ask you to hit enter to reboot. Hit enter. VOILA!!! you should see a familiar sight as the gui starts and asks you for username, timezone etc.. It is also possible to copy the image (but beware it is large: 4 GB) and run the image with the Windows or Mac version of Qemu. ===== Converting to vmware ===== If you want to run your image under vmware you can convert the image created above by the following command: **qemu-img convert good.img -O vmdk eeepc.vmdk** The associated eeepc.vmx file should contain:\\ #!/usr/bin/vmware config.version = "8" virtualHW.version = "4" scsi0.present = "TRUE" memsize = "512" scsi0:0.present = "FALSE" scsi0:0.fileName = "eeepc.vmdk" scsi0:0.writeThrough = "TRUE" floppy0.startConnected = "FALSE" floppy0.fileName = "/dev/fd0" Ethernet0.present = "TRUE" Ethernet0.connectionType = "nat" displayName = "EeePC" guestOS = "otherlinux" priority.grabbed = "normal" priority.ungrabbed = "normal" powerType.powerOff = "hard" powerType.powerOn = "hard" powerType.suspend = "hard" powerType.reset = "hard" sound.present = "TRUE" sound.fileName = "-1" sound.autodetect = "TRUE" ===== Virtualbox ===== You can convert the qemu image to Virtualbox with the following command ''VBoxManage convertdd good.img good.vdi'' After the conversion process has finished you can: 1) move the vdi to .Virtualbox/VDI\\ ''mv good.vdi ~/.Virtualbox/VDI''\\ 2) create a new virtual machine click on ''New'' in Virtualbox\\ 3) ''Next'', Name = EEE, OS-Type = Linux 2.6, ''Next''\\ 4) Base Memory Size = 512Mb, ''Next''\\ 5) Virtual Hard Disk ''Existing''\\ 6) ''Add'', select good.vdi, ''Select'', ''Next'', ''Finish''\\ Now you can start the emulated EEE. It takes a little bit longer the first time. ==== Extras ==== Virtualbox has a (free) add-on called Guest Additions, which allows setting the required 800x480 resolution for eeePC emulation. {{wiki:screenshots:vboxxandros1.jpg|Virtualbox running eeePC Xandros in 800x480 resolution}} Further details in this topic: http://forum.eeeuser.com/viewtopic.php?id=3394&p=2 ===== Virtual Pc 2007 ===== In order to run the eeePC OS in Microsoft Virtual PC 2007 on a Windows computer using the QEMU instructions given above, you will need to have the "dd" command on Windows and a Linux LiveCD with fdisk and mkfs. The "dd" utility can be installed as part of CYGWIN, which can be downloaded from [[http://cygwin.com/]]. "dd" will be part of the "coreutils" which should be part of the base install for CYGWIN, but you should add the gzip package if you do not have WinZip or some other tool to decompress the P710L.gz file. A good Linux LiveCD is System Rescue CD which can be downloaded from [[http://www.sysresccd.org/Download]]. After copying the P701L.gz file from the eeePC restore DVD, decompress it. Use CYGWIN's gunzip command if necessary. Start up Microsoft Virtual PC 2007 and create a new Virtual Machine using Virtual Machine Wizard with the default settings for "Other OS". When asked what size of virtual hard disk file to create, choose 4001Mb as specified above. Now open a CYGWIN window and issue the above "dd" command with the appropriate arguments for the Virtual PC vhd file. For instance: dd if=P701L of="/cygdrive/c/Documents and Settings/MyUser/My Documents/My Virtual Machines/eeepc.vhd" bs=512 conv=nocreat,notrunc Now start up the newly created virtual machine and before the machine finishes booting, capture the systemrescuecd.iso CD image to boot from the LiveCD. If you do not capture the CD quickly enough, you will have to reset the virtual machine from the file menu. Allow the System Rescue CD to boot. Add a user partition to the virtual hard disk fdisk /dev/sda and create the partition using the following commands in fdisk: n, p, 2, , , w Now format the newly created partition: mkfs -t ext2 /dev/sda2 Mount the boot partition and edit the xorg.conf as instructed below: mount /dev/sda1 /mnt/custom\\ vi /mnt/custom/etc/X11/xorg.conf Now release the System Rescue CD image, and reboot the virtual machine. The eeePC OS will install files into the user partition and reboot once more. Note that the network/wifi will not work because VPC only emulates the DEC tulip chipset, and no drivers are provided on the eeePC restore DVD. ===== Parallels Desktop ===== Almost the same process, except you need to name the disk image "good.hdd" instead of "good.img". Under Parallels, create a new virtual machine, Choose Linux as the OS, and then replace the hard disk with "good.hdd". If you're using Parallels 3.0 it will tell you that it needs to update the disk image to a new version, hit "Ok". It will then boot (it might perform a disk check). ===== Xorg.conf ===== Section "ServerLayout" Identifier "Xandros" Screen 0 "Screen1" InputDevice "keyboard" InputDevice "mouse" EndSection Section "Files" ModulePath "/usr/lib/xorg/modules" FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/share/fonts/X11/Type1" FontPath "/usr/share/fonts/X11/75dpi" FontPath "/usr/X11R6/lib/X11/fonts/Type1" EndSection Section "ServerFlags" Option "AllowMouseOpenFail" Option "BlankTime" "5" Option "DontVTSwitch" "true" Option "AIGLX" "false" Option "GLX" "false" Option "GLCore" "false" EndSection Section "InputDevice" Identifier "keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbLayout" "us" Option "XkbVariant" "" EndSection Section "InputDevice" Identifier "mouse" Driver "mouse" Option "Device" "/dev/input/mice" Option "Protocol" "IMPS/2" Option "Emulate3Buttons" "yes" Option "ZAxisMapping" "4 5" Option "CorePointer" EndSection Section "Monitor" Identifier "Monitor1" VendorName "ASUS" ModelName "eeePC P701" Modeline "800x480" 29.58 800 816 896 992 480 481 484 497 -HSync +Vsync # 60 Hz EndSection Section "Device" Identifier "Device1" Driver "vesa" EndSection Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 SubSection "Display" Depth 8 Virtual 1680 1680 EndSubSection SubSection "Display" Depth 15 Virtual 1680 1680 EndSubSection SubSection "Display" Depth 16 Virtual 1680 1680 EndSubSection SubSection "Display" Depth 24 Virtual 800 600 EndSubSection EndSection ===== VMWare again, the easy way ===== For using the EeePC´s Xandros with VMWare player, there is also an easier way with no need to create an own virtual machine. There is some nice piece of software called moka 5, still under development, but works pretty well for me. You can get it at [[http://www.moka5.com|http://www.moka5.com]]. You have to install the engine first, but afterward you can download some nice virtual machines to get started. They also have some EeePC image there. ===== Acknowledgements ===== The initial version of this page was created by eFfeM, but the text was copied from the posts at [[http://forum.eeeuser.com/viewtopic.php?id=3394|http://forum.eeeuser.com/viewtopic.php?id=3394]]. Especially the startpost from TundraMan was almost integrally copied. Kudos to TundraMan