Re: Fun with GRUB2, BLS and Multiboot USB

2023-05-09 Thread Chris Murphy


On Wed, Apr 26, 2023, at 12:26 AM, Philip Rhoades via devel wrote:
> People,
>
> LILO and SysLinux were simple and GRUB1 was straightforward - but by the 
> time GRUB2 came around I was long past configuring my own kernels and 
> hacking around at a lower level . . now I think, finally, I need to know 
> more about how GRUB2 - works specifically with Fedoras 38+.
>
> This current interest was prompted when I upgraded my WS from F37 
> KDE(->Sway) via a beta F38 LiveSway and found that /boot/grub2/grub.cfg 
> did not contain a menuentry for the latest F38!? - much hacking and 
> experimenting followed . .

There are no GRUB native menu entries anymore since Fedora 30. There are Boot 
Loader Spec formatted "snippets" in /boot/loader/entries and Fedora's GRUB 
contains blscfg.mod which is a GRUB module that provides GRUB with the ability 
to read BLS snippets and create menu entries from them.
https://fedoraproject.org/wiki/Releases/30/ChangeSet#Make_BootLoaderSpec-style_configuration_files_the_default


> So, I have git cloned the grub2 stuff and had a look at it but I am too 
> old now to be digging around in that stuff just at the moment - so, has 
> any Fedora Guru produced a diagram or at least a point list, of what 
> Grub does from turning on the power to the display of the Grub menu on a 
> Fedora machine? - that would be nice as a more-detailed overview than I 
> have been able to find so far - but not so low-down I am amongst the 
> weeds . . that might come later . .

It's one of those cases of "no not that specification the other specification". 
There's no way you'd know this is the case without some digging.

Also since 
https://fedoraproject.org/wiki/Releases/34/ChangeSet#Unify_the_GRUB_configuration_files_location_across_all_supported_architectures
 there are two grub.cfg files. One is on the EFI System partition and merely 
points to (forwards) to the real one in /boot/grub2. This is consistent with 
BIOS and upstream GRUB's location for the grub.cfg. 

I guess hindsight being 20/20 we could have changed grubx64.efi to look for 
"grub.static" in the same directory as the EFI program instead of "grub.cfg" 
and then there'd only be one grub.cfg and it'd be the real one rather than the 
forwarding one.



-- 
Chris Murphy
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Fun with GRUB2, BLS and Multiboot USB

2023-04-25 Thread Philip Rhoades via devel

People,

LILO and SysLinux were simple and GRUB1 was straightforward - but by the 
time GRUB2 came around I was long past configuring my own kernels and 
hacking around at a lower level . . now I think, finally, I need to know 
more about how GRUB2 - works specifically with Fedoras 38+.


This current interest was prompted when I upgraded my WS from F37 
KDE(->Sway) via a beta F38 LiveSway and found that /boot/grub2/grub.cfg 
did not contain a menuentry for the latest F38!? - much hacking and 
experimenting followed . .


Now I have a WS with two USB sticks (8G and 32G) and have booted the 
latest F38 Live Sway (on the 8G) and successfully installed it to the 
32G and now my mild OCD is less offended when I boot on the 32G USB I 
see ALL the old Fedora systems on drives /dev/sd[a-d] !  - I am happy!


So, I have git cloned the grub2 stuff and had a look at it but I am too 
old now to be digging around in that stuff just at the moment - so, has 
any Fedora Guru produced a diagram or at least a point list, of what 
Grub does from turning on the power to the display of the Grub menu on a 
Fedora machine? - that would be nice as a more-detailed overview than I 
have been able to find so far - but not so low-down I am amongst the 
weeds . . that might come later . .


Thanks,

Phil.
--
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  p...@pricom.com.au
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue