Hi, Oleg Pykhalov <go.wig...@gmail.com> skribis:
> l...@gnu.org (Ludovic Courtès) writes: > >> Oleg Pykhalov <go.wig...@gmail.com> skribis: > > [...] > >>> Are linux linux-arguments initrd in menu-entry required? >> >> Currently yes: this is how you tell GRUB what to boot. > > I see an issue with it, because not always you want them. > >>> Maybe we could have configfile field? >>> https://www.gnu.org/software/grub/manual/grub/html_node/configfile.html >> >> Yes, we could do that. One question is how to integrated properly since >> ‘menu-entry’ is now bootloader-independent. Perhaps Mathieu or Danny >> have ideas? > > We could start by adding a way to add anything. Here is a patch. > Probably ugly, but as a draft and idea about additional-options. > > From 7d7162a8ec78c84e7eba3ae9f7c4fbf07703617e Mon Sep 17 00:00:00 2001 > From: Oleg Pykhalov <go.wig...@gmail.com> > Date: Thu, 1 Feb 2018 08:59:30 +0300 > Subject: [PATCH] bootloader: Add additional-options to menu-entry. > > * gnu/bootloader.scm (<menu-entry>)[additional-options]: New field. > * gnu/bootloader/grub.scm (grub-configuration-file): Handle this. [...] > Which allows to use additional-options in menu-entry: > > (operating-system > … > (bootloader > (bootloader-configuration > (bootloader grub-efi-bootloader) > (target "/boot/efi") > (menu-entries > (list (menu-entry > (label "Another distro") > (linux "") > (initrd "") > (additional-options '("search --label --set another-disk-label" > "configfile /boot/grub/grub.cfg"))))))) > …) I think we should keep ‘menu-entry’ bootloader-independent. I’m actually not sure what problem we’re trying to solve: is it that the ‘root’ variable in GRUB gets set to the wrong partition when you try to dual-boot? In that case, perhaps a solution would be to add a ‘root’ field to <menu-entry>, that could default to 'auto to obtain the current behavior? Ludo’.