iSCSI (Netinstall CentOS to Target)

NOTE - although the installer is able to discover iSCSI Targets, attaching them and successfully installing CentOS failed on the test system. The only workaround at the time of testing was to use the iPXE SANHOOK command prior to running the installer.

Page contents -

Requirements

A live internet connection is required for this method unless using a local repository -

System Setup

The following hardware and settings were used on the test system -

NOTE - A VMWare Virtual Machine was also used for the purpose of capturing the screenshots used in this page. Consequently the screenshots may not reflect the hardware and settings listed above.

Start

PXE boot the Client System using the iPXE Network Boot Program > SANHOOK the iSCSI Target > load the CentOS Netinstall files.

The steps listed above can be executed using an iPXE script. Create a script in the TFTP root directory C:\pxesrv\files\centos.iscsi1.txt. Configure Tiny PXE Server to load iPXE > chainload the script using the altfilename option in config.ini (add altfilename=centos.iscsi1.txt to config.ini). Sample script centos.iscsi1.txt -

NOTE - remember to change any references to ${dhcp-server} to ${next-server} if using ProxyDHCP.

Work through the Netinstall GUI screens. The majority of the screens are self explanatory - the instructions below focus on selecting the iSCSI Target attached using the iPXE SANHOOK command.

As you can see in the screenshot below, the INSTALLATION SOURCE has been set to use a local repository.

INSTALLATION DESTINATION

To select the iSCSI Target attached earlier (using the iPXE > SANHOOK command), click on the INSTALLATION DESTINATION field -
Select Add a disk...
Select the Target from the list > click on Done (top left) -
Ensure that the disk is selected (it should be ticked) > click on Done (top left) -

SOFTWARE SELECTION

A range of software and desktop environments can be selected before proceeding with the installation.

Click on the SOFTWARE SELECTION field -
Select the required Base Environment in the left panel (e.g GNOME Desktop) > select any required Add-Ons in the right panel > click on Done (top left) -

Begin Installation

Once everything has been configured as required, click on the Begin Installation button -

Boot

Assuming all of the steps above have been completed, shutdown the Client System when prompted > add the required settings for your Network Bootstrap Program...

...then boot the Client system.

grub4dos settings (Chainload iPXE)

If using the grub4dos Network Boot Program, iPXE will need to be chainloaded in order to boot the iSCSI Target.

Add the following to C:\pxesrv\files\menu.lst\default (create this file if required) -

Contents of C:\pxesrv\files\centos.iscsi2.txt (create this file if required) -

Refer to the iSCSI URI Syntax section for information about iSCSI Target device names.

pxelinux settings (Chainload iPXE)

If using the PXELINUX Network Boot Program, iPXE will need to be chainloaded in order to boot the iSCSI Target.

Add the following to C:\pxesrv\files\pxelinux.cfg\default (create this file if required) -

Contents of C:\pxesrv\files\centos.iscsi2.txt (create this file if required) -

Refer to the iSCSI URI Syntax section for information about iSCSI Target device names.

iPXE settings

Remember to ensure that the required files are copied to your Tiny PXE Server root directory -

Add the following to the menu section of C:\pxesrv\files\ipxe_menu.txt -

Add the following to the menu options section of C:\pxesrv\files\ipxe_menu.txt -

E.g. -

NOTE - remember to change any references to ${dhcp-server} to ${next-server} if using ProxyDHCP.

Click on one of the following for config.ini settings (edit to reflect your own setup) -

iPXE Scripts

iPXE menus are essentially scripts. It's also possible to specify a simple script to boot the iSCSI Target using the altfilename option in config.ini. For example, create a script in the TFTP root directory C:\pxesrv\files\centos.iscsi2.txt > add altfilename=centos.iscsi2.txt to config.ini. NOTE - remember to change any references to ${dhcp-server} to ${next-server} if using ProxyDHCP.

Sample iPXE script centos.iscsi2.txt -

iSCSI URI Syntax

The format for iSCSI URI's is - iscsi:[servername]:[protocol]:[port]:[LUN]:[targetname]

Where -

If default settings are used for the protocol, port and LUN fields then these fields can be left blank. The following entries for example will all function (assuming the Target IP address is 192.168.1.1 and that this IP address is correctly set as the dhcp-server variable when iPXE is booted) -

Document date - 28th February 2017(DRAFT)