====== Installing RHEL / CentOS / Fedora to a SAN target ====== You can use iPXE to install [[http://www.redhat.com/rhel/|Red Hat Enterprise Linux (RHEL)]], [[http://www.centos.org/|CentOS]] and [[http://fedoraproject.org/|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 [[:scripting|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 [[:cfg:root-path]] and boot [[:cfg: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 [[:cfg:root-path]] specifies the SAN target disk, and [[:cfg: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 [[:cfg: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: {{ :screenshots:centos_san_start.png?512x384 |CentOS installer welcome screen}} Choose the **Installation Destination** option: {{ :screenshots:centos_san_overview.png?512x384 |CentOS installer overview screen}} Your SAN target should be detected automatically and should show up within **Specialized & Network Disks**: {{ :screenshots:centos_san_target.png?512x384 |CentOS SAN target screen}} ===== Troubleshooting ===== You may need to specify an [[:cfg:initiator-iqn|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.