From nobody Sat Jun 05 20:41:47 2021 X-Original-To: freebsd-scsi@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 3383D160EEE3 for ; Sat, 5 Jun 2021 20:41:59 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from webmail5.jnielsen.net (webmail5.jnielsen.net [69.87.218.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.freebsdsolutions.net", Issuer "freebsdsolutions.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FyBPy1ddpz3tbt; Sat, 5 Jun 2021 20:41:57 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from [10.3.101.141] (50-207-240-162-static.hfc.comcastbusiness.net [50.207.240.162]) (authenticated bits=0) by webmail5.jnielsen.net (8.15.2/8.15.2) with ESMTPSA id 155Kfmkn099402 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 5 Jun 2021 14:41:50 -0600 (MDT) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail5.jnielsen.net: Host 50-207-240-162-static.hfc.comcastbusiness.net [50.207.240.162] claimed to be [10.3.101.141] From: John Nielsen Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: The future of the isboot (iBFT / iSCSI boot) module Message-Id: Date: Sat, 5 Jun 2021 14:41:47 -0600 Cc: "trasz@freebsd.org" To: freebsd-scsi@freebsd.org X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FyBPy1ddpz3tbt X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of lists@jnielsen.net designates 69.87.218.172 as permitted sender) smtp.mailfrom=lists@jnielsen.net X-Spamd-Result: default: False [-2.80 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.87.218.172:from]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; SPAMHAUS_ZRD(0.00)[69.87.218.172:from:127.0.2.255]; DMARC_NA(0.00)[jnielsen.net]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6364, ipnet:69.87.218.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-scsi] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N Hi all- TL;DR=E2=80=94do we want to bring iSCSI boot support in to the base = system and if so, how? I=E2=80=99ve been maintaining (badly, at least until recently) the = net/isboot-kmod port which contains Daisuke Aoyama=E2=80=99s isboot = module. The kernel module allows a system to be booted completely via = iSCSI (no switching root, etc) from systems or NICs with native iSCSI = BIOS support or via iPXE and friends. The BIOS (or iPXE) acts as an = initiator and connects to a previously-configured target volume. Boot = (legacy or UEFI) continues normally from there=E2=80=94FreeBSD=E2=80=99s = loader can load and start the kernel, etc. What=E2=80=99s missing in the = base system is something to re-establish the iSCSI session between when = the kernel starts execution and when it tries to mount the root = filesystem. That=E2=80=99s where isboot comes in. Assuming the module is loaded at = boot, it will interpret the data structures in the mostly-standard iSCSI = Boot Firmware Table (iBFT) and use that information to identify the = correct NIC, bring it up, assign an IP address and gateway (if = provided), and establish an iSCSI session with the target. Once that is = done the volume is presented as a SCSI device using the CAM subsystem = and boot proceeds normally. The module has been around for some time (I want to say since FreeBSD = 7). I believe it was developed in tandem or for use with the net/istgt = port. I don=E2=80=99t know if it pre-dates Danny Branniss=E2=80=99 = iscsi_initiator work in base but it definitely pre-dates the = iscsid/iscsictl and ctld in base now. Upstream development on isboot has = stopped from what I can tell and the port was broken for quite some = time. I created a GitHub repo for the project and recently (with help = from several others) I updated the port to 0.2.14, which should work = with FreeBSD 1[1234]. I=E2=80=99ve made a couple more improvements and a = 0.2.15 release isn=E2=80=99t far off. See the project here if = interested: https://github.com/jnielsendotnet/isboot . I=E2=80=99m happy to maintain the port out of tree for the foreseeable = future but I think ideally this functionality should be brought in to = the base system. =46rom what I can tell the port has its own complete = iSCSI initiator implementation, and does not use what is now in = sys/dev/iscsi. That should probably change (and is a longer-term goal of = mine, though I will likely need help), but for now what approach makes = the most sense? 1) Leave it out of tree as an independent port. Pros: easy in the short term (nothing more to do) Cons: less visible to potential users, likely to suffer from bit = rot, duplicate initiator code 2) Bring it in base but keep it separate from sys/dev/iscsi. Pros: also very easy (I=E2=80=99ve done a proof of concept to = support modules/isboot and =E2=80=9Cdevice isboot=E2=80=9D in kernel), = higher visibility, allows module to be added directly to kernel, some = defense against bit rot Cons: duplicate initiator code 3) Bring it in base, but make it depend on the sys/dev/iscsi code. Pros: most of the above, no duplicate initiator code Cons: more effort, slightly out of my depth 4) Bring it in base and merge it with sys/dev/iscsi. Pros: just one module to configure / load / worry about. Could = easily control isboot functionality via loader tunable. Makes it more of = a first class citizen. Cons: more effort again, probably requires broader = ownership/buy-in. What does the list think? Any objections or considerations I=E2=80=99m = not aware of? Any sponsorship volunteers? Thanks, JN