iSCSI (Netinstall ubuntu to Target)

Page contents -

Requirements

A live internet connection is required for this method - offline installations are not covered. Additional requirements include -

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.

Start

PXE boot the Client System and work through the Netinstall GUI screens. The majority of the screens are self explanatory - the instructions below focus on attaching and partitioning the iSCSI Target.

Attach iSCSI Target

When you reach the [!!] Partition disks section, select the Manual option and press [Enter] -
Select the Configure iSCSI volumes option and press [Enter] -
Enter an initiator name (e.g. iqn.client) > highlight <Continue> and press [Enter] -
Select the Log into iSCSI targets option and press [Enter] -
Enter the IP address of the iSCSI Target system (e.g. 192.168.1.1) and press [Enter] -
Enter a username if required for logging in to the iSCSI Target > highlight <Continue> and press [Enter] -
Highlight the iSCSI Target > press [Space] to select > highlight <Continue> and press [Enter] -
Select Finish and press [Enter] -

Partition iSCSI Target

After attaching your iSCSI Target, select it from the list of available devices. In the screenshot below the device is listed as sdb. Highlight the iSCSI device and press [Enter] -
If the iSCSI Target is a RAW image file, a prompt to Create new empty partition table... will be displayed > highlight <Yes> and press [Enter] -
Highlight the FREE SPACE created after executing the preceding step and press [Enter] -
Select an option to partition the FREE SPACE and press [Enter] -
Assuming that the Create a new partition option was selected in the preceding step, enter a size for the new partition (it will default to the whole disk) > highlight <Continue> and press [Enter] -
Chose either a Primary or Logical partition type and press [Enter] -
Select option Done setting up the partition and press [Enter] -
Select option Finish partitioning and write changes to disk and press [Enter] -
Ignore the Swap Space warning > highlight <No> and press [Enter] -
Highlight <Yes> and press [Enter] to write the changes to the disk -

Continue to work through the Netinstall GUI screens.

Install Grub

On reaching the [!] Install the GRUB boot loader on a hard disk screen, when prompted to Install the GRUB boot loader to the master boot record? > highlight <Yes> and press [Enter] -
Ensure that the iSCSI Target is selected and press [Enter] -

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\ubuntu.iscsi.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\ubuntu.iscsi.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\ubuntu.iscsi.txt > add altfilename=ubuntu.iscsi.txt to config.ini. NOTE - remember to change any references to ${dhcp-server} to ${next-server} if using ProxyDHCP.

Sample iPXE script ubuntu.iscsi.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)