Subject: Bug#731709: grub-efi UEFI support based on debian-cd work complete (repos)

From: adrian15 <[email-masked]>
Date: Thu, 21 Jan 2016 02:51:10 +0100

El 18/01/16 a las 14:00, Thomas Schmitt escribió:
>> So any bootloader is made primary by leaving out -eltorito-alt-boot.
>
> There is no "primary" or "secondary" on the level of boot images
> and loaders. (Of course you may call them this way in your project.)
>
> There are first, second, third ... El Torito boot images or MBR, GPT,
> APM partition entries.
> The sequence is just needed because not all can be first in the list.
>
> The boot firmware inspects the medium for its known lures,
> picks a tasty one, and follows it to the boot loader or kernel.

So, yes, I'm the one who invented the term primary for live-build. 
Actually, it was not meant for alt El Torito boot entries (or non first 
entries as you clarify).

The first idea was to add both syslinux and grub-pc in the same image. 
Grub-pc would be the one installed to be boot but syslinux files would 
be there for Multi-USB tools to know how to understand the iso and put 
it into an USB.

The Grub-pc bits were thought in first place for Super Grub2 Disk (which 
it is Grub2 cfg files mainly).

(Now that I think of the current 'check primary bootloader role' 
functions unable me to perform that Super Grub2 Disk Debian Live that 
included the Syslinux bits too. Anyways I'll find a workaround for that 
in the future. Not a priority right now.)

Now primary means: "First lure" and secondary means "Second lure" by 
your definition.

Currently there's no way to stop you from requesting:

--bootloaders="syslinux,grub-efi,syslinux-efi"

Given the way that both grub-efi and syslinux-efi use:

/efi/boot/bootia32.efi
and
/efi/boot/bootx64.efi

the last one to be run would overwrite the first one efi files.

>> You can probably use only one legacy bootloader but syslinux-efi and
>> grub-efi use different files so it should be possible to install both.
>> I am not sure how selecting one or the other would work, though.
>
> You can offer several EL Torito boot images for BIOS, indeed.
> It will depend on your BIOS what it does in this case.
Interesting.

> There can be only one MBR, though. So you would have to hop
> by MBR x86 code to a standalone program which chooses among
> the BIOS suitable El Torito boot images.
>
> With EFI it makes few sense to offer more than one El Torito
> boot image or EFI System Partition. UEFI 2.4 rather prescribes to
> handle all alternatives inside the FAT filesystem. The firmware
> will start the \EFI\BOOT\BOOT*.EFI binary which it deems suitable
> for its processor type.
> This binary is quite free in its further proceedings.
So... How would you go about for a:

--bootloaders="syslinux,grub-efi,syslinux-efi"

to make sense if, as I have stated earlier (although I might have missed 
something there) they would overwrite their /efi/boot/boot*efi files ?

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/