Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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

DHCP

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 10.1.20.0 netmask 255.255.252.0 {
   option routers 10.1.20.1;

   next-server 10.1.22.150;
   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.

TFTP

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)

preseed/url=http://ip.of.your.server/preseed.cfg
share|improve this answer
    
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 at 7:38
up vote 0 down vote accepted

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

share|improve this answer
    
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 at 20:09
    
@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 at 4:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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