User Tools

Site Tools




My notes on installing RHEL on iscsi. Here iscsi target is Fedora18, RHEL is installed in KVM guests. iscsi can be used in 2 ways:

iscsi RHEL deployment on KVM

# The following is used to create the virtual machine
virt-install -n $HOSTNAME -r 1024 --cpu host --nodisks \
        --location /mnt/store/deploy/repos/$DISTRO/ \
        --vcpus 2 -w bridge=virbr0 --os-variant rhel5.4 --graphics vnc \
        --extra-args "ip=$IPADDR netmask= ks=$HOSTNAME repo=$DISTRO"

# the following snippets in the kickstart file do
# - configure the installation on the iscsi target
# - create a simple single partition, so the vmlinuz/initrd can be accessed easily after installation
# - also /etc/grub.conf can be used easily
part / --size 256 --asprimary --grow --fstype=ext4
iscsi --ipaddr= --port=3260 

With this the system can be installed on the iSCSI disk.

booting the iSCSI RHEL with explicit ip handover

# After installation we will mount the iscsi target to access kernel/initrd and /etc/grub.conf
# Here the iscsi target backend is blockdevice /dev/loop8, so we create the partition devnode
# and mount it
kpartx -ay /dev/loop8
mount /dev/mapper/loop8p1 /mnt/tmp
$ ls -1 /mnt/tmp/boot/initramfs* /mnt/tmp/boot/vmlinuz* /mnt/tmp/etc/grub.conf

cat /mnt/tmp/etc/grub.conf

virsh edit rhel5u8i
# and modify for this:
    <type arch='x86_64' machine='pc-1.2'>hvm</type>
    <cmdline>ro root=UUID=3a8ab4f8-b383-4517-bc9e-3eee06704b02 ifname=eth0:52:54:00:03:0e:c2 rd_NO_LUKS rd_NO_LVM ip= rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM LANG=en_US.UTF-8</cmdline>
    <boot dev='hd'/>

booting the iSCSI RHEL, including setting of iBFT

  • now we need to change the kernel options for iBFT. After boot of the system also change in ifcfg-eth0:
    • “ro root=/dev/mapper/vg_rhel6u3i-lv_root rd_NO_LUKS ip=ibft iscsi_firmware=1 ifname=eth0:52:54:00:1d:f9:f9 rd_NO_MD rd_LVM_LV=vg_rhel6u3i/lv_root rd_LVM_LV=vg_rhel6u3i/lv_swap rd_NO_DM LANG=en_US.UTF-8”
  • after boot of the system use “BOOTPROTO=ibft” in /etc/sysconfig/network-scripts/ifcfg-eth0

booting the iSCSI RHEL, including setting of iBFT, using VLAN

  • get ISO from - current builds include the required patches
  • direct ip config (did not work for me, only dhcp):
  • boot it, interrupt with <strg>+<b>, on the ipxe prompt:
vcreate --tag 100 net0
dhcp net0-100
  • alternatively, static ip:
vcreate --tag 123 net1
set net1-123/ip
set net1-123/gateway
set net1-123/netmask
ifopen net1-123
  • for now the initrd does not evaluate VLAN info from the iBFT. You can modify the initrd to pick up the VLAN from iBFT.
  • booting from harddisk: sanboot --no-describe --drive 0x80

reading iBFT infos on booted linux

$ modprobe iscsi_ibft
$ iscsiadm -m fw
# BEGIN RECORD 6.2.0-873.2.el6
iface.initiatorname =
iface.transport_name = tcp
iface.hwaddress = 52:54:00:1d:f9:f9
iface.bootproto = STATIC
iface.ipaddress =
iface.subnet_mask =
iface.primary_dns =
iface.vlan_id = 0
iface.net_ifacename = eth0 =
node.conn[0].address =
node.conn[0].port = 3260
node.boot_lun = 01000000
  • kernel: ip=ibft
  • sanhook
  • 'man dracut' for all commandline options. Can these options use ibft instead of details?
software/iscsi/rhel_on_iscsi.txt · Last modified: 2021/03/23 12:22 (external edit)