I've set up a Xen hypervisor on ubuntu 14.04 and a PV guest also on ubuntu 14.04. I want this PV guest to be a PXE boot server. But when I look at the /boot folder I see that it's empty.

I'm a newbie in virtualization. So where am I supposed to:

  1. take a kernel?
  2. run mkinitramfs to prepare initrd for a network boot?

UPDATE Dear colleagues. I actually need an advice on the workflow of making a custom initrd.img on a PV guest. I know all the stuff regarding setting up a PXE boot server on a host machine. I just want to understand where can I take a kernel image on a PV guest AND what happens to a PV guest when the kernel is updated via apt-get.

Thank you.


If you want to boot systems via network you need 3 things:

  • a dhcp server (for example isc dhcp)
  • a tftp server
  • a location where you can download the preseeding file


The DHCP server has to offer the IP and the boot server to the client.

An example configuration for isc dhcp looks like this:

subnet netmask {
   option routers;

   filename "/pxelinux.0";

   on commit {
        set clip = binary-to-ascii(10, 8, ".", leased-address);
        set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
        execute("/srv/rexio/middleware/bin/rex_io_pxe_dhcpevent", "commit", clip, clhw);

The "next-server" directive tells the client where it finds the tftp server. As you see in the example you can also define a script that gets triggert when a client requests an ip. In this example it calls a script that dynamically creates the pxe boot command file.


For this you can use hpa tftpd. You have to place the kernel and initrd (and the pxe boot command file) in the tftp folder.

You can find the files you need for this (for ubuntu 14.04, 64bit) here: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/

Just download these files and place them in the tftp root folder (i think on ubuntu it is /var/lib/tftpboot).

the preseeding file

To really automate your installation you need a preseeding file. An example for ubuntu can be found here: https://help.ubuntu.com/10.04/installation-guide/example-preseed.txt (this is for 10.04, but i think it won't change much for 14.04)

You can place this file on a http webserver and point the installation to it (via a kernel parameter)

  • 1
    Thank you for an answer. But this is not what I need. I actually know all this stuff. Please, see the update on the topic. – Grigory Jul 20 '14 at 7:38

I've found the solution. It PVGRUB. This tutorial covers all my questions http://wiki.xen.org/wiki/PvGrub

  • It would have been nice if you'd made it clear that you only want to boot VM's this way. Otherwise jfried's answer is closer to what you'd want to do. – Matt Jul 22 '14 at 20:09
  • 1
    @Matt on the opposite. I'm going to boot only hardware diskless servers with the help of this boot server. What jfried wrote is good but it is offtopic. – Grigory Jul 23 '14 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.