mbox series

[0/4] Add pmem node for preserving distro ISO's

Message ID 20241025111411.165904-1-sughosh.ganu@linaro.org
Headers show
Series Add pmem node for preserving distro ISO's | expand

Message

Sughosh Ganu Oct. 25, 2024, 11:14 a.m. UTC
When installing a distro via EFI HTTP boot some OS installers expect
the .iso image to be preserved and treat it as a "CDROM" to install
packages.

This is problematic in EFI, since U-Boot mounts the image, starts the
installer, and eventually calls ExitBootServices. At that point the
image U-Boot mounted disappears. Some distros don't care and download
the missing packages from a web archive, while others halt the
installation complaining they can't find certain packages.

If the firmware uses ACPI, this is supported by using NFIT which
provides NVDIMM ramdisks to the OS and preserves the image.
We don't have anything in place for Device Trees though. Since DT
supports persistent memory nodes (pmem) use those and preserve the
.iso for installers.

The issue can be reproduced by attempting an EFI HTTP boot with Ubuntu
live server ISO, or a Rocky Linux ISO. The installation would fail
with the failure to locate certain packages.



Ilias Apalodimas (2):
  efi_loader: add a function to remove memory from the EFI map
  efi_loader: preserve installer images in pmem

Masahisa Kojima (1):
  fdt: add support for adding pmem nodes

Sughosh Ganu (1):
  efi: add helper functions to insert pmem node for DT fixup

 boot/fdt_support.c           | 41 +++++++++++++++++++++++++++--
 boot/image-fdt.c             |  9 +++++++
 include/efi_loader.h         | 28 +++++++++++++++++---
 include/fdt_support.h        | 13 +++++++++
 lib/efi_loader/efi_bootmgr.c | 43 ++++++++++++++++++++++++++----
 lib/efi_loader/efi_helper.c  | 12 +++++++++
 lib/efi_loader/efi_memory.c  | 51 +++++++++++++++++++++++++++---------
 lib/lmb.c                    |  4 +--
 8 files changed, 175 insertions(+), 26 deletions(-)

Comments

Ilias Apalodimas Oct. 25, 2024, 11:18 a.m. UTC | #1
+CC Anton

On Fri, 25 Oct 2024 at 14:14, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> When installing a distro via EFI HTTP boot some OS installers expect
> the .iso image to be preserved and treat it as a "CDROM" to install
> packages.
>
> This is problematic in EFI, since U-Boot mounts the image, starts the
> installer, and eventually calls ExitBootServices. At that point the
> image U-Boot mounted disappears. Some distros don't care and download
> the missing packages from a web archive, while others halt the
> installation complaining they can't find certain packages.
>
> If the firmware uses ACPI, this is supported by using NFIT which
> provides NVDIMM ramdisks to the OS and preserves the image.
> We don't have anything in place for Device Trees though. Since DT
> supports persistent memory nodes (pmem) use those and preserve the
> .iso for installers.
>
> The issue can be reproduced by attempting an EFI HTTP boot with Ubuntu
> live server ISO, or a Rocky Linux ISO. The installation would fail
> with the failure to locate certain packages.
>
>
>
> Ilias Apalodimas (2):
>   efi_loader: add a function to remove memory from the EFI map
>   efi_loader: preserve installer images in pmem
>
> Masahisa Kojima (1):
>   fdt: add support for adding pmem nodes
>
> Sughosh Ganu (1):
>   efi: add helper functions to insert pmem node for DT fixup
>
>  boot/fdt_support.c           | 41 +++++++++++++++++++++++++++--
>  boot/image-fdt.c             |  9 +++++++
>  include/efi_loader.h         | 28 +++++++++++++++++---
>  include/fdt_support.h        | 13 +++++++++
>  lib/efi_loader/efi_bootmgr.c | 43 ++++++++++++++++++++++++++----
>  lib/efi_loader/efi_helper.c  | 12 +++++++++
>  lib/efi_loader/efi_memory.c  | 51 +++++++++++++++++++++++++++---------
>  lib/lmb.c                    |  4 +--
>  8 files changed, 175 insertions(+), 26 deletions(-)
>
> --
> 2.34.1
>
>
Heinrich Schuchardt Oct. 28, 2024, 6:51 a.m. UTC | #2
On 10/25/24 13:14, Sughosh Ganu wrote:
> When installing a distro via EFI HTTP boot some OS installers expect
> the .iso image to be preserved and treat it as a "CDROM" to install
> packages.
>
> This is problematic in EFI, since U-Boot mounts the image, starts the
> installer, and eventually calls ExitBootServices. At that point the
> image U-Boot mounted disappears. Some distros don't care and download
> the missing packages from a web archive, while others halt the
> installation complaining they can't find certain packages.
>
> If the firmware uses ACPI, this is supported by using NFIT which
> provides NVDIMM ramdisks to the OS and preserves the image.
> We don't have anything in place for Device Trees though. Since DT
> supports persistent memory nodes (pmem) use those and preserve the
> .iso for installers.

Are you planning to provide the missing ACPI code for U-Boot?
QEMU provides ACPI tables which U-Boot passes through.
The x86 boards also need ACPI support.

Best regards

Heinrich

>
> The issue can be reproduced by attempting an EFI HTTP boot with Ubuntu
> live server ISO, or a Rocky Linux ISO. The installation would fail
> with the failure to locate certain packages.
>
>
>
> Ilias Apalodimas (2):
>    efi_loader: add a function to remove memory from the EFI map
>    efi_loader: preserve installer images in pmem
>
> Masahisa Kojima (1):
>    fdt: add support for adding pmem nodes
>
> Sughosh Ganu (1):
>    efi: add helper functions to insert pmem node for DT fixup
>
>   boot/fdt_support.c           | 41 +++++++++++++++++++++++++++--
>   boot/image-fdt.c             |  9 +++++++
>   include/efi_loader.h         | 28 +++++++++++++++++---
>   include/fdt_support.h        | 13 +++++++++
>   lib/efi_loader/efi_bootmgr.c | 43 ++++++++++++++++++++++++++----
>   lib/efi_loader/efi_helper.c  | 12 +++++++++
>   lib/efi_loader/efi_memory.c  | 51 +++++++++++++++++++++++++++---------
>   lib/lmb.c                    |  4 +--
>   8 files changed, 175 insertions(+), 26 deletions(-)
>