GNU bug report logs - #44898
[wishlist] Make the GRUB installation procedure smarter

Previous Next

Package: guix;

Reported by: guixuser6392 <guixuser6392 <at> protonmail.com>

Date: Fri, 27 Nov 2020 01:27:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: guixuser6392 <guixuser6392 <at> protonmail.com>
To: 44898 <at> debbugs.gnu.org
Subject: bug#44898: [wishlist] Make the GRUB installation procedure smarter
Date: Thu, 26 Nov 2020 23:15:58 +0000
Every time the operating system is instantiated the GRUB boot-loader is inexplicitly re-installed. This behaviour leads to unsolicited changes to the user's boot configuration on UEFI systems; and leads to unnecessary write operations on the ESP, and/or the MBR, which, in case they are abruptly aborted during the building of the install-bootloader derivation, can leave the system in an unbootable state. Futhermore, frequent writes to the platform's NV-RAM may negatively impact its lifespan.

NixOS stores the GRUB derivation as well as boot parameters in a state file, and only re-installs the boot-loader if the computed state is different from the stored state: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/install-grub.pl#L626. However, unless I am mistaken, that alone will not prevent GRUB from altering the user's boot configuration in a scenario, in which we want GRUB to be re-installed because it has received an update.

To summarize, I think that consecutive grub-install invocations should not be allowed to modify the user's boot configuration on UEFI systems, and that we should teach Guix to only re-install the boot-loader if the boot parameters has been changed and/or the GRUB package has been upgraded.

Although other boot-loaders are not in the scope of this wish, brining their installation procedures to the same high standard would be beneficial, too.




This bug report was last modified 3 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.