1 Running Etherboot within qemu
2 =============================
4 Michael Brown <mbrown@fensystems.co.uk>
6 To get qemu running is fairly simple:
8 1. Build the utilities in this directory:
11 2. Get the qemu source code:
12 cvs -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu \
14 cvs -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu \
17 3. Configure qemu with
19 ./configure --enable-system --enable-profiler
22 Note that qemu will not compile with gcc4; if your system's
23 default compiler is gcc4 then specify the path to gcc3 using
29 5. As root, set up a TAP virtual network device:
31 chmod o+rw /dev/net/tun
32 ./tunctl -u <username> -t tap0
33 /sbin/ifconfig tap0 up 10.254.254.2 netmask 255.255.255.0
35 6. As root, add the following fragment to /etc/dhcpd.conf:
36 subnet 10.254.254.0 netmask 255.255.255.252 {
37 range dynamic-bootp 10.254.254.1 10.254.254.1;
39 You will also need to add in any of your usual declarations for
40 Etherboot, e.g. 'filename "vmlinuz.ltsp";'. Note that this setup
41 assumes that your DHCP server, TFTP server etc. all live on the
42 machine you are using for running qemu. If not, then you're on
45 7. As root, restart dhcpd
46 /etc/init.d/dhcpd restart
48 8. Build Etherboot floppy disk images and pad to 1.44MB
51 ./util/dskpad.pl bin/rtl8139.dsk
55 ./qemu/i386-softmmu/qemu -L qemu/pc-bios \
56 -net nic,model=rtl8139 -net tap,ifname=tap0 \
57 -boot a -fda ../../src/bin/rtl8139.dsk
59 You should see qemu start up, load up Etherboot and attempt to boot
67 You can use the program "serial-console" to obtain a virtual serial
68 console for Etherboot running within qemu. Run "./serial-console" on
69 a spare tty (e.g. a separate xterm window) before starting qemu, and
70 ensure that you have enabled CONSOLE_SERIAL in config.h.
72 When serial-console starts, it will print out the message "Slave pty
73 is /dev/pts/XX", where XX is a number. You need to append the option
77 to the qemu command line.
79 There is a manual page for "serial-console"; use "man
80 ./serial-console.1" to view it.