Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2007-11-26 1:13:22 pm

TundraMan
Member
Registered: 2007-11-21
Posts: 10

EeePC in QEMU

After much tweaking and fiddling my man Zedd and I have managed to get the default EeePC software to run under QEMU. Why? this allows us more latitude as far as messing around with the system and until the wireless and ACPI issues are resolved neither of us want to rush to remove the default OS. This will allow us to install tools for software development outside of the EeePC ... and so much more.

http://aycu36.webshots.com/image/36355/2005028598787611195_th.jpg

So here are the steps. We are using Ubuntu Gutsy as a host, if you are using a different host your mileage may vary but the recipe should be much the same. (ensure you have qemu, and parted installed on your system and install other stuff as needed but these are the core tools)

1. Open a terminal create a new directory and cd into it
2. Extract the image tarball from the CD (P701L.gz) into your fresh directory
3. Create a new disk image file 'qemu-img create good.img 4001M'
4. dd the P701L image into the new image 'dd if=P701L of=good.img bs=512 conv=nocreat,notrunc'
5. Figure out the next available loop device 'sudo losetup -f' (use the returned number in the next step)
6. get the image as a device 'sudo losetup /dev/loop0 good.img' (again replace 0 with the right number from 5)
7. ensure this was successful 'echo $?' should return 0
8. partition the second drive 'sudo fdisk -C 486 /dev/loop0'
9. create the partition: n, p, 2, <enter>, 484, w
10. format the partition 'sudo parted /dev/loop0', mkfs, 2, ext2, Ignore, Ignore, quit
11. remove the loopback device 'sudo losetup -d /dev/loop0'
12. create a mount point for the loopback 'sudo mkdir /mnt/loop'
13. mount the first partition 'sudo mount -o loop,offset=32256 good.img /mnt/loop'
14. Fixup the xorg.conf file. 'sudo vi /mnt/loop/etc/X11/xorg.conf' change intel to vesa and screen resolutions to 800x600 (I will post the updated xorg.conf in a followup post)
15. 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.

* run qemu '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...

A few notes.
* I have noticed that if you don't shutdown 'nicely' you sometimes have to clear all files from /tmp in the image for X to start as an old lock file sits in there
* I have had to clear out /var/log in the image from time to time
* A stream of ata errors causes the emulation to be slow, we are working on this
The first two notes may no longer be an issue but were found to cause problems while we worked on getting this going.

Enjoy,
TundraMan and Zedd

Last edited by TundraMan (2007-11-26 3:55:47 pm)

Offline

 

#2 2007-11-26 1:16:36 pm

Kibobo
Senior Member
From: France
Registered: 2007-10-21
Posts: 295
Website

Re: EeePC in QEMU

Same with VirtualPC: http://www.blogeee.net/forum/viewtopic. … &t=200

Last edited by Kibobo (2007-11-26 1:20:18 pm)

Offline

 

#3 2007-11-26 1:20:07 pm

TundraMan
Member
Registered: 2007-11-21
Posts: 10

Re: EeePC in QEMU

xorg.conf
------------------------snip-------------------------------
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

Offline

 

#4 2007-11-26 1:21:39 pm

Kibobo
Senior Member
From: France
Registered: 2007-10-21
Posts: 295
Website

Re: EeePC in QEMU

You don't have to add the ethernet driver ?

EDIT: indeed, your ethernet interface is off.

Last edited by Kibobo (2007-11-26 1:29:15 pm)

Offline

 

#5 2007-11-26 1:50:36 pm

TundraMan
Member
Registered: 2007-11-21
Posts: 10

Re: EeePC in QEMU

@Kibobo, yes I will be getting the ethernet to work and don't anticipate this to be an issue. VirtualPC is for Windows only no?

On a side note you can run from the loopback device rather then the disk image file. Simply mount the disk image file 'sudo mount -o loop,offset=32256 good.img /mnt/loop' and run QEMU 'qemu -hda good.img -m 512 -kernel /mnt/loop/boot/vmlinuz-2.6.21.4-eeepc -append "rw root=/dev/sda1"'. This will bring you to the standard KDM login screen. I haven't worked out all the bugs yet but one thing you will have to do here is drop down to the terminal and set the 'user' password via passwd.

Offline

 

#6 2007-11-26 3:05:08 pm

PaulMdx
Senior Member
From: Eee PC 4G White w/Xandros - UK
Registered: 2007-09-23
Posts: 537

Re: EeePC in QEMU

Wow you guys rock!  Nice work.  I've been wondering how easy it was to clone the system.

Offline

 

#7 2007-11-26 5:29:52 pm

ermes
Member
Registered: 2007-11-26
Posts: 72

Re: EeePC in QEMU

good work!! I'd like to test xandros eeepc.... but I do not have the rescue dvd... any helps...?

Offline

 

#8 2007-12-04 12:11:00 pm

DecIRC
New member
Registered: 2007-12-04
Posts: 1

Re: EeePC in QEMU

Hi there...
Isn't there a way to do it with VirtualBox ?

Regards
cEd

Offline

 

#9 2007-12-08 12:54:05 pm

cannondale0815
Member
Registered: 2007-11-21
Posts: 28

Re: EeePC in QEMU

Kibobo wrote:

Same with VirtualPC: http://www.blogeee.net/forum/viewtopic. … &t=200

This is sweet! Works like a charm in VirtualPC 2007 (which can be freely downloaded from MS). I had to run the French instructions through Google Translator, but it's quite usable:

http://translate.google.com/translate?u … p;ie=UTF-8

Edit: I had to set the networking interface in the VirtualPC settings to "Shared networking (NAT)" for networking to work. But it works like charm smile

Last edited by cannondale0815 (2007-12-08 1:13:11 pm)

Offline

 

#10 2007-12-08 12:57:00 pm

cannondale0815
Member
Registered: 2007-11-21
Posts: 28

Re: EeePC in QEMU

ermes wrote:

good work!! I'd like to test xandros eeepc.... but I do not have the rescue dvd... any helps...?

There's a torrent out there.

Offline

 

#11 2007-12-09 6:22:28 am

ermes
Member
Registered: 2007-11-26
Posts: 72

Re: EeePC in QEMU

is it a file .iso of 1230.8 MB?

Offline

 

#12 2007-12-09 6:06:36 pm

cannondale0815
Member
Registered: 2007-11-21
Posts: 28

Re: EeePC in QEMU

yes, that's about right.

Offline

 

#13 2007-12-10 2:06:46 pm

vofiwg
Senior Member
From: Germany
Registered: 2007-11-10
Posts: 322
Website

Re: EeePC in QEMU

TundraMan wrote:

On a side note you can run from the loopback device rather then the disk image file. Simply mount the disk image file 'sudo mount -o loop,offset=32256 good.img /mnt/loop' and run QEMU 'qemu -hda good.img -m 512 -kernel /mnt/loop/boot/vmlinuz-2.6.21.4-eeepc -append "rw root=/dev/sda1"'. This will bring you to the standard KDM login screen. I haven't worked out all the bugs yet but one thing you will have to do here is drop down to the terminal and set the 'user' password via passwd.

I tried this and it works with one exception: If i login in kdm it throws me back to the kdm login again. It's an endless loop. I have to do a "console-login". There i can login and start x by doing a "startx /usr/bin/startsimple.sh".

Running "qemu 'qemu -hda good.img -m 512'" does not work for me.


vofiwg

sorry for my poor english. hope you understand it.

Offline

 

#14 2007-12-12 9:04:05 am

TundraMan
Member
Registered: 2007-11-21
Posts: 10

Re: EeePC in QEMU

@vofiwg: yes I seem to recall similar behaviour when doing things with the image mounted as a loopback device. I must of changed something to get it to work but unfortunately I do not know what. I will try to look into this but only have little time so I can't promise you a fix. Since my original post I have installed Kubuntu on my Eee and really only use QEmu to verify things every now and then.

PS. Your english is very good, much better then my German smile

Offline

 

#15 2007-12-12 9:36:12 am

sjones411
Member
Registered: 2007-11-16
Posts: 26

Re: EeePC in QEMU

Has anyone tried to get this working under Parallels or VMWare on the Mac?  I'd really like to try this out but I don't want to emulate a system emulating another system.

Offline

 

#16 2007-12-12 2:33:55 pm

vofiwg
Senior Member
From: Germany
Registered: 2007-11-10
Posts: 322
Website

Re: EeePC in QEMU

TundraMan wrote:

@vofiwg: yes I seem to recall similar behaviour when doing things with the image mounted as a loopback device. I must of changed something to get it to work but unfortunately I do not know what. I will try to look into this but only have little time so I can't promise you a fix. Since my original post I have installed Kubuntu on my Eee and really only use QEmu to verify things every now and then.

I was able to figure it out on my own. All I have done is to insert a

Code:

-initrd /mnt/loop/boot/initramfs-eeepc.img

in the commandline.

So the whole thing after mounting the loop is:

Code:

qemu -hda good.img -m 512 -kernel /mnt/loop/boot/vmlinuz-2.6.21.4-eeepc  -initrd /mnt/loop/boot/initramfs-eeepc.img -append "rw root=/dev/sda1"'

That worked for me. Hope it does for anyone who tries it too.


@sjones411: There's a port of qemu for Mac-OS. It's available here http://www.kju-app.org/kju/

vofiwg

Offline

 

#17 2007-12-12 5:14:27 pm

vofiwg
Senior Member
From: Germany
Registered: 2007-11-10
Posts: 322
Website

Re: EeePC in QEMU

I converted the good.img to img for VirtualBox with

Code:

VBoxManage convertdd good.img eeepc.vdi

and fired it up.

It works great.

That all helps me waiting on my real EeePC. It is not yet available here :-(


vofiwg

Offline

 

#18 2007-12-12 5:25:05 pm

vofiwg
Senior Member
From: Germany
Registered: 2007-11-10
Posts: 322
Website

Re: EeePC in QEMU

Another work:

vmware-server

Convert the qemu-Image to a vmware-image:

Code:

qemu-img convert good.img -O vmdk eeepc.vmdk

Now i am able to run it on vmware :-)

vofiwg

Offline

 

#19 2007-12-12 8:38:15 pm

stenk
Senior Member
Registered: 2007-11-18
Posts: 126

Re: EeePC in QEMU

Very interesting thread guys!

I will try this tonight. Many thanks for all your input everyone.

Offline

 

#20 2007-12-19 7:03:59 pm

Foppel
Member
Registered: 2007-12-19
Posts: 10

Re: EeePC in QEMU

Hi folks,

thanks all for this good work. I build my own image with Ubuntu 7.04. It's important to use for the first start the ramdisk parameter:
qemu -hda good.img -m 512 -kernel /mnt/loop/boot/vmlinuz-2.6.21.4-eeepc  -initrd /mnt/loop/boot/initramfs-eeepc.img -append "rw root=/dev/sda1"'
Then I umount the loop device and agree to the licence and restart with the short command: 'qemu -hda good.img -m 512'

I wrote a new entry in the german eee-pc wiki, i linked it to this thread. I hope that's OK:

http://wiki.eee-pc.de/index.php/Erstell … very_Image

greets from germany - Foppel

Last edited by Foppel (2007-12-20 6:38:27 am)

Offline

 

#21 2007-12-23 11:18:24 am

freee
Member
Registered: 2007-12-21
Posts: 12

Re: EeePC in QEMU

On Debian/testing your procedure works without the need to patch boch (bochsbios 2.3+20070705-2).

I do have two problems:

1. The screen resolution I get is 800x600 instead of 800x480. One of the points of running eeepc on qemu is to test how applications will look on the small screen.

2. I didn't manage to get the network working. (I'm trying to work in user mode.)

Offline

 

#22 2007-12-23 3:26:17 pm

vofiwg
Senior Member
From: Germany
Registered: 2007-11-10
Posts: 322
Website

Re: EeePC in QEMU

freee wrote:

On Debian/testing your procedure works without the need to patch boch (bochsbios 2.3+20070705-2).

I do have two problems:

1. The screen resolution I get is 800x600 instead of 800x480. One of the points of running eeepc on qemu is to test how applications will look on the small screen.

2. I didn't manage to get the network working. (I'm trying to work in user mode.)

I am afraid it's not possible to change the resolution to 800x480 with the vesa-driver. I tried it, but the screen isn't readable anymore.

Network is possible, but you have to recompile the kernel. ne2k_pci is the kernel-module needed for network in qemu.

While enabling the network-module it's a good idea to make sound working. The emulated soundcard is an ENSONIQ AudioPCI ES1370. So you have to enable this modules in kernel-config.

Here is the way i got it working:

I downloaded and installed the linux-source-2.6.21.4-eeepc_5_all.deb on my Debian-SID (Sidux) machine. Took config-2.6.21.4-eeepc out from the /boot directory of the eeepc-qemu-image, saved it as .config in /usr/src/linux-source-2.6.21.4-eeepc and enabled the needed modules by doing a "make menuconfig".

After saving the .config i made a "make-kpkg binary". When compiling is finished, there are 4 deb-packages in the directory below.

I took the linux-image-2.6.21.4-eeepc_2.6.21.4-eeepc-10.00.Custom_i386.deb (the file-name on your system may be similar) copied it into my qemu-eeepc-image, started the image with qemu. Then i installed the deb-package within qemu.

After inserting the module-names (ne2k_pci for network and snd-es1370 for sound) in /etc/modules and rebooting i was able to enable networking with the network-tool and sound with "alsaconf" on command-line as root.

vofiwg

As english is not my native language, i hope you understand it nevertheless.

Last edited by vofiwg (2007-12-23 3:26:46 pm)

Offline

 

#23 2007-12-24 7:42:32 am

freee
Member
Registered: 2007-12-21
Posts: 12

Re: EeePC in QEMU

Thanks for all the information. If someone else wants to try it, then some more information (like where to download the source from) can be found at:

http://www.ultramobilegeek.com/2007/11/ … nable.html

You also had a small typo. The name of the sound module is snd-ens1370.

I'm not sure why it work since the deb package is installed into the second partition of the unionfs while during the boot I think that the kernel is read from the first partition. Maybe by the time modules are loaded the second partition is already visible. In any case it works.

This reminds me of another question. How can I mount the second partition from the host. I guess that I need to do something similar to 'mount -o loop,offset=32256 good.img /mnt/loop' but with a different offset.

Offline

 

#24 2007-12-24 8:05:49 am

vofiwg
Senior Member
From: Germany
Registered: 2007-11-10
Posts: 322
Website

Re: EeePC in QEMU

I mounted the second partition over a dertour:

Starting up a Linux-Live-Distro within qemu appending the eeepc-image as -hda

Code:

qemu -cdrom linux-live.iso -hda good.img -m 512 -boot d

To install the linux-image-2.6.21.4-eeepc_2.6.21.4-eeepc-10.00.Custom_i386.deb on the good.img you have to do the mount-loop-thing

Code:

sudo mount -o loop,offset=32256 good.img /mnt/loop

copy the linux-image-2.6.21.4-eeepc_2.6.21.4-eeepc-10.00.Custom_i386.deb in to a directory under /mnt/loop. I took /mnt/loop/root

and do a chroot in it:

Code:

sudo chroot /mnt/loop

There you can install the .deb-file

Code:

cd /root   #where i copied the deb-file to

dpkg -i linux-image-2.6.21.4-eeepc_2.6.21.4-eeepc-10.00.Custom_i386.deb

Ignore the error-messages. Leave the chroot with STRG+D, unmount the /mnt/loop and fire up qemu. It should work.


vofiwg

BTW:

When i mounted the good.img with my live-distro i saw, that the second partition in the good.img is very/to small (~160MB). I growed it using qtparted.

Last edited by vofiwg (2007-12-24 8:10:23 am)

Offline

 

#25 2007-12-25 2:14:42 pm

eee-Freak-GER
Member
From: Germany; Baden-Württemberg
Registered: 2007-12-17
Posts: 11

Re: EeePC in QEMU

Hi all Freaks,

does somebody of you found a eeePC VMWare-Image, that can be played with VMWare Player on Windows XP?

Are there some torrents?

Bernhard


ASUS EEE 701 4G BLACK 1 GByte RAM eeeXubuntu r3
NOKIA N800 OS2008 2x 2 Gbyte SD
IREX Illiad II E-Book Reader

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson