|
@@ -0,0 +1,80 @@
|
|
1
|
+Running Etherboot within qemu
|
|
2
|
+=============================
|
|
3
|
+
|
|
4
|
+Michael Brown <mbrown@fensystems.co.uk>
|
|
5
|
+
|
|
6
|
+To get qemu running is fairly simple:
|
|
7
|
+
|
|
8
|
+1. Build the utilities in this directory:
|
|
9
|
+ make
|
|
10
|
+
|
|
11
|
+2. Get the qemu source code:
|
|
12
|
+ cvs -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu \
|
|
13
|
+ login
|
|
14
|
+ cvs -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/qemu \
|
|
15
|
+ co qemu
|
|
16
|
+
|
|
17
|
+3. Configure qemu with
|
|
18
|
+ pushd qemu
|
|
19
|
+ ./configure --enable-system --enable-profiler
|
|
20
|
+ popd
|
|
21
|
+
|
|
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
|
|
24
|
+ e.g. --cc=gcc-3.3.6
|
|
25
|
+
|
|
26
|
+4. Build qemu:
|
|
27
|
+ make -C qemu
|
|
28
|
+
|
|
29
|
+5. As root, set up a TAP virtual network device:
|
|
30
|
+ /sbin/modprobe tun
|
|
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
|
|
34
|
+
|
|
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;
|
|
38
|
+ }
|
|
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
|
|
43
|
+ your own.
|
|
44
|
+
|
|
45
|
+7. As root, restart dhcpd
|
|
46
|
+ /etc/init.d/dhcpd restart
|
|
47
|
+
|
|
48
|
+8. Build Etherboot floppy disk images and pad to 1.44MB
|
|
49
|
+ pushd ../../src
|
|
50
|
+ make bin/rtl8139.dsk
|
|
51
|
+ ./util/dskpad.pl bin/rtl8139.dsk
|
|
52
|
+ popd
|
|
53
|
+
|
|
54
|
+9. Start qemu
|
|
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
|
|
58
|
+
|
|
59
|
+You should see qemu start up, load up Etherboot and attempt to boot
|
|
60
|
+from the network.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+Serial console
|
|
65
|
+==============
|
|
66
|
+
|
|
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.
|
|
71
|
+
|
|
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
|
|
74
|
+
|
|
75
|
+ -serial /dev/pts/XX
|
|
76
|
+
|
|
77
|
+to the qemu command line.
|
|
78
|
+
|
|
79
|
+There is a manual page for "serial-console"; use "man
|
|
80
|
+./serial-console.1" to view it.
|