From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, nahim.souza@fit-tecnologia.org.br
Subject: Re: [edk2-devel] Cannot boot ISO on RamDisk
Date: Fri, 27 Nov 2020 18:08:32 +0100 [thread overview]
Message-ID: <5d89a9dc-ca50-fa6e-bdde-6e3ef3bd0b6a@redhat.com> (raw)
In-Reply-To: <MH9w.1606420429710701772.eQsI@groups.io>
On 11/26/20 20:53, Nahim Souza via groups.io wrote:
> Greetings!
>
> We are trying to implement an .efi application that receives an ISO file from an Android device, loads it into a buffer and try to boot an Operating System. To do this, we tested some implementations using Ram Disk but after creating the virtual disk and running BOOTX64.efi and found on the FAT32 partition, but some problems occur after boot, as if I did not find the other files in the ISO. To solve this problem, we tried some approaches:
>
> * Change the parameters when calling RamDiskProtocol->Register() function (GUID and DevicePath)
> * Tried with different OS (Xubuntu, Windows 10, Windows 7, Ubuntu and OpenSuse)
> * Compared with HttpBoot implementation from EDK2, where we saw that an ISO file could be loaded into memory to boot an OS, but the RamDisk implementation in HttpBootRegisterRamDisk was very similar to ours
> Based on this, I have some questions:
>
> * In our understanding, HttpBoot downloads the ISO and boots the OS using the RamDisk. Is that correct?
I think so.
https://github.com/tianocore/tianocore.github.io/wiki/HTTP-Boot#ram-disk-boot-from-http
> * We saw that RamDiskDxe has some dependencies from ACPI tables, since it uses NFIT (NVDIMM Firmware Interface Table) to save some persistent information. Is there some hardware/driver requirement to make the OS boot through RamDisk? Did we need to have this NVDIMM to support ACPI feature from RamDiskDxe?
The booted operating system needs to understand where to look for files
on the virtual disk. More precisely, the booted operating system must
understand that the particular reserved memory range *is* a RAM disk. If
there is no NFIT, the booted operating system will have no idea where to
load other files from.
A similar issue is discussed in this RHBZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1671345
There, the problem was that the guest kernel in question didn't have a
driver for consuming the NFIT table. Different reason, same result --
the information describing the UEFI-originated virtual disk to the OS
was lost, so the OS couldn't finish booting.
> * Would you have any other suggestions for solving this scenario?
Make sure you have enough (contiguous) RAM, as the ISO can be large, and
you still need enough RAM left after the reserved memory allocation, for
booting the OS.
https://github.com/tianocore/tianocore.github.io/wiki/HTTP-Boot#ram-disk-image-size
HTH
Laszlo
prev parent reply other threads:[~2020-11-27 17:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 19:53 Cannot boot ISO on RamDisk nahim.souza
2020-11-27 17:08 ` Laszlo Ersek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d89a9dc-ca50-fa6e-bdde-6e3ef3bd0b6a@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox