Friday, February 22, 2013

Booting Porteus over the LAN from Fedora 18 server

Continuing my experiments with diskless options, I was going through RAM resident distributions on Wikipedia. Porteus appealed to me as it was able to run KDE desktop from RAM. The newly released version is packaged to boot off the network from a Porteus system with no additional effort.

I wanted to boot from my existing Fedora 18 system and I wanted to avoid using tftp. The recipe I used is as follows:

In order to make sure that both tftp and html could be used:
$ sudo ln -s /var/lib/tftpboot /var/www/html/tftpboot

Obviously, httpd and dhcpd are enabled. There is no need to enable tftp in /etc/xinetd.d/tftp. The following steps were needed in the tftpboot directory:
$ sudo mount -o loop Downloads/Porteus-v2.0-x86_64.iso /mnt
$ sudo mkdir /var/lib/tftpboot/porteus
$ sudo cp -r /mnt/boot/syslinux/* /var/lib/tftpboot/porteus
Now, we need to edit /etc/dhcp/dhcpd.conf. It's content (for my network) will be:
# dhcpd.conf
# configuration for pxe from
  option space pxelinux;
  option domain-name-servers,;
  option pxelinux.magic code 208 = string;
  option pxelinux.configfile code 209 = text;
  option pxelinux.pathprefix code 210  = text;
  option pxelinux.reboottime code 211 = unsigned integer 32;

  subnet netmask {
          option routers;

          class "pxeclients" {
                  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
                  option pxelinux.pathprefix "";
                  filename "";
 Finally, we need to copy the base os files into the http root, i.e.
$ sudo cp /mnt/porteus/base/* /var/www/html

We need to disable the welcome screen for Porteus to successfully boot from the apache server. So, comment all lines in

Now, restart the httpd and dhcpd servers.

On the client machine, I am using grub2. The client is configured as follows:
  1. Download ipxe.iso
  2. Extract ipxe.krn from the iso and copy it in /boot of the client.
  3. Edit /etc/grub.d/40_custom and add the following lines:
    menuentry "ipxe"{
          linux16 /boot/ipxe.krn
  4. Create a new grub.cfg
    Fedora:  /boot/grub2/grub.cfg using grub2-mkconfig
    Ubuntu: /boot/grub/grub.cfg using grub-mkconfig
Reboot the client. Choosing the ipxe option should bring up the Porteus boot menu and it should boot into kde or lxde depending upon the option selected.

Thursday, February 21, 2013

Booting over network - Use ipxe and forget etherboot/gpxe

I was playing around with diskless options and decided to see if I could boot Puppy Linux over the network. As usual, it was easy to find a recipe on the net. I got the gpxe boot linux kernel image for forcedeth driver.

The surprise was the terrible performance I got on a 100mbps network. I did not wait for it to finish booting! On a 1GB network, the performance was 'merely' bad. I did not expect tftp to be so bad!

Searching the net, I realized that gpxe allows html as the protocol instead. There was no change if I used pxelinux.0 and it was even worse if I used gpxelinux.0! I tried pxelinux.0 and gpxelinux.0 from version 5.01 of Syslinux with no improvement. However, the performance was better on my lenovo netbook which needed the r8169 driver. The performance using html protocol was still not any better.

The search for an answer led to the ipxe project. Mercifully, the ipxe.krn from the iso file worked for both the cards. Now, the performance over html was significantly better. It took half the time to boot Puppy Linux using html protocol.