iSCSI mount in Fedora CoreOS with iPXE

rheaalleen

New Member
Joined
Dec 10, 2023
Messages
5
Reaction score
1
Credits
67
Was looking into SAN for booting a diskless CoreOS VM but didn´t find any good ressources so I tried a bit for myself.

Found myself various solutions:

  • iPXE boot with attached disk from hypervisor and define INSTALLDEV /dev/sda in iPXE script (No SAN)
  • Live boot iso or iPXE with an Ignition file that configures iscsi, use coreos-installer afterwards to install into
  • iPXE boot without INSTALLDEV but dracut initrd options to mount iscsi then use coreos-installer afterwards to install into
Last two options also have the use case to never install the OS, run live and use the iscsi only for persistence for data that needs it.

Using dracut iscsi initrd option + INSTALLDEV together results in errors I haven´t investigated yet.

BUT my initial idea was to mount iSCSI with sanhook then install OS into it, similar to using dracut to mount.

Code:
#!ipxe

set STREAM stable
set VERSION 39.20240128.3.0
set CONFIGURL https://example.com/config.ign

sanhook iscsi-uri

set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64

kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel-x86_64 initrd=main coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img ignition.firstboot ignition.platform.id=metal ignition.config.url=${CONFIGURL}
initrd --name main ${BASEURL}/fedora-coreos-${VERSION}-live-initramfs.x86_64.img

boot

With minimal Ignition config for user SSH machine boots up but iscsi missing, no /dev/sdX. iPXE says iscsi registered successfully to SAN disk 0x80.

Is this possible, mount with sanhook, then use the already attached iscsi to use INSTALLDEV during boot?
 


Working solution for SAN with dracut
Code:
#kernel http://IP/fedora_kernel initrd=main coreos.live.rootfs_url=http://IP/fedora_rootfs ip=ibft root=iscsi-uri coreos.inst.install_dev=${INSTALLDEV} ignition.firstboot ignition.platform.id=metal ignition.config.url=${CONFIGURL}

That still leaves my initial concept of using sanhook without a working solution
 

Members online

No members online now.

Top