-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Support booting from rootfs acquired via HTTP #36314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
594e651 to
3f21253
Compare
yuwata
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice!
3f21253 to
01bb9b3
Compare
|
Added docs, and the ability to automatically derive the rootfs URL from the UEFI network boot URL. |
01bb9b3 to
b14b1a7
Compare
b14b1a7 to
5368bf0
Compare
|
Shouldn't this be boot "from https" rather than "from http"? Downloading the rootfs via "http" sounds like a security hole waiting to be exploited e.g. by manipulation of the data between the server and the client, or via untrustworthy DNS redirecting the client to an entirely different rootfs. Is there something in place to warn the user about such configurations? |
the security model of uefi builds on secureboot and tpm measurements, and in Linux world on shim. hence, it doesn't matter if the download is attacked on the wire, because it will be validated before it is used using the usual mechanisms. I think it's illusionary to believe that the certificate database in uefi could ever be kept reasonably up-to-date to make https work reasonably (unless you enroll your own https certs to the uefi https cert db). |
This one is between "efi" and "linux": we'll recognize such entries as linux, but we'll just invoke them as EFI binaries. This creates a high-level concept for invoking UKIs via indirection of a bls type #1 entry, for example to permit invocation from a non-standard path or for giving entries a different name. Companion BLS spec PR: uapi-group/specifications#135 (Let's rename LOADER_UNIFIED_LINUX to LOADER_TYPE2_UKI at the same time to reduce confusion what is what)
Companion BLS spec PR: uapi-group/specifications#135
With this we can now do: systemd-vmspawn -n -i foobar.raw -s io.systemd.boot.entries-extra:particleos-current.conf=$'title ParticleOS Current\nuki-url http://example.com/somedir/uki.efi' Assuming sd-boot is available inside the ESP of foobar.raw a new item will show up in the boot menu that allows booting directly into the specified UKI.
c73217e to
898944a
Compare
| /* passno= */ is_device_path(what) ? 1 : 0, | ||
| flags, | ||
| SPECIAL_INITRD_ROOT_FS_TARGET, | ||
| "imports.target"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After=imports.target should be conditional, I think.
| flags, | ||
| SPECIAL_INITRD_USR_FS_TARGET); | ||
| SPECIAL_INITRD_USR_FS_TARGET, | ||
| "imports.target"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
Required by systemd/systemd#36314 Gbp-Dch: ignore
This is used by systemd/systemd#36314 to make networking boot work nicely within the BLS constructs. The "uki" stanza also should have uses in a world where a single UKI shall be invoked by multiple locally defined menu entries, for example on nixos or ostree systems, where each commit shall synthesize a separate menu entry, often referencing the same UKI.
This is used by systemd/systemd#36314 to make networking boot work nicely within the BLS constructs. The "uki" stanza also should have uses in a world where a single UKI shall be invoked by multiple locally defined menu entries, for example on nixos or ostree systems, where each commit shall synthesize a separate menu entry, often referencing the same UKI.
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed correctly, currently the same way that `efi` is.
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed correctly, currently the same way that `efi` is.
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed the same way that that 'efi' is.
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed the same way that that 'efi' is.
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed the same way that that 'efi' is.
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed the same way that that 'efi' is.
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed the same way that that 'efi' is. (cherry picked from commit 4a94a1b)
Commit e2a3d56 (as part of #36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed the same way that that 'efi' is. (cherry picked from commit 4a94a1b)
Commit e2a3d56 (as part of systemd#36314) makes sd-boot recognize a 'uki' stanza in a boot loader entry and uapi-group/specifications@3f2bd82 adds it to the BLS, but bootctl and other components parsing said config do not know about it, leading to the error message `Unknown line 'uki', ignoring.` when attempting to parse the same entry. This commit makes it get parsed the same way that that 'efi' is. (cherry picked from commit 4a94a1b)
This extends systemd-import-generator to not only download a disk image at boot, but also attach it to a loopback device, so that we can boot from it.
We have most of the pieces already in place, this just polishes some things, to make this round.
The topmost commit contains example command lines that just work to make
systemd-vmspawnboot from amkosi servecall.Note that this does not address how to get the UKI running on the target system, this only deals with the later boot phase once the UKI is already running.
This is WIP, because it lacks docs, and I want to do some more polishing. But it works great.
Ultimate goal, provide a complete solution so that we also can do uefi http boot for ukis