Usually the disk preparation is done by a distribution-specific installation tool. If there is no such tool available or the distribution does not support an installation on a SCSI disk, it is also possible to perform these steps manually to make a disk bootable.
The standard Linux disk preparation tool on z Systems™ is zipl. The zipl command writes the boot loader for IBM® z Systems machines. This preparation might be done on the command line or by using the config file /etc/zipl.conf. The zipl command prepares SCSI disks as well as ECKD™ DASDs and it is possible to write several boot configurations (kernel, parameter file, ram disk) to one disk. This possibility is called boot menu option or multi-boot option.
It is also possible to prepare a SCSI dump disk with the zipl command and it is possible to have IPL and dump programs on the same disk. For more information, see the zipl and zipl.conf man pages.
The following zipl.conf example defines two boot configurations, scsi-ipl-1 and scsi-ipl-2, which are selectable with boot program selector 1 and 2. The default boot program selector 0 will IPL scsi-ipl-2 (the default).
/etc/zipl.conf
[defaultboot]
default = scsi-ipl-1
[scsi-ipl-1]
target = "/boot"
image = "/boot/kernel-image-1"
parmfile = "/boot/parmfile-1"
[scsi-ipl-2]
target = "/boot"
image = "/boot/kernel-image-2"
parmfile = "/boot/parmfile-2"
ramdisk = "/boot/initrd-2"
:menu1
target = "/boot"
1=scsi-ipl-1
2=scsi-ipl-2
default=2
zfcp.device=0.0.3c04,0x500507630310c562,0x4010405f00000000 #Defines the SCSI IPL device
root=/dev/sda1 #Defines the root file system
ro #Mounts the root file system read-only
noinitrd #Suppresses an initial RAM disk
selinux=0
audit=0
audit_enable=0
zfcp.allow_lun_scan=0 #Disables the LUN scan for NPIV setups
The kernel parameter zfcp.allow_lun_scan=0 is required for setups using NPIV. The parameter disables the automatic LUN scan. This ensures that the specified LUN is attached in the SCSI mid-layer as sda.
[scsi-ipl-1]
target = "/boot"
image = "/boot/kernel-image-1"
parameters = "zfcp.device=0.0.3c04,0x500507630310c562,0x4010405f00000000 root=/dev/sda1
ro noinitrd selinux=0 audit=0 audit_enable=0 zfcp.allow_lun_scan=0"
This zipl.conf configuration is activated with the following zipl command:
[root@host /]# zipl -m menu1
Using config file '/etc/zipl.conf'
Building bootmap '/boot/bootmap'
Building menu 'menu1'
Adding #1: IPL section 'scsi-ipl-1‘
Adding #2: IPL section 'scsi-ipl-2‘
(default)
Preparing boot device: 08:00
Done.
[root@host /]#
The disk is now bootable and contains two boot configurations, selectable through the boot program selector parameter bootprog (see also Figure 1). Note that the interactive boot menu is not shown when booting from SCSI.