rheaalleen
New Member
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:
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.
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?
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
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?