On Mon, Apr 1, 2019 at 5:22 AM Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote: > > I'm interested in configuring grub to allow selecting different sets of > kernel parameters at boot time. I know I can edit the boot command line > by hand, but this is tedious and error-prone. (An example might be to > choose between the Nouveau and Nvidia drivers by selecting the > appropriate menu entry). And of course I'd want this updated > automatically with each new kernel version (i.e. each kernel would then > have two alternative entries). > > How feasible is this? blscfg just moves Fedora menu entries from grub.cfg into their own file in /boot/loader/entries. It's easier to parse. You can duplicate them, and then edit the boot parameters however you want. But as for automatically duping them for each kernel you install, that's not a current feature. So you'll need to dup and modify, or script it. You could probably get a tip on the help-grub list for duping the grub-mkconfig (grub2-mkconfig in Fedora) scripts, and modifying it to accept a new "GRUB_CMDLINE_LINUX2" line in /etc/default/grub. The original script would create an entry using GRUB_CMDLINE_LINUX and the modified script would create an entry using GRUB_CMDLINE_LINUX2, for each kernel found in /boot. Of course you'd have to manually run grub2-mkconfig after every kernel installation, as this isn't used by kernel post-install scripts. You could maybe hack grubby with a replacement bash script, so that when the kernel package calls grubby, it calls your bash script named grubby, which then just runs grub2-mkconfig. -- Chris Murphy _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx