[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Testing the gtk fe with qemu



Hi davide

i'm preparing a bootable netinst iso image including an hacked initrd containing all the files needed by the gtk fe, but when i start qemu i cannot obtain vga modes. all i get are "dirty" qemu vga screens, even if XFree config file was setten do use vga driver at 640x480x8, any idea on how to obtain clean screens?

ciao

attilio


Davide Viti wrote:
Hi,
here follow a few notes I've written as I was trying to get the gtk fe
for the installer to work with qemu. I did not go too deep into details
but it shoud be really easy to follow these steps.

For my tests I used sarge-i386-netinst.iso rc3 [1] and attilio X
environment [2]:

[1] http://cdimage.debian.org/pub/cdimage-testing/sarge_d-i/i386/rc3/sarge-i386-businesscard.iso

[2] https://debian.polito.it/downloads/d-i_xsrv.tar.gz

In order to be able to use [2] from within Qemu, I created and iso
image that qemu will use as if it were a cdrom

cp d-i_xsrv.tar.gz isodir
mkisofs -r -o x_env_di.iso isodir/

After creating an hd image test_di.img (didn't care about its huge size)


qemu-img create test_di.img -s 1G


start qemu:

qemu -cdrom sarge-i386-netinst.iso -hda test_di.img -boot d


boot the installer:
expert vga=788

configure network as to have loopback interface configure partitions (if you need) as to have enough swap space

switch to console (ctrl-f2)

mount -o remount,size=200M /dev/shm /
umount /cdrom


ctrl-alt-2 (to switch to qemu monitor)
(qemu) change cdrom x_env_di.iso
ctrl-alt-1 (to get back to vt2)

now mount the cdrom image containig the X environment

mount /dev/cdroms/cdrom0 /cdrom
tar xzf /cdrom/d-i_xsrv.tar.gz -C /


now edit X config file and configure qemu ps2 mouse



nano /etx/X11/XF86Config-4

========================================
Section "InputDevice"
	Identifier "Mouse0"
...
-	Option "Protocol" "IMPS/2" <<<<<<< change this...
+	Option "Protocol" "PS/2"   <<<<<<< into this
	Option "Device" "/dev/psaux"
...
========================================

now edit the gtk fe startup script and comment out a the lines
which deal with usb mouse like this:


nano /bin/gtk_go.sh

========================================
# modprobe usbmouse
# modprobe mousedev
========================================

remove psaux and re-create it

rm /dev/psaux
mknod /dev/psaux c 10 1



before running the gtk fe save the status of the VM so that
you don't have to go through all these steps every time:

ctrl-alt-2
(qemu) savevm di_vm
ctrl-alt-1

finally...

gtk_go.sh


Have fun!
here's a screenshot of the Japanese d-i
http://www.webalice.it/zinosat/gtk_fe_jp.jpg

ciao

Davide



Reply to: