Discussion:
Interaction between grubby and grub2-mkconfig
Sam Varshavchik
7 years ago
Permalink
I edited GRUB_CMDLINE_LINUX in /etc/default/grub before I installed the most
recent kernel update. However the grub entry for the new kernel did not
reflect my changes in the updated /boot/grub2/grub.cfg

Digging into this, it appears that the kernel packages run the grubby tool
which appears to be responsible for updating grub.cfg, and it does that,
apparently (not 100% sure) by cloning existing kernel entries; and the
/etc/default/grub file comes from the grub2-tool package, and grubby doesn't
know anything about it.

If I run grub2-mkconfig, it generates something completely different from
the existing grub.cfg. I have not analyzed the differences, but using the
output of grub2-mkconfig seems risky; not sure if subsequent invocations of
grubby will deal with it.

Did anyone use grub2-mkconfig before, to generate a new grub.cfg, and then
subsequently installed kernels new without grubby causing any issues?
Tom Horsley
7 years ago
Permalink
On Sat, 20 Jan 2018 10:24:26 -0500
Post by Sam Varshavchik
Did anyone use grub2-mkconfig before, to generate a new grub.cfg, and then
subsequently installed kernels new without grubby causing any issues?
I never use /etc/default/grub, I always edit the grub.cfg file by hand.
The whole grub2-mkconfig thing was a huge mistake, and thankfully
of fedora I can ignore it utterly (on ubuntu, on the other hand,
kernel updates seem to always run mkconfig which means habits
on one distro will kill you on another :-).
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedo
Tom H
7 years ago
Permalink
...
I modify "new-kernel-pkg" simply to run "grub2-mkconfig" and I create
a custom file in "/etc/grub.d/" that is the only executable file in it
in order to customize the output of "grub2-mkconfig".
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-leave@

stan
7 years ago
Permalink
On Sat, 20 Jan 2018 10:24:26 -0500
Post by Sam Varshavchik
Did anyone use grub2-mkconfig before, to generate a new grub.cfg, and
then subsequently installed kernels new without grubby causing any
issues?
Yes, I've done this without any problems. Grubby puts the latest entry
on its own line, I like the submenu style so I usually run
grub2-mkconfig after an update, to make sure I get the style I like.
But I've booted from configs where grubby had added the line I booted
from.

Running grub2-mkconfig also makes sure that I can boot other Fedora
installations from that config file as it scans the drives for other
bootable partitions and puts them in the config. The old grub used to
be better for this, as a single config file could just point to all the
configs on other partitions and select them to bring up the menu for
them.
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-lea
Stephen Morris
7 years ago
Permalink
...
I have always used grub2-mkconfig and the old grub equivalent as I have
never liked the boot menus that grubby generates. The one thing I don't
like about this process is that I also boot Ubuntu and Windows from the
grub menu as well and I have never been able to get grub to boot Ubuntu
via its gui boot interface, it always boots via Ubuntu's text interface.
The reverse is same, in that if I use Ubuntu to write the grub2 menus to
the mbr then they boot Fedora via its text interface rather than its gui
interface. Do you have any experience around configuring grub to boot
other distros via there gui interfaces, other than manually editing
grub.cfg to achieve that?


regards,

Steve
Post by Tom Horsley
_______________________________________________
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedo
stan
7 years ago
Permalink
On Sun, 21 Jan 2018 11:30:46 +1100
...
Can't help you with that, as I've always used the text interfaces
(booted to runlevel 3, now called multiuser).
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an
Stephen Morris
7 years ago
Permalink
...
No problems, thanks Stan.


regards,

Steve
Post by stan
_______________________________________________
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an em
Tom H
7 years ago
Permalink
...
"/etc/default/grub" is used by "grub2-mkconfig" and not by "grubby".
Post by Sam Varshavchik
If I run grub2-mkconfig, it generates something completely different
from the existing grub.cfg. I have not analyzed the differences, but
using the output of grub2-mkconfig seems risky; not sure if subsequent
invocations of grubby will deal with it.
Did anyone use grub2-mkconfig before, to generate a new grub.cfg, and
then subsequently installed kernels new without grubby causing any
issues?
All distros other that Fedora and RHEL (and its clones) use
"grub2-mkconfig". I use it everywhere that I use grub2 without a
problem.

In order to get the dracut options on the kernel cmdline that the
default Fedora "etc/grub2.cfg" has, you have to add them to
"/etc/default/grub" before running "grub2-mkconfig".

"grubby" dupes the top line for the new kernel so you can use it after
using "grub2-mkconfig".
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedorap
Loading...