using kpartx tool from multipath-utils package create mapper device for partitions in ulfs2.img
kpartx -av ulfs2.img
create temporary mount point
mkdir /mnt/tmp
mount first partition to temporary directory
mount /dev/mapper/loop0p1 /mnt/tmp
open /mnt/tmp/boot/grub/grub.cfg file and replace netroot=iscsi:192.168.180.254::::iqn.2025-08.com.umvirt.nas:ulfs to netroot=iscsi:192.168.180.254::::iqn.2025-08.com.umvirt.nas:ulfs2:
menuentry "Umvirt Linux From Scratch 0.2.3 iSCSI " {
linux /boot/vmlinuz root=/dev/sda1 netroot=iscsi:192.168.180.254::::iqn.2025-08.com.umvirt.nas:ulfs2 \
ip=dhcp ro console=ttyS0 console=tty0
initrd /boot/initramfs-6.13.4.img
}
also it's good idea to edit host name in /mnt/tmp/etc/hostname file to "ulfs-pxeclient2:" for example.
unmount partition from temporary directory
umount /mnt/tmp
delete mapper device for ulfs2.img
kpartx -dv ulfs2.img
Create file ulfs2 in /srv/tftp folder
#!ipxe
set initiator-iqn iqn.2016-04.com.open-iscsi:67637ebdf4a9
sanhook --drive 0x80 iscsi:192.168.180.254:6:3260:0:iqn.2025-08.com.umvirt.nas:ulfs2
sanboot --drive 0x80
In subne4 edit object reservations
"reservations": [
{
"hostname": "pxeclient1",
"hw-address": "52:54:00:f1:13:66",
"ip-address": "192.168.180.21",
"boot-file-name": "ulfs"
},
{
"hostname": "pxeclient2",
"hw-address": "52:54:00:6d:f4:48",
"ip-address": "192.168.180.22",
"boot-file-name": "ulfs2"
}
check config with
kea-dhcp4 -t /etc/kea/kea-dhcp4.conf
restart service
systemctl restart kea-dhcp4-server
create link to file
cd backstores/fileio
create ulfs2 /sources/iscsi/ulfs2.img
create portal
cd /iscsi
create iqn.2025-08.com.umvirt.nas:ulfs2
create LUN
cd /iscsi/iqn.2025-08.com.umvirt.nas:ulfs2/tpg1/luns
create /backstores/fileio/ulfs2
create acl
cd ../acls
create iqn.2016-04.com.open-iscsi:67637ebdf4a9
disable authentication
cd /iscsi/iqn.2025-08.com.umvirt.nas:ulfs2/tpg1/acls/iqn.2016-04.com.open-iscsi:67637ebdf4a9
set attribute authentication=0
save
cd /
saveconfig
exit
exit
Just launch clients. Boot images should be assigned according to MAC addresses correctly.