|
| 1 | +// Module included in the following assemblies |
| 2 | +// |
| 3 | +// * installing/installing_bare_metal/installing-bare-metal.adoc |
| 4 | +// * installing/installing_bare_metal/installing-restricted-networks-bare-metal.adoc |
| 5 | +// * installing_bare_metal/installing-bare-metal-network-customizations.adoc |
| 6 | + |
| 7 | +:_mod-docs-content-type: PROCEDURE |
| 8 | +[id="installation-user-infra-machines-advanced-customizing-live-{boot}-iscsi-manual_{context}"] |
| 9 | += Customizing a live install {boot-media} for an iSCSI boot device |
| 10 | + |
| 11 | +You can set the iSCSI target and initiator values for automatic mounting, booting and configuration using a customized version of the live {op-system} image. |
| 12 | + |
| 13 | +.Prerequisites |
| 14 | +. You have an iSCSI target you want to install {op-system} on. |
| 15 | + |
| 16 | +.Procedure |
| 17 | + |
| 18 | +. Download the `coreos-installer` binary from the link:https://mirror.openshift.com/pub/openshift-v4/clients/coreos-installer/latest/[`coreos-installer` image mirror] page. |
| 19 | + |
| 20 | +ifeval::["{boot-media}" == "ISO image"] |
| 21 | +. Retrieve the {op-system} ISO image from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and run the following command to customize the ISO image with the following information: |
| 22 | ++ |
| 23 | +[source,text] |
| 24 | +---- |
| 25 | +$ coreos-installer iso customize \ |
| 26 | + --pre-install mount-iscsi.sh \ <1> |
| 27 | + --post-install unmount-iscsi.sh \ <2> |
| 28 | + --dest-device /dev/disk/by-path/<IP_address>:<port>-iscsi-<target_iqn>-lun-<lun> \ <3> |
| 29 | + --dest-ignition config.ign \ <4> |
| 30 | + --dest-karg-append rd.iscsi.initiator=<initiator_iqn> \ <5> |
| 31 | + --dest-karg-append netroot=<target_iqn> \ <6> |
| 32 | + -o custom.iso rhcos-<version>-live.x86_64.iso |
| 33 | +---- |
| 34 | +<1> The script that gets run before installation. It should contain the `iscsiadm` commands for mounting the iSCSI target and any commands enabling multipathing. |
| 35 | +<2> The script that gets run after installation. It should contain the command `iscsiadm --mode node --logout=all`. |
| 36 | +<3> The location of the destination system. You must provide the IP address of the target portal, the associated port number, the target iSCSI node in IQN format, and the iSCSI logical unit number (LUN). |
| 37 | +<4> The Ignition configuration for the destination system. |
| 38 | +<5> The iSCSI initiator, or client, name in IQN format. The initiator forms a session to connect to the iSCSI target. |
| 39 | +<6> The the iSCSI target, or server, name in IQN format. |
| 40 | +endif::[] |
| 41 | + |
| 42 | +ifeval::["{boot-media}" == "PXE environment"] |
| 43 | +. Retrieve the {op-system} `kernel`, `initramfs` and `rootfs` files from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and run the following command to create a new customized `initramfs` file with the following information: |
| 44 | ++ |
| 45 | +[source,text] |
| 46 | +---- |
| 47 | +$ coreos-installer pxe customize \ |
| 48 | + --pre-install mount-iscsi.sh \ <1> |
| 49 | + --post-install unmount-iscsi.sh \ <2> |
| 50 | + --dest-device /dev/disk/by-path/<IP_address>:<port>-iscsi-<target_iqn>-lun-<lun> \ <3> |
| 51 | + --dest-ignition config.ign \ <4> |
| 52 | + --dest-karg-append rd.iscsi.initiator=<initiator_iqn> \ <5> |
| 53 | + --dest-karg-append netroot=<target_iqn> \ <6> |
| 54 | + -o custom.img rhcos-<version>-live-initramfs.x86_64.img |
| 55 | +---- |
| 56 | +<1> The script that gets run before installation. It should contain the `iscsiadm` commands for mounting the iSCSI target and any commands enabling multipathing. |
| 57 | +<2> The script that gets run after installation. It should contain the command `iscsiadm --mode node --logout=all`. |
| 58 | +<3> The location of the destination system. You must provide the IP address of the target portal, the associated port number, the target iSCSI node in IQN format, and the iSCSI logical unit number (LUN). |
| 59 | +<4> The Ignition configuration for the destination system. |
| 60 | +<5> The iSCSI initiator, or client, name in IQN format. The initiator forms a session to connect to the iSCSI target. |
| 61 | +<6> The the iSCSI target, or server, name in IQN format. |
| 62 | +endif::[] |
| 63 | ++ |
| 64 | +For more information about the iSCSI options supported by `dracut`, see the link:https://www.man7.org/linux/man-pages/man7/dracut.cmdline.7.html[`dracut.cmdline` manual page]. |
0 commit comments