> On Nov 7, 2024, at 1:23 PM, Peter Blok <pb...@bsd4all.org> wrote:
> 
> I have tried to boot over iSCSI using PXE using the ports isboot-kmod. It 
> worked after many tries, but it is not automatic yet.
> 
> At the loader.efi prompt I do:
> set currdev=zfs:zroot/ROOT/default:
> load /boot/kernel/kernel
> load /boot/kernel/opensolaris.ko
> load /boot/kernel/zfs.ko
> load /boot/kernel/acpi_wmi.ko
> load /boot/kernel/smbus.ko
> load /boot/kernel/ichsmb.ko
> load /boot/kernel/uhid.ko
> load /boot/kernel/wmt.ko
> load /boot/kernel/iscsi.ko
> load /boot/modules/isboot.ko
> boot
> 
> And it starts. There is no local storage so everything is really coming over 
> the net.
> 
> Obviously it doesn’t read what is in loader.conf and I’m puzzled what the 
> boot flow is once you have loader.efi loaded. I can put currdev in loader.env 
> but it doesn’t set it although set qqq=something shows up when I type show, 
> so I have the right file.
> 
> How can I boot without having to type the commands?

Typically all you need to do is add the following to /boot/loader.conf after 
installing the isboot port:

isboot_load="YES”

From there it’s up to the boot firmware (iPXE in your case) to make the initial 
connection to the target, populate the iBFT, load the boot blocks and perform 
the early boot. The loader uses the iSCSI disk just like a local disk to do its 
job including load the kernel and modules (including isboot) in to memory.

When the kernel begins execution it probes devices and eventually gets to 
isboot. If isboot locates a valid iBFT it will parse it and use that 
information to re-establish the connection with the iSCSI target (as well as 
bring up the needed network interface etc).

From there the iSCSI volume(s) should be available as regular da(4) devices and 
boot continues like it would on any other type of storage.

The root volume being ZFS adds some moving parts but there’s no reason it 
wouldn’t work. If you can, try to replicate your setup using local storage. 
Once that is working then you just need to add iPXE and the single line above 
to loader.conf.

JN



Reply via email to