:: Re: [DNG] [SOLVED] EFI boot not fou…
Pàgina inicial
Delete this message
Reply to this message
Autor: aitor
Data:  
A: dng
Assumpte: Re: [DNG] [SOLVED] EFI boot not found, partially solved in gnuinos (Was: 1st boot failed but repaired OK)
Hi,

On 22/12/21 15:57, aitor wrote:
>
>
> En 22 de diciembre de 2021 14:55:41 ". fsmithred via Dng"
> <dng@???> escribió:
>
>> On 12/21/21, aitor <aitor_czr@???> wrote:
>>> Hi,
>>>
>>> On 21/12/21 19:55, aitor wrote:
>>>>
>>>> Hi Ralph,
>>>>
>>>> On 21/12/21 12:19, Ralph Ronnquist via Dng wrote:
>>>>> On Tue, 21 Dec 2021 01:44:39 +0100
>>>>> aitor<aitor_czr@???>  wrote:
>>>>>> ...
>>>>>> The outcome is that i've been compelled to turn back the distributor
>>>>>> to its default ID=devuan, and i'm rebuilding the images of gnuinos
>>>>>> chimaera right now so that they will work properly in UEFI mode
>>>>>> without workarounds during the first boot on the part of users.
>>>>>>
>>>>>> I wonder, to this regard, what is the trick in Devuan to put in place
>>>>>> the distributor ID without the need of hijacking the boot loader...
>>>>> ... doesn't "scripts/magic-touch" tell the story?
>>>> Looking at the script, it seems that i must define a new variable:
>>>> GNUINOSCFG=/target/boot/efi/EFI/gnuinos/grub.cfg
>>>> and copy the content to $DEBIANCFG in the same way you're doing with
>>>> $DEVUANCFG.
>>>> Yes, it seems the way to go...
>>>>
>>>> I'll tell you, thanks!
>>>
>>> Oops, I knew about the --efi-directory argument for grub-install, which
>>> defines the
>>> root partition of the EFI system, but there is also another one that
>>> i was
>>> overlooking
>>> up till now:
>>>
>>> --bootloader-id=ID
>>>
>>> I found it looking at the code of grub-install.c in grub2. The value
>>> of this
>>> argument has
>>> preference over the value defined in os-release.
>>>
>>> Cheers,
>>>
>>> Aitor.
>>>
>>>
>>>
>>
>> Another way to fix it in the installed system is to remove
>> grub-efi-amd64-signed if you don't use Secure Boot. Then you don't
>> need /boot/efi/EFI/debian.
>>
>
> I haven't any computer to hand right now, but i think that
> EFI/debian/bootx64.efi is provided by grub-efi-amd64, and the rest of
> the files by grub-efi-amd64-signed.



The trick was in the lines nº 1212 - 1216 of grub-install.c:

      efi_distributor = bootloader_id;
      if (strcmp (efi_distributor, "kubuntu") == 0)
    efi_distributor = "ubuntu";
      else if (strcmp (efi_distributor, "devuan") == 0)
    efi_distributor = "debian";

Thus, i need to build my own grub to get the intended effect, adding the
lines:

      else if (strcmp (efi_distributor, "gnuinos") == 0)
    efi_distributor = "debian";

Cheers,

Aitor.