CentOS / Fedora Linux Live CD over cobbler PXE boot

This post will cover configuration of cobbler 2.6.0 running on Cent OS 6.8 for booting Live Fedora Core CD via PXE.

Make sure to adjust SELinux variables to match below settings

[root@nfsserver images]# getsebool -a | grep -i cobbler
cobbler_anon_write --> on
cobbler_can_network_connect --> on
cobbler_use_cifs --> off
cobbler_use_nfs --> off
httpd_can_network_connect_cobbler --> on
httpd_serve_cobbler_files --> on

setsebool -P httpd_can_network_connect on

Mount Live ISO file and copy initrd.img and vmlinuz files from Live ISO to /var/lib/tftpboot/images/Live/

mkdir -p /var/lib/tftpboot/images/Live/
mount -o loop /root/Fedora-Workstation-Live-x86_64-25-1.3.iso /mnt
cp /mnt/isolinux/vmlinuz /mnt/isolinux/initrd.img /var/lib/tftpboot/images/Live/

Define new menu item for Live distribution under /var/lib/tftpboot/pxelinux.cfg/default
Refer to these links for details:

LABEL Live
        kernel /images/Live/vmlinuz
        MENU LABEL Live
        append initrd=/images/Live/initrd.img root=live:http://192.168.0.51/Fedora-Workstation-Live-x86_64-25-1.3.iso rd.live.image
        ipappend 2

In the above example we are downloading complete iso file over network from cobbler server. So we need to place iso file under /var/www/html/ and set correct SELinux security context

cp Fedora-Workstation-Live-x86_64-25-1.3.iso /var/www/html/
chcon --reference=index.html Fedora-Workstation-Live-x86_64-25-1.3.iso 

Note that above doesn’t work with CentOS6.x initrd, since initrd that comes with the CentOS 6 live iso doesn’t include module livenet.
For that reason if above method is attempted with CentOS6.x Live ISO – you will get an error during boot

dracut: FATAL: Don't know how to handle 'root=live:http:

Refer to below bug

https://bugzilla.redhat.com/show_bug.cgi?id=1154670

This entry was posted in Linux, RedHat and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *