Asus EeePC emulated under VMWare

This describes how the Eee PC software was made to run within VMWare on Linux.

 

The restore DVD that came with the PC is needed as the starting point. If you have lost your restore DVD, it has been seen in the bittorrent as EEEPC.iso.

 

Further a working VMWare installation is needed. The description below was made using VMWare Server 1.05 running on Debian 4.0. Also qemu and parted should be installed in Debian. Some of the instructions given below should be run as the root user. If an error occurs on executing some of these instructions, try them again as the root user.

 

Open a terminal, create a new directory, and cd into it. In this example directory ~/eee-pc was chosen.

 

Copy the image tarball from the restore DVD (P701L.gz) into the ~/eee-pc directory.

If the restore DVD is inserted into the drive, then the file P701L.gz should show up and it can be copied from there.

Else if using an iso file, you can mount that iso file in Linux with "mount -o loop /path/to/file.iso /path/to/mount/point".

 

Unzip the P701L.gz image.

joe@debian:~/eee-pc$ gunzip P701L.gz

 

Create a new disk image file called eeepc.img.

joe@debian:~/eee-pc$ qemu-img create eeepc.img 4001M

 

Copy the P701L image into the new image.

joe@debian:~/eee-pc$ dd if=P701L of=eeepc.img bs=512 conv=nocreat,notrunc

After this the file P701L is no longer needed.

 

Look up the first unused loop device.

joe@debian:~/eee-pc$ losetup -f

/dev/loop0

In this example the first unused loop device was /dev/loop0. Use this in the next steps.

 

Get the image as a device.

joe@debian:~/eee-pc$ losetup /dev/loop0 eeepc.img

Verify that this was succesful.

joe@debian:~/eee-pc$ echo $?

0

The above command verifies it and it should return 0.

 

Partition the second drive on the image.

joe@debian:~/eee-pc$ fdisk -C 486 /dev/loop0

 

Create the partition. The text below shows what is on the screen, and what the user types. To summarize the below steps, the user has to type: n, p, 2, <Enter>, 484, w.

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (301-510, default 301): <Enter>

Using default value 301

Last cylinder or +size or +sizeM or +sizeK (301-510, default 510): 484

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

joe@debian:~/eee-pc$

 

Format the second partition.

joe@debian:~/eee-pc$ parted /dev/loop0

GNU Parted 1.7.1

Using /dev/loop0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) mkfs

Partition number? 2

File system?  [ext2]? <Enter>

Error: Error informing the kernel about modifications to partition /dev/loop0p1

-- Invalid argument.  This means Linux won't know about any changes you made to

/dev/loop0p1 until you reboot -- so you shouldn't mount it or use it in any way

before rebooting.

Ignore/Cancel? Ignore

Error: Error informing the kernel about modifications to partition /dev/loop0p2

-- Invalid argument.  This means Linux won't know about any changes you made to

/dev/loop0p2 until you reboot -- so you shouldn't mount it or use it in any way

before rebooting.

Ignore/Cancel? Ignore

(parted) quit

Information: Don't forget to update /etc/fstab, if necessary.

joe@debian:~/eee-pc$

 

Remove the loop device:

joe@debian:~/eee-pc$ losetup -d /dev/loop0

 

Create a mount point for the loopback:

joe@debian:~/eee-pc$ mkdir loop

 

Mount the first partition:

joe@debian:~/eee-pc$ mount -o loop,offset=32256 eeepc.img loop

 

Fix the the xorg.conf file:

joe@debian:~/eee-pc$ gedit loop/etc/X11/xorg.conf

Change "intel" to "vesa" and screen resolutions to 800x600.

To make it easier, the whole file is available, see xorg.conf

 

Download the networking kernel module for VMWare, see pcnet32.ko. Save it to the eee-pc directory.

 

Install the kernel module in the image:

joe@debian:~/eee-pc$ cp pcnet32.ko loop/lib/modules/2.6.21.4-eeepc/kernel/drivers/net

Let the kernel module start on boot:

joe@debian:~/eee-pc$ gedit loop/etc/modules

Add the following line to the end of the list of modules:

pcnet32

Save the file.

 

Umount the loopback file system:

joe@debian:~/eee-pc$  umount loop

 

Remove the mount point for the loopback:

 

joe@debian:~/eee-pc$  rmdir loop

 

Use the qemu-img function from Qemu to convert the image into a vmdk file fit for VMWare.

joe@debian:~/eee-pc$ qemu-img convert eeepc.img -O vmdk eeepc.vmdk

 

The image eeepc.vmdk is now ready to be used in VMWare Server. Create a new directory, for example ~/vmware/eeepc, and move the file eeepc.vmdk, created above, into it, and also the VMWare configuration file, available as  eee-pc.vmx. Then start VMWare Server, and open the eee-pc.vmx virtual machine. Start the virtual machine, and then you'll see the Asus EeePC software running, if all is well.

 

Once the image runs, the networking module needs to be activated. This needs to be done only once.

Within the Asus EEE PC software, running in VMWare, open a terminal ty pressing Ctrl-Alt-t

/home/user>

Become root:

/home/user> sudo su -l

eeepc-joe:/root> cd /

eeepc-joe:/> depmod -a -v 2.6.21.4-eeepc

eeepc-joe:/> modprobe pcnet32

eeepc-joe:/> exit

/home/user> exit

In het Network tab of the EEE PC, there is a Network icon. Clicking that icon opens the Network Connections. It shows Local Area Connection 1. Click Propeties, and then the Hardware tab. Select the Advanced Micro Devices entry, and click the OK button. Then click the Connection button, and select the Connect option. The network will now connect. If all is well, then the network will start automatically next time.

 

 

It has been 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.

It has been noticed that directory /var/log in the image has to be cleared out from time to time.

 

The informatioin above was assembled with the help of trial and error and various sources on the internet:

http://forum.eeeuser.com/viewtopic.php?id=3394

http://www.blogeee.net/forum/viewtopic.php?f=2&t=200