Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#66804 - [linux] pmem support for webboot

Attached to Project: Arch Linux
Opened by Daniel Maslowski (cyrevolt) - Wednesday, 27 May 2020, 22:32 GMT
Last edited by freswa (frederik) - Wednesday, 27 May 2020, 23:23 GMT
Task Type Feature Request
Category Kernel
Status Assigned
Assigned To Tobias Powalowski (tpowa)
Jan Alexander Steffens (heftig)
Levente Polyak (anthraxx)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No


With LinuxBoot and u-root, there is a new, more auditable approach to bootloaders in firmware. One of these is webboot, which allows for booting live ISO images, given that the kernel to boot is configured with pmem support. It can be used for recovery, installation, or a stateless system, just like a live USB stick.

The webboot bootloader works roughly as follows:

- connect to a network, download an ISO image
- copy the ISO to RAM, loopback mount it
- kexec the ISO's kernel, append `memmap=$SIZE!$SIZE root=/dev/pmem0`

For the config for Arch, see

As a PoC, we have successfully taken TinyCore, rebuilt the kernel with pmem support, remastered the ISO, and could just boot into it. We could also fetch the live ISO images of various distros and boot into them; however, we needed to use a different kernel, because none of the distro kernels so far supports pmem by default. Research notes are here:

To add pmem support, only a little change is necessary:
Note that these cannot be modules, because the modules wouldn't be available before the ISO.

See also:
This task depends upon

Comment by Jan Alexander Steffens (heftig) - Wednesday, 27 May 2020, 23:40 GMT
This sounds like it should be solved by putting the modules into the ISO's initramfs.
Comment by Daniel Maslowski (cyrevolt) - Wednesday, 27 May 2020, 23:45 GMT
Yea right, that's the option I forgot to list, sorry for that. Thank you! :)
Comment by Daniel Maslowski (cyrevolt) - Saturday, 30 May 2020, 04:54 GMT
The corresponding modules are `nd_btt`, `nd_e820` and `nd_pmem`, found in `/lib/modules/$KERNEL/kernel/drivers/nvdimm/`.

I've remastered an ISO by just adding the three files via `mkinitcpio.conf`, based on

Here is a recording of the PoC in action:
Comment by Daniel Maslowski (cyrevolt) - Saturday, 30 May 2020, 12:54 GMT
I've submitted a corresponding patch to add the modules:

That allowed me to successfully remaster a SystemRescueCd ISO and boot it.

Just adding the hook to at the end suffices.