Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
wiki:qemupxe [2009/05/22 17:24] less1 |
wiki:qemupxe [2009/05/23 08:10] (current) less1 |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== How to use qemu with pxe? ====== | ====== How to use qemu with pxe? ====== | ||
| - | you can refer the wiki page [[http://www.etherboot.org/wiki/doku.php|official wiki]] for more details. | + | you can refer the wiki page [[http://www.etherboot.org/wiki/qemu|official wiki]] for more details. |
| This page contains my experiences. | This page contains my experiences. | ||
| Line 12: | Line 12: | ||
| - [[http://etherboot.org/gtest/initrd.bz2]] | - [[http://etherboot.org/gtest/initrd.bz2]] | ||
| - | Then I modified the **gtest.gpxe** to use //tftp// instead of //http//.\\ | + | Then I modified the //gtest.gpxe// to use //tftp// instead of //http//.\\ |
| - | Edited contents of my **gtest.gpxe** are as follows | + | Edited contents of my //gtest.gpxe// are as follows |
| <code> | <code> | ||
| #!gpxe | #!gpxe | ||
| Line 23: | Line 23: | ||
| Then I used qemu with bootp to boot with tftp in following way. | Then I used qemu with bootp to boot with tftp in following way. | ||
| <code> | <code> | ||
| - | qemu -bootp #!gpxe | + | qemu -bootp tftp://10.0.0.88//gtest.gpxe -tftp /home/myname/pxe/ -fda gpxe.dsk |
| - | 2 kernel tftp://10.0.0.88//bz2bzImage root=100 | + | |
| - | 3 initrd tftp://10.0.0.88//initrd.bz2 | + | |
| - | 4 boot | + | |
| - | qemu -bootp tftp://10.0.0.88//gtest.gpxe -tftp /home/myname/pxe/ -fda gpxe.pdsk | + | |
| </code> | </code> | ||
| The IP address used here //10.0.0.88// can be anything, It's not the IP address of my machine. | The IP address used here //10.0.0.88// can be anything, It's not the IP address of my machine. | ||
| - | As long as you use the same IP address in qemu command and in **gtest.gpxe** file, it should work. | + | As long as you use the same IP address in qemu command and in //gtest.gpxe// file, it should work. |
| ==== How it works? ==== | ==== How it works? ==== | ||
| Line 37: | Line 33: | ||
| - Firstly, it will simulate the //dhcpd// server and return the 10.0.0.88 IP address to the booting pxe. | - Firstly, it will simulate the //dhcpd// server and return the 10.0.0.88 IP address to the booting pxe. | ||
| - Next, It will simulate //tftp// server, with root directory at ///home/myname/pxe/// and provides files from that location to the pxe. | - Next, It will simulate //tftp// server, with root directory at ///home/myname/pxe/// and provides files from that location to the pxe. | ||
| - | - pxe assumes that it is talking to //tftp// server and its request for file | + | - pxe assumes that it is talking to //tftp// server and its request for file <code>tftp://10.0.0.88//gtest.gpxe</code> will be mapped to ///home/myname/pxe/gtest.gpxe// file. |
| + | ===== qemu with HTTP ===== | ||
| + | For this test, all that you need to have is gpxe.dsk and following command should work without any problems. | ||
| + | <code> | ||
| + | qemu -fda gpxe.dsk -net nic -net user -bootp http://etherboot.org/gtest/gtest.gpxe | ||
| + | </code> | ||
| + | |||
| + | I also created the copy of gtest on my own web server for testing purpose, and it worked with following command. | ||
| + | <code> | ||
| + | $ qemu -fda gpxe.dsk -net nic -net user -bootp http://10.0.0.2/gpxe/gtest.gpxe | ||
| + | </code> | ||