From nobody Fri Nov 29 20:50:16 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0QLg3h2Zz5fhc8 for ; Fri, 29 Nov 2024 20:50:51 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from webmail5.jnielsen.net (webmail5.jnielsen.net [IPv6:2607:f170:34:11::b0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.freebsdsolutions.net", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0QLf0mJ8z412X for ; Fri, 29 Nov 2024 20:50:49 +0000 (UTC) (envelope-from lists@jnielsen.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of lists@jnielsen.net designates 2607:f170:34:11::b0 as permitted sender) smtp.mailfrom=lists@jnielsen.net; dmarc=none Received: from smtpclient.apple ([IPv6:2607:fa18:e2fe:2d6a:5d24:3c6b:a967:e7e4]) (authenticated bits=0) by webmail5.jnielsen.net (8.17.2/8.17.2) with ESMTPSA id 4ATKoTcR084065 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 29 Nov 2024 13:50:32 -0700 (MST) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail5.jnielsen.net: Host [IPv6:2607:fa18:e2fe:2d6a:5d24:3c6b:a967:e7e4] claimed to be smtpclient.apple Content-Type: multipart/alternative; boundary=Apple-Mail-FD65037E-1E61-4595-B6D0-C38506741881 Content-Transfer-Encoding: 7bit From: John Nielsen List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org Mime-Version: 1.0 (1.0) Subject: Re: EFI boot with iPXE Date: Fri, 29 Nov 2024 13:50:16 -0700 Message-Id: References: <0F7B3EDE-D3B4-4693-B84F-A68AD6089A76@bsd4all.org> Cc: freebsd-net@freebsd.org In-Reply-To: <0F7B3EDE-D3B4-4693-B84F-A68AD6089A76@bsd4all.org> To: Peter Blok X-Mailer: iPhone Mail (21H221) X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.999]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:6364, ipnet:2607:f170:30::/44, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_XAW(0.00)[]; APPLE_IOS_MAILER_COMMON(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DMARC_NA(0.00)[jnielsen.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Y0QLf0mJ8z412X X-Spamd-Bar: --- --Apple-Mail-FD65037E-1E61-4595-B6D0-C38506741881 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Nov 7, 2024, at 1:23=E2=80=AFPM, Peter Blok wrote: >=20 > I have tried to boot over iSCSI using PXE using the ports isboot-kmod. It w= orked after many tries, but it is not automatic yet. >=20 > At the loader.efi prompt I do: > set currdev=3Dzfs: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 >=20 > And it starts. There is no local storage so everything is really coming ov= er the net. >=20 > Obviously it doesn=E2=80=99t read what is in loader.conf and I=E2=80=99m p= uzzled what the boot flow is once you have loader.efi loaded. I can put curr= dev in loader.env but it doesn=E2=80=99t set it although set qqq=3Dsomething= shows up when I type show, so I have the right file. >=20 > 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=3D"YES=E2=80=9D =46rom there it=E2=80=99s up to the boot firmware (iPXE in your case) to mak= e the initial connection to the target, populate the iBFT, load the boot blo= cks and perform the early boot. The loader uses the iSCSI disk just like a l= ocal disk to do its job including load the kernel and modules (including isb= oot) in to memory. When the kernel begins execution it probes devices and eventually gets to is= boot. If isboot locates a valid iBFT it will parse it and use that informati= on to re-establish the connection with the iSCSI target (as well as bring up= the needed network interface etc). =46rom there the iSCSI volume(s) should be available as regular da(4) device= s and boot continues like it would on any other type of storage. The root volume being ZFS adds some moving parts but there=E2=80=99s no reas= on it wouldn=E2=80=99t work. If you can, try to replicate your setup using l= ocal storage. Once that is working then you just need to add iPXE and the si= ngle line above to loader.conf. JN --Apple-Mail-FD65037E-1E61-4595-B6D0-C38506741881 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On Nov 7, 2024, at 1:23=E2=80=AFPM, Peter Blok <pblok@bsd4all.org> wr= ote:

I have tried to boot over iSCSI using PXE using the ports isboot-kmod. I= t worked after many tries, but it is not automatic yet.

At the loader.efi prompt I do:
set currdev=3Dzf= s: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/ke= rnel/smbus.ko
load /boot/kernel/ichsmb.ko
lo= ad /boot/kernel/uhid.ko
load /boot/kernel/wmt.ko
<= span>load /boot/kernel/iscsi.ko
load /boot/modules/isboot.ko=
boot

And it starts. There i= s no local storage so everything is really coming over the net.

Obviously it doesn=E2=80=99t read what is in loader.con= f and I=E2=80=99m puzzled what the boot flow is once you have loader.efi loa= ded. I can put currdev in loader.env but it doesn=E2=80=99t set it although s= et qqq=3Dsomething shows up when I type show, so I have the right file.

How can I boot without having to type the comma= nds?

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

isboot_load=3D"YES=E2=80=9D
<= span style=3D"caret-color: rgb(5, 5, 5); color: rgb(5, 5, 5); font-family: v= ar(--code-font); font-size: 12.75px;">
=46rom there it=E2= =80=99s up to the boot firmware (iPXE in your case) to make the initial conn= ection to the target, populate the iBFT, load the boot blocks and perform th= e early boot. The loader uses the iSCSI disk just like a local disk to do it= s 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 t= arget (as well as bring up the needed network interface etc).

=
=46rom there the iSCSI volume(s) should be available as regular d= a(4) devices and boot continues like it would on any other type of storage.<= /div>

The root volume being ZFS adds some moving parts bu= t there=E2=80=99s no reason it wouldn=E2=80=99t work. If you can, try to rep= licate your setup using local storage. Once that is working then you just ne= ed to add iPXE and the single line above to loader.conf.

JN



= --Apple-Mail-FD65037E-1E61-4595-B6D0-C38506741881--