Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Fix restores on UEFI Fedora and Red Hat systems #768

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jwatt
Copy link

@jwatt jwatt commented Jun 19, 2021

Fixes issue #423.

The missing `else` meant that `grub2-mkconfig` was being invoked
(correctly) but then `update-grub` was also being invoked. This
is part 1 of the fix for teejee2008#423.
Fedora and Red Hat documentation directs users to directly update
the grub.cfg at /boot/efi/EFI/{redhat|fedora}/grub.cfg when they
manually update GRUB, and so that file no longer pulls in
/boot/grub2/grub.cfg. As a result, Timeshift restores were broken
for users who updated their GRUB config, since Timeshift only
updated the latter file prior to this patch. This patch makes
Timeshift directly update the appropriate EFI grub.cfg file.
This is part 2 of the fix for teejee2008#423
Comment on lines +2388 to +2392
if (target_distro.is_efi){
sh += "%s grub2-mkconfig -o /boot/efi/EFI/%s/grub.cfg \n".printf(chroot, target_distro.dist_id);
else{
sh += "%s grub2-mkconfig -o /boot/grub2/grub.cfg \n".printf(chroot);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/boot/grub2/grub.cfg is where it is for both EFI and non-EFI since Fedora 34 and RHEL/CentOS 9: https://fedoraproject.org/wiki/Changes/UnifyGrubConfig

Copy link
Contributor

@randallpittman randallpittman Mar 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevertheless, RHEL8 and earlier are pretty long-lived. Preferably support those (understand if that has to be in my own fork though).

Copy link
Contributor

@randallpittman randallpittman Mar 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also dist_id won't work for Redhat as the path uses "redhat" but dist_id will be "rhel"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants