[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



On 18 January 2016 at 10:43, adrian15 <adrian15sgd@gmail.com> wrote:
> El 18/01/16 a las 07:31, Michal Suchanek escribió:
>>
>> Hello,
>>
>> thanks for working on this.
>>

>
>> As to the primary and secondary bootloader - how is the efi bootloader
>> secondary? It boots the same as the legacy bootloader. You probably
>> want a concept of compatible bootloaders - that is pairs of
>> bootloaders that can be installed alongside on the same medium.
>
> * What is it a secondary bootloader?
>
> It's what happens when you request mkisofs that your bootloader to be boot
> in second place or as a second partition. I don't know how it actually
> works.
>
> So in grub-efi we just add to the xorriso options:
>
> -eltorito-alt-boot \
>  -e boot/grub/efi.img \
>  -no-emul-boot \
>  -isohybrid-gpt-basdat \
>  -isohybrid-apm-hfsplus
>
> And in syslinux-efi (currently) we add:
>
> -eltorito-alt-boot \
>  --efi-boot boot/efi.img \
>  -append_partition 2 0x01 \
>  binary/boot/efi.img

-eltorito-alt-boot is not documented option of xorriso. For
genisoimage -eltorito-alt-boot denotes start of new bootloader
parameters. So any bootloader is made primary by leaving out
-eltorito-alt-boot.

>
> .
>
> So, I guess the -eltorito-alt-boot does the magic but I'm not sure. Maybe
> someone else can explain it better than me.
>
>
> * About current compatible bootloaders.
> The technology is there. I mean. This is what it's currently available:
>
> binary_grub-efi : Secondary bootloader
> binary_grub-legacy : Primary bootloader
> binary_grub-pc : Primary bootloader
> binary_syslinux : Primary bootloader
> binary_syslinux-efi : Secondary bootloader
>
> so that means, in theory you can request one of these 9 combinations:
>
> grub-legacy
> grub-pc
> syslinux
>
> grub-legacy,grub-efi
> grub-pc,grub-efi
> syslinux,grub-efi
>
> grub-legacy,syslinux-efi
> grub-pc,syslinux-efi
> syslinux,syslinux-efi

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.

>
>> Unless
>> the user requests two bootloaders that are incompatible the medium can
>> be created.
>>
>> Ignoring bootloaders is not a good idea. If the user requested
>> something that is not possible the build should report an error and
>> stop.
>
> Yeah, that it's hard to implement from the perspective of a single
> bootloader script. So I decided not to implement it.
>
> You could add an additional script or function named:
> check_compatible_bootable_pairs (as you propose) but then you need to
> maintain that fictional database each time a new bootloader gets in.
>
> That's why I decide to avoid it using it.
>
> What it's straight-forward to implement is one of the only-secondary
> bootloaders finding themselves as a primary bootloader and outputting a
> warning message. But, I'm not sure what to put there as a warning. Any
> suggestion?

Unsupported bootloader combination or whatever.

It should not be a warning however. The script should avoid making
unbootable medium.

Thanks

Michal


Reply to: