Le sam. 12 avr. 2025, 06:45, Alec Brown <alec.r.br...@oracle.com> a écrit :

> On Tue, Apr 1, 2025 at 6:35 AM, Vladimir 'phcoder' Serbinenko <
> phco...@gmail.com> wrote:
> > Le jeu. 27 mars 2025, 23:44, Alec Brown <alec.r.br...@oracle.com> a
> écrit :
> >
> >> On Wed, Mar 26, 2025 at 5:43 AM, Vladimir 'phcoder' Serbinenko <
> >> phco...@gmail.com> wrote:
> >> >>
> >> >>
> >> >>
> >> >> +#ifdef GRUB_MACHINE_EFI
> >> >> +#include <grub/efi/efi.h>
> >> >> +#include <grub/efi/disk.h>
> >> >> +#include <grub/efi/pe32.h>
> >> >> +#endif
> >> >> +
> >> >>
> >> > Can UKI work without EFI? I think of scenario of putting e.g. EFI disk
> >> into
> >> > coreboot or BIOS machine.
> >>
> >> No UKI only works EFI systems.
> >>
> >
> > Can GRUB parse image and get kernel and initrd out of it and load like
> > Linux? What prevents add doing so. This is not a problem for this patch
> per
> > se but I want to understand
>
> If we aren't utilizing the EFI stub in the UKI, we could parse the kernel
> and
> initrd from the section data and load it from there. In that case, I
> suppose
> it would be possible to load it for a coreboot or BIOS machine.
>
I propose then to have some kind of "uki" command which would map to EFI
chainloader for now and later we can add implementation for non-EFI.

>
> >
> >>
> >> >>
> >> > What's the purpose of fallback? It's not what user/script has
> requested.
> >> It
> >> > needs to be at very least disableable
> >>
> >> The fallback code was from some of the old blscfg code I was working
> with
> >> and
> >> I added the UKI default directory. I'll add an option in case the user
> >> wants
> >> this behavior.
> >>
> >> >
> >> >>
> >> >>
> >> >> +       }
> >> >> +      else if (cmd_type == GRUB_UKI_CMD)
> >> >> +       {
> >> >> +#ifdef GRUB_MACHINE_EFI
> >> >> +         grub_efi_loaded_image_t *image;
> >> >> +         image = grub_efi_get_loaded_image (grub_efi_image_handle);
> >> >> +         devid = grub_efidisk_get_device_name
> (image->device_handle);
> >> >> +#endif
> >> >>
> >> > This uses grub image location. What about a scenario when booted from
> >> > external drive and I want to boot into install on primary disk?
> >>
> >> Maybe I might not understand this scenario very well, but would it be
> >> better
> >> to load the UKI directory using the "--path" option? This bit of code is
> >> trying to locate the EFI system partition of the default directory. I'm
> not
> >> entirely sure the best way to find the default directory if it were to
> be
> >> on
> >> a different drive.
> >>
> > Does --path disable default path scanning?
>
> In this version, it does not. But in the newest version, I've added an
> option
> to enable or disable a fallback that would scan for the default path.
>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to