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:
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:
We need to disable the welcome screen for Porteus to successfully boot from the apache server. So, comment all lines in
/etc/httpd/conf.d/welcome.conf.
Now, restart the httpd and dhcpd servers.
On the client machine, I am using grub2. The client is configured as follows:
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.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 /mntNow, we need to edit /etc/dhcp/dhcpd.conf. It's content (for my network) will be:
$ sudo mkdir /var/lib/tftpboot/porteus
$ sudo cp -r /mnt/boot/syslinux/* /var/lib/tftpboot/porteus
# dhcpd.confFinally, we need to copy the base os files into the http root, i.e.
#
# configuration for pxe from http://docs.fedoraproject.org/en-US/Fedora/17/html/Installation_Guide/s1-netboot-pxe-config.html
#
option space pxelinux;
option domain-name-servers 192.168.1.1, 8.8.8.8;
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 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
range 192.168.2.200 192.168.2.210;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 192.168.2.1;
option pxelinux.pathprefix "http://192.168.2.1/tftpboot/porteus/";
filename "http://192.168.2.1/tftpboot/porteus/pxelinux.0";
}
}
$ 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
/etc/httpd/conf.d/welcome.conf.
Now, restart the httpd and dhcpd servers.
On the client machine, I am using grub2. The client is configured as follows:
- Download ipxe.iso
- Extract ipxe.krn from the iso and copy it in /boot of the client.
- Edit /etc/grub.d/40_custom and add the following lines:
menuentry "ipxe"{
linux16 /boot/ipxe.krn
} - Create a new grub.cfg
Fedora: /boot/grub2/grub.cfg using grub2-mkconfig
Ubuntu: /boot/grub/grub.cfg using grub-mkconfig