[Olpc-za] How I got OLPC working with Qemu on Windows

Peter van Heusden pvh at wfeet.za.net
Thu May 10 06:08:02 EDT 2007


Firstly, I downloaded Qemu for Windows, version 0.9.0 from
http://www.h7.dion.ne.jp/~qemu-win/, the Kqemu accelerator, and the 22nd
of April patch to Qemu (which just contains the Qemu binaries). Then I
downloaded an OS image from
http://olpc.download.redhat.com/olpc/streams/development/ - an ext3
image, build 385 at present. I unpacked all of this in the same folder,
and then made my own qemu-win-olpc.bat file, which contains:

qemu.exe -L . -hda newdisk.img -soundhw all -localtime -net nic -net
tap,ifname=TAP

Now, what's 'newdisk.img'? Aha! The 385 build image has no free space
"out of the box", which causes Sugar to fail to start (X server
continually restarts, since it is being spawned from init and the Sugar
shell is failing since it can't write to disk). So I create a new (1GB)
image using qemu-img create, mounted it in qemu (using -hdc
newimage.img), and dd'ed the filesystem from /dev/hda to /dev/hdc. Then
I switched to mounting newimg.img, and grew the filesystem using
resize2fs /dev/hda1.

Finally, I needed to get networking working - I followed the suggestions
on the wiki about tap and OpenVPN
(http://wiki.laptop.org/go/Talk:Using_QEMU_on_Windows_XP) even though it
meant reconfiguring my home network. To actually get the network up I
had to edit /etc/sysconfig/network-scripts/ifcfg-eth0 and set
ONBOOT=yes, and I still manually have to do /etc/init.d/network restart
after Sugar comes up. I also edited /etc/resolv.conf with the correct
settings for my network.

Anyway, I've now got Sugar up and networked, and thus much easier to
tweak than before.

Peter


More information about the Olpc-za mailing list