From: raid5atemyhomework via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 47442@debbugs.gnu.org
Subject: bug#47442: guix system delete-generations does not use bootloader configuration
Date: Sun, 28 Mar 2021 04:42:17 +0000 [thread overview]
Message-ID: <UEumGHB0DHPN4Px9M_hdXYJ1Z3ap-1-yGXhaQKk5-m_7c2dxwsItslSQJzhQ0DQls5UUjQffWL3WaakI31iGIf_V7iDoWP9fLvN2hP9L-sU=@protonmail.com> (raw)
Hello,
I use a coreboot that does not have a VGA option rom, which means Grub can't use `gfxterm`, so I have this setting in my `operating-system`:
(bootloader-configuration
; ...
(terminal-outputs '(console)))
This lets me see a boot menu at startup even without the VGA option rom.
However, recently when I did a `guix system delete-generations` to remove some old configurations, I saw to my dismay that the `/boot/grub/grub.cfg` got reverted to `terminal_output gfxterm`.
Creating a pointless whitespace change to a daemon configuration file and `guix system reconfigure` got this fixed. This workaround is undesirable since it makes deleting old generations a multi-step, non-atomic process.
The expected behavior is that whatever settings were used in my latest `bootloader-configuration` should not be touched by `guix system delete-generations`.
The actual behavior is `guix system delete-generations` uses the default configuration.
Looking at the code, it seems to be an issue with `guix/scripts/system.scm`'s `reinstall-bootloader` function:
```scheme
;; Use the detected bootloader with default configuration.
;; It will be enough to allow the system to boot.
(bootloader-config (bootloader-configuration
(bootloader bootloader)))
```
While "it will be enough to allow the system to boot", it is not enough for me, on my specific system, to get a convenient boot menu where I can, you know, select older systems (absolutely vital due to the brittleness of Shepherd). On my system, using `terminal_output gfxterm` leads to an "invisible" boot menu, making Guix's vaunted ability to have multiple bootable systems fairly useless --- I can't be sure what system I end up booting into since I can't see the boot menu. I think on other systems as well that need other terminal outputs (such as some sort of `serial`) this will be a problem as well.
A possible solution would be to check if the current system has a `provenance`, and if so, to read in the file and look for the `configuration` field. Then read *that* file and extract its `bootloader` field, and to only fall back to a default configuration if that attempt fails. See https://lists.gnu.org/archive/html/guix-devel/2021-03/msg00294.html for similar idea. Would this be an acceptable solution?
Thanks
raid5atemyhomework
next reply other threads:[~2021-03-28 4:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-28 4:42 raid5atemyhomework via Bug reports for GNU Guix [this message]
2021-03-29 2:01 ` bug#47442: guix system delete-generations does not use bootloader configuration raid5atemyhomework via Bug reports for GNU Guix
2021-07-23 15:32 ` raid5atemyhomework via Bug reports for GNU Guix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='UEumGHB0DHPN4Px9M_hdXYJ1Z3ap-1-yGXhaQKk5-m_7c2dxwsItslSQJzhQ0DQls5UUjQffWL3WaakI31iGIf_V7iDoWP9fLvN2hP9L-sU=@protonmail.com' \
--to=bug-guix@gnu.org \
--cc=47442@debbugs.gnu.org \
--cc=raid5atemyhomework@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).