Re: Interesting Grub issue [Solved]

2023-03-02 Thread Rabin Yasharzadehe
Not sure where I found this, and I have this in my efi/grub file,
but you can chain the EFI grub.cfg to the one you're generating (just make
sure to change the uuid for the disk)

```
#/boot/efi/EFI/fedora/grub.cfg
search --no-floppy --fs-uuid --set=dev 38b0586f-2715-4493-a548-e12902f1b68d
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg
```

--
Rabin


On Thu, 2 Mar 2023 at 17:36, Aharon Schkolnik  wrote:

> So, it turns out that I have two directories (each on their own mount
> point):
> /boot
> /boot/efi
>
> The attached grub.cfg was from /boot/efi -missing the windows entry
> The correct grub.cfg was in /boot - including the missing windows entry
>
> That makes sense since I ran grub2-mkconfig -o /etc/grub2-efi.cfg, and
> /etc/grub2-efi.cfg is linked to /boot/grub2/grub.cfg
>
> So, the file in /etc is linked to the file in /boot but the boot process
> uses the file in /boot/efi (/boot/efi/EFI/fedora)
>
>
> I would think that on a efi system, the file in /etc should be linked to
> the file in /boot/efi
>
> Sound like a bug?
>
> Any idea how I ended up with bot /boot and /boot/efi
>
> Any reason not to change the link?
>
> Any reason not to delete /boot/grub2 and leave /boot/efi?
>
> On Wed, 1 Mar 2023 at 21:27, Aharon Schkolnik 
> wrote:
>
>> Hi.
>>
>> I have both Fedora and Windows 10 installed on my computer.
>> I can boot either using bios settings.
>> I have grub installed, and can boot to it.
>> The grub menu shows me 3 linux kernels and UEFI firmware.
>> It does not show me Windows.
>> In the attached grub.cfg file there is the following entry:
>>
>> ### BEGIN /etc/grub.d/30_os-prober ###
>> menuentry 'Windows Boot Manager (on /dev/sdc3)' --class windows --class
>> os $menuentry_id_option 'osprober-efi-3C10-1AFF' {
>> insmod part_gpt
>> insmod fat
>> set root='hd2,gpt3'
>> if [ x$feature_platform_search_hint = xy ]; then
>>   search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt3
>> --hint-efi=hd2,gpt3 --hint-baremetal=ahci2,gpt3  3C10-1AFF
>> else
>>   search --no-floppy --fs-uuid --set=root 3C10-1AFF
>> fi
>> chainloader /efi/Microsoft/Boot/bootmgfw.efi
>> }
>>
>> The entry is there, but it doesn't show when the machine boots/
>>
>> Any ideas?
>>
>> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Interesting Grub issue [Solved]

2023-03-02 Thread Shachar Shemesh

  
  


On 02/03/2023 17:35, Aharon Schkolnik
  wrote:


  
  


I would think that on a efi system, the file in /etc should
  be linked to the file in /boot/efi


Sound like a bug?
  

No.


Think of /boot/efi as the "boot block". It needn't do anything
  beyond load the actual code into memory. /boot is where grub looks
  for its stuff.


In other words, /boot/efi is for the BIOS while /boot is for GRUB
  itself. As such, it makes perfect sense that /boot is where grub's
  configuration should reside.


  


Any idea how I ended up with bot /boot and /boot/efi


  

The directories? That's working as intended. A grub.conf in both? No
idea.
  


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Interesting Grub issue [Solved]

2023-03-02 Thread Aharon Schkolnik
So, it turns out that I have two directories (each on their own mount
point):
/boot
/boot/efi

The attached grub.cfg was from /boot/efi -missing the windows entry
The correct grub.cfg was in /boot - including the missing windows entry

That makes sense since I ran grub2-mkconfig -o /etc/grub2-efi.cfg, and
/etc/grub2-efi.cfg is linked to /boot/grub2/grub.cfg

So, the file in /etc is linked to the file in /boot but the boot process
uses the file in /boot/efi (/boot/efi/EFI/fedora)


I would think that on a efi system, the file in /etc should be linked to
the file in /boot/efi

Sound like a bug?

Any idea how I ended up with bot /boot and /boot/efi

Any reason not to change the link?

Any reason not to delete /boot/grub2 and leave /boot/efi?

On Wed, 1 Mar 2023 at 21:27, Aharon Schkolnik  wrote:

> Hi.
>
> I have both Fedora and Windows 10 installed on my computer.
> I can boot either using bios settings.
> I have grub installed, and can boot to it.
> The grub menu shows me 3 linux kernels and UEFI firmware.
> It does not show me Windows.
> In the attached grub.cfg file there is the following entry:
>
> ### BEGIN /etc/grub.d/30_os-prober ###
> menuentry 'Windows Boot Manager (on /dev/sdc3)' --class windows --class os
> $menuentry_id_option 'osprober-efi-3C10-1AFF' {
> insmod part_gpt
> insmod fat
> set root='hd2,gpt3'
> if [ x$feature_platform_search_hint = xy ]; then
>   search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt3
> --hint-efi=hd2,gpt3 --hint-baremetal=ahci2,gpt3  3C10-1AFF
> else
>   search --no-floppy --fs-uuid --set=root 3C10-1AFF
> fi
> chainloader /efi/Microsoft/Boot/bootmgfw.efi
> }
>
> The entry is there, but it doesn't show when the machine boots/
>
> Any ideas?
>
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il