Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silverblue 41 installation is missing /boot/grub2/grubenv and /etc/default/grub files #746

Open
Jmennius opened this issue Oct 16, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Jmennius
Copy link

Jmennius commented Oct 16, 2024

I was recently installing Fedora Silverblue 41 nightly build (Fedora-Silverblue-ostree-x86_64-41-20241012.n.0.iso) and I've noticed that the system was missing /boot/grub2/grubenv and /etc/default/grub files.

Although the system boots fine, I'm pretty sure this is a bug because grub menu is not automatically hidden, boots cannot be marked as successful and so on (grubenv is not created after the install was done under any circumstance automatically).

I was doing an installation via a kickstart file (for advanced encryption option), but I've customized a file that I got from a test install (although I think it was Beta 1.2 image).

I've contacted anaconda team (as it was creating those files before - see write_defaults() and write_config() in https://github.com/rhinstaller/anaconda/blob/4683a8965ce02443134115e3eeea58ec6df38da3/pyanaconda/modules/storage/bootloader/grub2.py#L253) and they said this is now responsibility of bootupd :)

@travier travier added the bug Something isn't working label Oct 16, 2024
@travier travier changed the title Silverblue 41 installation is missing /boot/grab2/grubenv and /etc/default/grub files Silverblue 41 installation is missing /boot/grub2/grubenv and /etc/default/grub files Oct 16, 2024
@Jmennius
Copy link
Author

Should I instead open a bugzilla issue instead/in addition to?

@HuijingHei
Copy link
Member

HuijingHei commented Oct 17, 2024

Not sure if we should make bootupd to create these 2 files, can we reuse anaconda? Any other scenarios that we need them?
Maybe @travier @cgwalters know about this.

@travier
Copy link
Member

travier commented Oct 18, 2024

We should probably create /boot/grub2/grubenv but likely not /etc/default/grub as we don't need it anymore.

@Jmennius
Copy link
Author

Jmennius commented Oct 18, 2024

We should probably create /boot/grub2/grubenv but likely not /etc/default/grub as we don't need it anymore.

Regarding defaults - not so sure.
If a user creates the file because he wants to configure something - he is most likely to not put the BLSCFG variable as well as other variables.
Right now, when there is no defaults file, ostree grub script will just exit.
If the defaults file exists it wants BLSCFG variable to be set and /boot/grub/.blscfg file to be present (which is not the case) to not generate boot entries for grub (which avoid duplicate boot entries)...

@travier
Copy link
Member

travier commented Oct 21, 2024

Regarding defaults - not so sure. If a user creates the file because he wants to configure something - he is most likely to not put the BLSCFG variable as well as other variables. Right now, when there is no defaults file, ostree grub script will just exit.

ostree will also skip re-generating the GRUB config if the system has a static GRUB config which is the default starting with F41 installations. See:

/etc/default/grub is only used on older installations and will be ignored on the newer ones.

@travier
Copy link
Member

travier commented Oct 25, 2024

A potential workaround for this issue would be:

$ sudo grub2-editenv - set menu_auto_hide=1

But I can't get this to work so something else is likely missing.

@Jmennius
Copy link
Author

A potential workaround for this issue would be:

$ sudo grub2-editenv - set menu_auto_hide=1

But I can't get this to work so something else is likely missing.

I believe this is exactly what I've done (I don't remember if I had to do anything else, but I definitely ran grub2-editenv), why doesn't it work for you?
This is what anaconda does I believe https://github.com/rhinstaller/anaconda/blob/7c96bd8eb6de5c47cdea79c0d49d628a8b7d8713/pyanaconda/modules/storage/bootloader/grub2.py#L357

@HuijingHei
Copy link
Member

$ sudo grub2-editenv - set menu_auto_hide=1

But I can't get this to work so something else is likely missing.

Can not work either on Silverblue 41.

$ sudo grub2-editenv list
boot_success=1
menu_auto_hide=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants