<div dir="auto"><div>Secureboot allows kexec, when using the recentish kexec_file_load syscall which performs kernel image signature verification.</div><div dir="auto"><br></div><div dir="auto">All of this just works under secureboot.</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, 24 Feb 2023, 20:20 Aaron Rainbolt, <<a href="mailto:arraybolt3@ubuntu.com">arraybolt3@ubuntu.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 2/24/23 11:51, Dan Bungert wrote:<br>
>>> On Fri, 24 Feb 2023 at 04:54, Aaron Rainbolt <<a href="mailto:arraybolt3@ubuntu.com" target="_blank" rel="noreferrer">arraybolt3@ubuntu.com</a>> wrote:<br>
>>>> I've seen more than one person annoyed by the fact that the mini.iso<br>
>>>> netinstaller is no more.<br>
>>>> The "flavor" would be able to be held in a<br>
>>>> very small ISO file (preferably CD sized), and it would download and<br>
>>>> install all of the packages that make up the Ubuntu system at runtime.<br>
>>>> This would allow a user to install Ubuntu or any desired flavor thereof<br>
>>>> using a single installation medium, rather than having to flash an ISO<br>
>>>> every time they want to make a drive install a different flavor. The new<br>
>>>> installation would be entirely up-to-date from the get-go, and it would<br>
>>>> enable the use of existing small storage media for those users who don't<br>
>>>> have sufficiently sized optical discs or flash drives.<br>
> Hi Aaron,<br>
><br>
> As Lukasz mentioned, I've been looking at relevant things, and expect that we<br>
> can have the first version of ubuntu-mini-iso running this cycle.  I missed<br>
> feature freeze, so I'll be filing that exception :).<br>
><br>
> Lukasz wrote a perfect summary of the work so far, so I'll quote it here:<br>
>>> The ubuntu-mini-iso is a small bootable iso that can be either<br>
>>> downloaded and used on a CD/USB-drive or even via UEFI HTTP that<br>
>>> brings up a dynamic TUI menu of what Ubuntu images you want to<br>
>>> download/install to your target system. It uses simplestreams to<br>
>>> select which images, so it'll be quite customizable regarding the<br>
>>> selection. The difference is that it then downloads the<br>
>>> iso-of-interest into memory and chain-boots into it, allowing the<br>
>>> installation of any image as one would normally do. This has some<br>
>>> limitations of course, since it needs sufficiently enough RAM.<br>
> So I think that will address much of what you were aiming for.<br>
><br>
> Size: the bootleg builds I'm doing of this are around 140 MiB, I expect the<br>
> official builds to produce a similar answer.  It could potentially be smaller,<br>
> the size today is dominated by use of the existing Ubuntu initrd with a few<br>
> things added on top. (compare to the size of /boot/initrd.img)<br>
><br>
> Download at runtime: ubuntu-mini-iso achieves this by presenting a menu of ISOs<br>
> that we could download, then with the user selection, reserving some memory,<br>
> downloading that ISO, and then kexecing to it.<br>
<br>
This makes good sense to me. The concern I'm noticing here is that <br>
Secure Boot activates a kernel lockdown mode that prohibits kexec. One <br>
workaround may be to have the user choose the release of Ubuntu to <br>
install at a GRUB menu so that a pre-existing kernel and initrd can be <br>
loaded, but this would bloat the ISO and complicate its use.<br>
<br>
Another possible solution might be to use mokutil to disable Secure Boot <br>
verification in the shim (essentially turning Secure Boot off without <br>
needing to get the BIOS involved), then rebooting the system. Then <br>
Secure Boot can be re-enabled with mokutil and then the ISO downloaded <br>
and kexec'd. When the user finishes installation and reboots, Secure <br>
Boot will be active again. This might complicate things with third-party <br>
drivers though.<br>
<br>
Perhaps we just live with no Secure Boot support?<br>
<br>
> ISOs in the menu: there is a casper hook that downloads simplestream json data<br>
> and hands it to the menu application, a small ncurses app that analyzes the<br>
> json, finds what ISOs to offer, and does so.  The user chooses an entry from<br>
> the menu, that info is handed back to the casper scripts, which download it and<br>
> we chain boot.<br>
><br>
> That menu could be extended for Flavors support, perhaps conceptually similar<br>
> to how flavors are shown today on <a href="https://releases.ubuntu.com/" rel="noreferrer noreferrer" target="_blank">https://releases.ubuntu.com/</a>.  The relevant<br>
> code is at: <a href="https://github.com/canonical/mini-iso-tools" rel="noreferrer noreferrer" target="_blank">https://github.com/canonical/mini-iso-tools</a><br>
> It's not necessary to build an ISO to start playing with the menu, if you<br>
> download that, get the dependencies installed, `make run`, and you can see what<br>
> the menu looks like.<br>
><br>
> If you're interested to help, Aaron, a good starting point would be to add<br>
> entries to <a href="https://github.com/canonical/mini-iso-tools/blob/main/json.c#L27" rel="noreferrer noreferrer" target="_blank">https://github.com/canonical/mini-iso-tools/blob/main/json.c#L27</a> to<br>
> teach the menu how to read the simplestreams for the flavors.<br>
><br>
> The existing menu can fit on a single screen, so if we start adding flavors I<br>
> think it will need some nested menu support, but that's achievable.<br>
><br>
> I have done a hacked test run of having this new mini-iso chainboot to lubuntu<br>
> 22.04.2 and it all works fine.<br>
Nice, sounds awesome. Thank you for the info, and I'll see if I can hack <br>
on this at some point!<br>
> -Dan<br>
<br>
-- <br>
Aaron Rainbolt<br>
Lubuntu Developer<br>
<a href="https://github.com/ArrayBolt3" rel="noreferrer noreferrer" target="_blank">https://github.com/ArrayBolt3</a><br>
<a href="https://launchpad.net/~arraybolt3" rel="noreferrer noreferrer" target="_blank">https://launchpad.net/~arraybolt3</a><br>
@arraybolt3:<a href="http://lubuntu.me" rel="noreferrer noreferrer" target="_blank">lubuntu.me</a> on Matrix, arraybolt3 on irc.libera.chat<br>
<br>
-- <br>
ubuntu-devel mailing list<br>
<a href="mailto:ubuntu-devel@lists.ubuntu.com" target="_blank" rel="noreferrer">ubuntu-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel" rel="noreferrer noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel</a><br>
</blockquote></div></div></div>