Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2005-11-15 22:34:02
Size: 186
Editor: PeMac
Comment:
Revision 8 as of 2006-02-16 23:38:00
Size: 2239
Editor: ?DavideViti
Comment: Added instruction for performing a floppy install
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
To test D-I ["qemu"] use : ## page was renamed from DebianInstallerQemu
= Resources =
[http://fabrice.bellard.free.fr/qemu/ Official page]
Line 3: Line 5:
qemu -user-net -cdrom mini.iso -hda disk.img ''#qemu'' IRC channel on ''irc.freenode.net''
Line 5: Line 7:
disk.img has obviously to be created before, and mini.iso is a valid ["iso image"] of the DebianInstaller = Intro =
Qemu can be used to simulate various hardware configurations and to
easily test the debian installer in various conditions; it's great for
testing "delicate" things like a partitioner, since disk devices are
usually represented by files.

It can be used also to emulate other architectures: I tested amd64 and
powerpc versions on the installer on my i386 host machine. At the
moment (qemu-0.8.0) sparc and ARM are being worked on and have some
basic support.

Here some possible d-i boot configurations:

 * floppy installs
 * installs from USB (??)
 * lowmem installs

= Basic setup =
First of all, you need to create a file which will acts
as an hard disk for the virtual machine:

{{{
$ qemu-img create hd_img.img 500M
}}}

You can then download an iso image of the installer, or create one
yourself; you can then run a g-i session by running the following
command:

{{{
$ qemu -user-net -cdrom mini.iso -hda hd_image.img -boot d
}}}

= Qemu monitor =
Qemu has a "monitor" (ctrl-alt-2) which can be used to access various
funcionalities such as:

 * "screendump" which can be used to take a screenshot of
  the VM screen

 * "sendkey" is very useful when you want to switch to VT2 during
  a g-i vession ("sendkey ctrl-alt-f2)

 * "gdbserver" is useful for attaching gdb to a process running inside
  the VM

 * "loadmem/savemem" used to save/restore the state of the VM, saves you alot
  of time when you have performed all the steps needed to reproduce a bug

= Floppy install =
To test an installation from the floppy images, you first need to grab [http://people.debian.org/~joeyh/d-i/images/daily/floppy/boot.img boot.img] and [http://people.debian.org/~joeyh/d-i/images/daily/floppy/root.img root.img]
and use the files as if they were floppy disks:

{{{
$ qemu -user-net -fda boot.img -hda hd_image.img -boot a
}}}

once you're asked to insert the root disk, just switch to "monitor" (ctrl-alt-2) and

{{{
(qemu) change fda root.img
}}}

switch back to d-i (ctrl-alt-1) and press ENTER

Resources

[http://fabrice.bellard.free.fr/qemu/ Official page]

#qemu IRC channel on irc.freenode.net

Intro

Qemu can be used to simulate various hardware configurations and to easily test the debian installer in various conditions; it's great for testing "delicate" things like a partitioner, since disk devices are usually represented by files.

It can be used also to emulate other architectures: I tested amd64 and powerpc versions on the installer on my i386 host machine. At the moment (qemu-0.8.0) sparc and ARM are being worked on and have some basic support.

Here some possible d-i boot configurations:

  • floppy installs
  • installs from USB (??)
  • lowmem installs

Basic setup

First of all, you need to create a file which will acts as an hard disk for the virtual machine:

$ qemu-img create hd_img.img 500M

You can then download an iso image of the installer, or create one yourself; you can then run a g-i session by running the following command:

$ qemu -user-net -cdrom mini.iso -hda hd_image.img -boot d

Qemu monitor

Qemu has a "monitor" (ctrl-alt-2) which can be used to access various funcionalities such as:

  • "screendump" which can be used to take a screenshot of
    • the VM screen
  • "sendkey" is very useful when you want to switch to VT2 during
    • a g-i vession ("sendkey ctrl-alt-f2)
  • "gdbserver" is useful for attaching gdb to a process running inside
    • the VM
  • "loadmem/savemem" used to save/restore the state of the VM, saves you alot
    • of time when you have performed all the steps needed to reproduce a bug

Floppy install

To test an installation from the floppy images, you first need to grab [http://people.debian.org/~joeyh/d-i/images/daily/floppy/boot.img boot.img] and [http://people.debian.org/~joeyh/d-i/images/daily/floppy/root.img root.img] and use the files as if they were floppy disks:

$ qemu -user-net -fda boot.img -hda hd_image.img -boot a

once you're asked to insert the root disk, just switch to "monitor" (ctrl-alt-2) and

(qemu) change fda root.img

switch back to d-i (ctrl-alt-1) and press ENTER