Re: Where(in which file) does the installer(Anaconda) write the grub menu entries (for the user to edit)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 31 Aug 2021 18:44:44 +0200
Gueven Bay via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Yes, this file exists BUT in every grub2 tutorial and also in this
> file itself at the top it is written that you should not edit this
> file directly.

I think that for what you want to do, editing is fine.  I've edited
that file in the past to change the kernel command line, and it worked
fine.  I think the warning is there so that people won't think that any
changes they make there instead of in the /etc/default/grub file will
be permanent.  The command line changes will hold until you run
grub2-mkconfig again, and then they will be overwritten in the new
grub.cfg by what is in /etc/default/grub.  Installing a new kernel
won't override them, as program grubby copies the options from the
previous kernel to the new kernel during the install.

> No, Sir. These are the only lines in my /etc/default/grub :
> GRUB_TIMEOUT=5
> GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
> GRUB_DEFAULT=saved
> GRUB_DISABLE_SUBMENU=true
> GRUB_TERMINAL_OUTPUT="console"
> GRUB_CMDLINE_LINUX="resume=UUID=583baa2f-645c-4a12-99a1-f595ef664aa5
> rhgb quiet" GRUB_DISABLE_RECOVERY="true"

If you edit this line, and add the options you want at the end of the
line, separated by a space, and then run grub2-mkconfig, they will be
set on all your installed kernels.

> GRUB_ENABLE_BLSCFG=true
> 
> But I want to change the "linux" and "initrd" lines in the grub menu

The GRUB_CMDLINE_LINUX sets the linux command line options.  The
options available are in the kernel documentation.  You should be able
to look them up at kernel.org.  I am not sure how to change the initrd
line via grub, as I have never done it.

I see these options in the kernel documentation:

bootconfig      [KNL]
                        Extended command line options can be added to
an initrd and this will cause the kernel to look for it.

                        See Documentation/admin-guide/bootconfig.rst

initrd=         [BOOT] Specify the location of the initial ramdisk

        initrdmem=      [KNL] Specify a physical address and size from
        which to load the initrd. If an initrd is compiled in or
                        specified in the bootparams, it takes priority
        over this setting.
                        Format: ss[KMG],nn[KMG]
                        Default is 0, 0

> entry! I do not see any way to change them in /etc/default/grub.
> And as I try to make it clear, I cannot see which of the scripts under
> /etc/grub.d/ I should change to change these two grub commands.
> 
> Where - if I should and must not edit the grub.cfg - can I change
> these lines so that I can give the kernel other boot parameters?

As above or you can edit the grub.cfg file if you understand the
shortcomings, that it will be overwritten with the options in
/etc/default/grub whenever you run grub2-mkconfig.

If you want to use the custom sections of the grub.cfg file, you would
put your entries in the appropriate file in /etc/grub.d and then run
grub2-mkconfig so that they will be picked up.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux