Antynea / grub-btrfs

Include btrfs snapshots at boot options. (Grub menu)
GNU General Public License v3.0
771 stars 78 forks source link

GRUB configuration errors during system updates with grub-btrfs 4.13-2 #357

Open buidai123 opened 3 days ago

buidai123 commented 3 days ago

Description

I encountered GRUB configuration errors when updating my system

I'm using timeshift-autosnap for creating snapshots during updates so I configured grub-btrfs to automatically update GRUB entry when timeshift creates snapshot, i replaced the ExecStart line with:

ExecStart=/usr/bin/grub-btrfsd --syslog --timeshift-auto

Error message

When updating packages with yay. I received this error:

Found 3 snapshot(s)

WARNING: 'grub-mkconfig' needs to run at least once to generate the snapshots (sub)menu entry in grub the main menu. After that this script can run alone to generate the snapshot entries.

Unmount /tmp/grub-btrfs.5xVcYewXyZ .. Success
cannot open `/boot/grub/grub.cfg.new': No such file or directoryUsage: /usr/bin/grub-script-check [OPTION...] [PATH]
Try '/usr/bin/grub-script-check --help' or '/usr/bin/grub-script-check
--usage' for more information.
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.

Environment

Schievel1 commented 3 days ago

Well it says you need to run grub-mkconf after installation, did you do that?

buidai123 commented 3 days ago

@Schievel1 so i have to run grub-mkconf after every updates huh, i thought i just need to run it one time

Schievel1 commented 3 days ago

No, it should be necessary only once after the first installation of grub-btrfs or grub.

Is it necessary every time you update your kernel?

buidai123 commented 2 days ago

No, it should be necessary only once after the first installation of grub-btrfs or grub.

Is it necessary every time you update your kernel?

some updates dont throw this error, but seems like it appears when i have kernel update

so is it fine to run grub-mkconf everytime it throws that warning?

Schievel1 commented 2 days ago

Yes it is alright to do so, but there seems to be some new way of creating a grub.cfg when there is a kernel update on arch and arch based distros. It seems like this is the same like #356.

I am not running arch, so it's quite hard for me to figure out what's going on.

For an ad hoc solution for you I would suggest looking into pacman hooks. You can run grub-mkconf automatically this way