Table of Contents

Installing RHEL / CentOS / Fedora to a SAN target

You can use iPXE to install Red Hat Enterprise Linux (RHEL), CentOS and Fedora from a diskless computer directly to an iSCSI or FCoE SAN target.

This tutorial uses CentOS as an example but should work equally well for both RHEL and Fedora.

Creating the installation script

Create the installation script file install.ipxe:

  #!ipxe
  
  set base http://mirror.centos.org/centos/8/BaseOS/x86_64/os
  
  prompt -k 0x197e -t 2000 Press F12 to install CentOS... || exit
  kernel ${base}/images/pxeboot/vmlinuz initrd=initrd.img inst.repo=${base}
  initrd ${base}/images/pxeboot/initrd.img
  boot

You can replace the base URL (http://mirror.centos.org/centos/8/BaseOS/x86_64/os in this example) with the URL of a local mirror of your Linux distribution.

Copy this install.ipxe file to your web server.

Configuring the DHCP server

Configure a DHCP reservation for the diskless computer with the relevant SAN root-path and boot filename. For example:

  host skunk {
    hardware ethernet 52:54:00:cc:27:de;
    option root-path "iscsi:10.253.253.1::::iqn.2010-04.org.ipxe:skunk";
    filename "http://10.253.253.1/images/centos/install.ipxe";
  }

where root-path specifies the SAN target disk, and filename specifies the URL of the install.ipxe file that you created earlier.

If your target uses access control lists (ACLs), then you may also need to configure an iSCSI initiator-iqn.

Performing the installation

Boot the diskless computer using iPXE. You should see a prompt

  Press F12 to install CentOS...

Press the F12 key to start up the CentOS installer:

CentOS installer welcome screen

Choose the Installation Destination option:

CentOS installer overview screen

Your SAN target should be detected automatically and should show up within Specialized & Network Disks:

CentOS SAN target screen

Troubleshooting

You may need to specify an iSCSI initiator IQN to gain access to the iSCSI target.

If your SAN target is not detected automatically, you can try using the Add a disk button to manually connect to the iSCSI or FCoE target.