Using gPXE with QEMU

Posted on May 10, 2008. Filed under: Linux Kernel, Software |

PXE stands for Pre eXecution Environment. It is used to boot off from a network. The PXE code is usually contained in a ROM on your network card. It is supplied by your card manufacturer. These PXE ROMs conform to a PXE specification laid out by Intel Corporation (I guess).

Now, coming to gPXE, it is a PXE ROM which is open source and which conforms to the Intel PXE specs. Isn’t it interesting ?? It can be burnt onto your Ethernet card by a software given by Intel. gPXE is mainly used to boot Linux kernel by fetching it from remote locations, from a TFTP or a HTTP server.

Now I hear you asking, “Is there a way to test this cool stuff without risking my Ethernet card ?”. The answer is “Yes, you can!“. Now, Lets see how to do it. The things you need are,

Next, build the gPXE from source following the instructions in the source tarball. You’ll see a gpxe.usb file in src/bin/ directory. Thats the USB image of the gPXE ROM which can be put into an USB mass storage device directly. Now execute the following command

qemu -hda bin/gpxe.usb -net nic -net user -bootp http:/etherboot.org/gtest/gtest.gpxe

http://quark.entity.com/gtest/gtest.gpxe is the location where a kernel is located.

Once you’ve booted successfully, you may now be proud that you’ve booted across from a thousand miles away! Fun! Isn’t it ?

Make a Comment

Make a Comment: ( 5 so far )

blockquote and a tags work here.

5 Responses to “Using gPXE with QEMU”

RSS Feed for Brain Dump Comments RSS Feed

Linux boots, but it gives me a kernel panic.

Would it be possible to correct this?

@zoobab

Yes, definitely. Its mostly that the kernel could not mount the root filesystem. How have you specified your root filesystem ?

I just typed:

“qemu -hda bin/gpxe.usb -net nic -net user -bootp http://quark.entity.com/gtest/gtest.gpxe

It works now. I have the tomsrtbt root shell.

It might be great to provide a simple webserver that is serving the kernel+initrd on the localhost.

Just for the pleasure to test other kernels and initrds.

After that, write a script that find kernels and initrds in an ISO file.


Where's The Comment Form?

  • Feed

  • Ohloh

  • Bookmarks

  • Categories

  • Visitors


  • Hits

    • 21,512 hits

Liked it here?
Why not try sites on the blogroll...