Page MenuHomeFreeBSD

loader.efi: Recognize new memdisk=<url> and memcd=<url> options
Needs ReviewPublic

Authored by imp on Fri, Jun 19, 6:40 PM.
Tags
None
Referenced Files
F160415138: D57677.diff
Wed, Jun 24, 6:38 AM
F160394409: D57677.id180086.diff
Wed, Jun 24, 2:00 AM
F160380268: D57677.diff
Tue, Jun 23, 10:21 PM
Unknown Object (File)
Mon, Jun 22, 2:55 AM
Unknown Object (File)
Sun, Jun 21, 8:47 PM
Unknown Object (File)
Sat, Jun 20, 3:28 AM

Details

Reviewers
manu
Summary

Support ipxe downloading of a memory disk (either presented to the OS as
a harddisk or a cd). This requires an ipxe server since it uses the ipxe
download protocol to grab the disk. If there is a disk, we add it to the
environment as a disk, and then the rest of the bootloader just sees it
and boots from it.

I've cribbed code from https://github.com/russor/memdisk_uefi and
adapted it to work in the context of the FreeBSD bootloader.

The ixpe_download.h file was created from the documentation of the
interface.

So a .ipxe file with the line
boot loader.elf memdisk=${cwduri}FreeBSD-15.1-RELEASE-amd64-bootonly.iso
would use the FreeBSD boot loader to boot the FreeBSD 15.1 release.

You'll need nvdimm.ko in the kernel, since that's the vector by which we communicate
this ramdisk exists.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74133
Build 71016: arc lint + arc unit

Event Timeline

imp requested review of this revision.Fri, Jun 19, 6:40 PM

Can you put a quick steps to use this in the commit message to support a future rewrite of diskless.7 and the relevant handbook sections? We have big problem of modern netboot is totally undocumented, but I cant fix it because I don't know how to use it.

So I can download the disk, but we hang when the loader tries to find the ramdisk.... But we download the disk, so there's that...

imp retitled this revision from loader.efi: Recongize new memdisk=<url> and memcd=<url> options to loader.efi: Recognize new memdisk=<url> and memcd=<url> options.Mon, Jun 22, 7:16 PM

Update. Also note: I plan on committing the contrib stuff separately

Split out the EDK2 import from this change.

If we're booting this way, assume that we want to boot off of this device. We
can add env vars later if need be.