Date: Sat, 20 May 2017 13:52:25 +0200 From: Baptiste Daroussin <bapt@FreeBSD.org> To: hackers@FreeBSD.org Subject: pxe/efi loader rootpath protocols Message-ID: <20170520115225.chsy4phzznik6ow4@ivaldir.net>
next in thread | raw e-mail | index | archive | help
--uul3ndhmpsguhdav Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, In FreeBSD current some changes happened in the loader regarding pxeboot/loader.efi when pxe booting. The goal is to be able to support natively multiple protocols (at first: nfs, tftpfs) in the future http. After having gone some hackish way to avoid problem with chainloading with iPxe chainloading (which I will explain below) I want to move to a proper way. currently in releases if one passes via dhcp root-path ip:path the pxeloader will try look for a nfsroot on the nfs server <ip> under the path <path> if one set root-path path the loader will look for a nfsroot under <path> on the nfs server located on the same machine the pxeboot was loader from via tftp To activate the support for tftpfs by default in the loader, I looked for a way to be able to specify the protocol in the dhcp request. The natural direction would have been to add the protocol scheme in the root-path tftp://ip/path and add a new nfs://ip/path Extending the current supported list of root-path (aka not breaking existing setup). While it looked good, I quickly found a problem: chainloading from ipxe which is for example the default for net booting from qemu in bios mode. ipxe already expect a scheme:/ and knows about tftp:/ but expect something else so it will not load the pxeboot but try to boot directly from tftp:/ So I tried to workaround it by not changing the root-path but abusing a dhcp option that defined a tftpserver to specify to the pxeboot it needs to use tftpfs and not nfs. While it worked, not all dhcp servers supports that, and that is still a problem for the day we add http support. The new approach I would like to go with it having a proper URI parser in libstand for pxeboot/loader.efi to use and ignore the issue with iPXE. Tell the people to configure properly their dhcp server (iPXE is provide a user-class information IPXEBOOT) so the dhcp servers can avoid sending root-path to iPXE for machines supposed to boot on pxeboot. The loader issueing a dhcp request itself it will get the proper root-path and will do the right thing. If you see any problem with this approach please tell it quickly. I want to go fast as I want it in FreeBSD 11.1 I will issue a review soon Best regards, Bapt --uul3ndhmpsguhdav Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlkgLfcACgkQY4mL3PG3 Plo3bg//eQNA8Gkn/DV8CCXTVMDrablaBoZUBGHPxVSmLCnTpuLrm+TO31M0H/VP REZGrTeCv0bhjvo9mX50PhEVJVYJXBBtD4ZZohKa9oEJOv8eywcm9ThR/kHV1C49 gSzFFDavWDSVtZtUBztty5M0slOZ4Y6MBYvpn+tUfjuY1uYJ58lIS+X7+4TaMyeU m0qAOuBbHX9anCvHV/GadwippmJVRBgW6Dim5K65Jjwmga7WEzo8XHMW2/9Sg/Bq WtGPY617Fe4wlzwGmyBUnn9LVAIXL7tKGjIPE1IKnEUVv0VCuJsavvjDJU/vwvBW QXYuLCVj0yw1NihnkNZH85w931aZkwSF5lrhUSsG/iz+5U5/5UfpwJGAX5A2HbLF 8dtGX87tYmQChq1xZPxlRM35OJggGKqeUrxrXCFqZyIm+wJuCqNFl+bQcQpOwKIW SK0TU3gkdIrjklZQK4VUzHL0k+eZRqqCPGpGzPBQNHJ9ObXjxcfMhkz1Nn/6klqT Q1vrNvwb+RJG2yuh/cDfClo5RsOs9alUnjI9tmw8c361dPpzbYZgAESUh4Eu3krh gPDN4d/pi5+SJEvKGFVMPYzncoIhWF/pPlLvJjDI+jYq8wFGUYZ+Gl+dKzjZp1CM tC+OizeYblZIBXgSdKkvzc+qz4VbtFoTiOFwjgM1UdvQoaX1b14= =B8Xe -----END PGP SIGNATURE----- --uul3ndhmpsguhdav--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170520115225.chsy4phzznik6ow4>