Hello,
What should I do to have nouveau.modeset=0 added to the grub.cfg files ?
Thank
=========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 | | Room# D114A ===========================================================================
On Jul 23, 2022, at 16:15, Patrick Dupre pdupre@gmx.com wrote:
What should I do to have nouveau.modeset=0 added to the grub.cfg files ?
There are two options: 1.) Edit /etc/default/grub and add it to the kernel command line variable, then run “grub2-mkconfig -o /boot/grub2/grub.cfg” (No need to run it for the file in EFI, the default grub.cfg there sources this one)
2.) run: grubby --update-kernel=ALL --args="nouveau.modeset=0"
I prefer the first but if you’ve ever used grubby before, it hard-codes the kernel command line in each bootloader spec file so you are stuck using grubby for the rest of the life of the install.
-- Jonathan Billings
On Sat, 2022-07-23 at 19:39 -0400, Jonathan Billings wrote:
if you’ve ever used grubby before, it hard-codes the kernel command line in each bootloader spec file so you are stuck using grubby for the rest of the life of the install.
I've never used grubby nor grub2-mkconfig.
My preference has been a third option:
First hand edit the grub.cfg file that we're not supposed to (because our changes won't be permanent, the next kernel install will recreate the whole thing from a different mould), put in my kernel line changes onto one of the boot choices, and reboot from it to see if they do what I want (I remove "rhgb" from the kernel parameters).
These days, that tends to be: /boot/efi/EFI/fedora/grub.cfg And has this symlink to it: /etc/grub2-efi.cfg
If I'm happy, I'll make the same adjustments to the default settings that the installer will use when it installs the next kernel.
Things just look after themselves after that.
On Jul 23, 2022, at 23:54, Tim via users users@lists.fedoraproject.org wrote:
My preference has been a third option:
First hand edit the grub.cfg file that we're not supposed to (because our changes won't be permanent, the next kernel install will recreate the whole thing from a different mould), put in my kernel line changes onto one of the boot choices, and reboot from it to see if they do what I want (I remove "rhgb" from the kernel parameters).
These days, that tends to be: /boot/efi/EFI/fedora/grub.cfg And has this symlink to it: /etc/grub2-efi.cfg
Except in the last handful of releases, /boot/efi/EFI/fedora/grub.cfg won’t have any boot options. Today it just is a simple file to load /boot/grub2/grub.cfg. And THAT file doesn’t have any specific kernel entries, it just loads blscfg, and the kernel entries are each defined in a file in /boot/loader/entries/.
There is the default kernel command line defined in the grub.cfg that on a vanilla install, is referenced in each bootloader spec file in /boot/loader/entries/ but as soon as you use grubby to change it, the kernel parameters get hard-coded into each file, so it’s possible to have a different set of kernel options in each file, as well as in the grub.cfg. Also, if someone has replaced the grub.cfg in EFI with one created by grub2-mkconfig, there’s now yet another place to get lost adding options.
Then there is the confusion of the /etc/grub2.cfg and /etc/grub2-efi.cfg symlinks. I’ve seen advice that say to use `sed -i.old ‘s/rhgb quiet//‘ /etc/grub2.cfg` which replaces the symlink with a real file, making all sorts of things break.
This is why Fedora always suggests using grubby.
On Sun, 2022-07-24 at 07:39 -0400, Jonathan Billings wrote:
This is why Fedora always suggests using grubby.
Actually, I can't remember how I changed the kernel options on Fedora 36, though I don't recall using grubby. I've only done one Fedora installation recently.
On 24 Jul 2022, at 00:40, Jonathan Billings billings@negate.org wrote:
On Jul 23, 2022, at 16:15, Patrick Dupre pdupre@gmx.com wrote:
What should I do to have nouveau.modeset=0 added to the grub.cfg files ?
There are two options: 1.) Edit /etc/default/grub and add it to the kernel command line variable, then run “grub2-mkconfig -o /boot/grub2/grub.cfg” (No need to run it for the file in EFI, the default grub.cfg there sources this one)
2.) run: grubby --update-kernel=ALL --args="nouveau.modeset=0"
I recommend always to use grubby. That way when new kernels are installed the new kernel will get your command line changes.
Expect things to break if you edit the files directly.
Barry
I prefer the first but if you’ve ever used grubby before, it hard-codes the kernel command line in each bootloader spec file so you are stuck using grubby for the rest of the life of the install.
-- Jonathan Billings _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure