Il 08/04/20 01:46, Jonathan Billings ha scritto:> On Apr 7, 2020, at 04:14, Alessandro Baggi <alessandro.baggi at gmail.com> wrote: >> thank you for your explanation. So in el8 grubby should be used to update kernel opts and grub2-mkconfig is used to generate an initial config. >> >> If I'm not wrong, grubby updates every single (sperated) entries on /boot/loader/entries and then generate the /boot/efi/EFI/centos/grub.cfg? >> >> Suppose that I want use only grub2-mkconfig to generate the grub.cfg what other operation are needed to make it working? > grubby only alters the existing configuration. It never regenerates the grub.cfg in EFI. > > You can?t use ?grub2-mkconfig? to create individual boot spec entries. > > -- > Jonathan Billings <billings at negate.org>Please explain how the process work, it is not so clear for me. I'm confused. In C7 when I need to modify grub menu kernel option I modify /etc/default/grub and run grub2-mkconfig and thats all. It always worked for me. On C8 this does not work anymore, grub2-mkconfig is not enough, it generates only the grub.cfg but it does not update the menu entries and need to modify each entry using grubby. At this point what grub.cfg is used for if directives are not loaded by it and need grubby to modify entries? I'm missing something....
On Wed, Apr 8, 2020 at 1:31 PM Alessandro Baggi <alessandro.baggi at gmail.com> wrote:> Il 08/04/20 01:46, Jonathan Billings ha scritto: > > On Apr 7, 2020, at 04:14, Alessandro Baggi <alessandro.baggi at gmail.com> > wrote: > >> thank you for your explanation. So in el8 grubby should be used to > update kernel opts and grub2-mkconfig is used to generate an initial config. > >> > >> If I'm not wrong, grubby updates every single (sperated) entries on > /boot/loader/entries and then generate the /boot/efi/EFI/centos/grub.cfg? > >> > >> Suppose that I want use only grub2-mkconfig to generate the grub.cfg > what other operation are needed to make it working? > > grubby only alters the existing configuration. It never regenerates the > grub.cfg in EFI. > > > > You can?t use ?grub2-mkconfig? to create individual boot spec entries. > > > > -- > > Jonathan Billings <billings at negate.org> > Please explain how the process work, it is not so clear for me. I'm > confused. > > In C7 when I need to modify grub menu kernel option I modify > /etc/default/grub and run grub2-mkconfig and thats all. It always worked > for me. > > On C8 this does not work anymore, grub2-mkconfig is not enough, it > generates only the grub.cfg but it does not update the menu entries and > need to modify each entry using grubby. At this point what grub.cfg is > used for if directives are not loaded by it and need grubby to modify > entries? > > I'm missing something.... > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >To get the old way. set GRUB_ENABLE_BLSCFG=false in /etc/default/grub Warning: some OS updates resets this value to "true" on update. -- Lee
Am 08.04.20 um 10:01 schrieb Alessandro Baggi:> Il 08/04/20 01:46, Jonathan Billings ha scritto: >> On Apr 7, 2020, at 04:14, Alessandro Baggi >> <alessandro.baggi at gmail.com> wrote: >>> thank you for your explanation. So in el8 grubby should be used to >>> update kernel opts and grub2-mkconfig is used to generate an initial >>> config. >>> >>> If I'm not wrong, grubby updates every single (sperated) entries on >>> /boot/loader/entries and then generate the >>> /boot/efi/EFI/centos/grub.cfg? >>> >>> Suppose that I want use only grub2-mkconfig to generate the grub.cfg >>> what other operation are needed to make it working? >> grubby only alters the existing configuration.? It never regenerates >> the grub.cfg in EFI. >> >> You can?t use ?grub2-mkconfig? to create individual boot spec entries. >> >> -- >> Jonathan Billings <billings at negate.org> > Please explain how the process work, it is not so clear for me. I'm > confused. > > In C7 when I need to modify grub menu kernel option I modify > /etc/default/grub and run grub2-mkconfig and thats all. It always worked > for me. > > On C8 this does not work anymore, grub2-mkconfig is not enough, it > generates only the grub.cfg but it does not update the menu entries and > need to modify each entry using grubby. At this point what grub.cfg is > used for if directives are not loaded by it and need grubby to modify > entries? > > I'm missing something.... >Normally grub2-mkconfig is enough. Whats your output of # grub2-editenv list and # cat /proc/cmdline and # cat /etc/default/grub -- Leon
On Apr 8, 2020, at 04:01, Alessandro Baggi <alessandro.baggi at gmail.com> wrote:> > Il 08/04/20 01:46, Jonathan Billings ha scritto: >> >> grubby only alters the existing configuration. It never regenerates the grub.cfg in EFI. >> >> You can?t use ?grub2-mkconfig? to create individual boot spec entries. >> >> -- >> Jonathan Billings <billings at negate.org> > Please explain how the process work, it is not so clear for me. I'm confused. > > In C7 when I need to modify grub menu kernel option I modify /etc/default/grub and run grub2-mkconfig and thats all. It always worked for me. > > On C8 this does not work anymore, grub2-mkconfig is not enough, it generates only the grub.cfg but it does not update the menu entries and need to modify each entry using grubby. At this point what grub.cfg is used for if directives are not loaded by it and need grubby to modify entries? > > I'm missing something....Don?t use grub2-mkconfig, it is really only for initial grub configuration. It has a problematic past in CentOS 7 too. Disabling blscfg is possible but it isn?t the default setup and not the recommended way of updating kernel entries. If you need to update kernel parameters, use grubby. That?s what is run in the kernel package install scripts (via new-kernel-package). That?s what is run in packages like the nvidia 3rd party packages. -- Jonathan Billings
On Wed, Apr 08, 2020 at 07:40:24AM -0400, Jonathan Billings wrote:> If you need to update kernel parameters, use grubby. That?s what is > run in the kernel package install scripts (via > new-kernel-package). That?s what is run in packages like the nvidia > 3rd party packages.Sorry, it's 'new-kernel-pkg' in el7, not 'new-kernel-package', and in el8, it's 'kernel-install' which eventually calls new-kernel-pkg. Look at the output of `rpm -q --scripts kernel` (el7) and `rpm -q --scripts kernel-core` (el8) -- Jonathan Billings <billings at negate.org>
Il 08/04/20 13:40, Jonathan Billings ha scritto:> On Apr 8, 2020, at 04:01, Alessandro Baggi <alessandro.baggi at gmail.com> wrote: >> Il 08/04/20 01:46, Jonathan Billings ha scritto: >>> grubby only alters the existing configuration. It never regenerates the grub.cfg in EFI. >>> >>> You can?t use ?grub2-mkconfig? to create individual boot spec entries. >>> >>> -- >>> Jonathan Billings <billings at negate.org> >> Please explain how the process work, it is not so clear for me. I'm confused. >> >> In C7 when I need to modify grub menu kernel option I modify /etc/default/grub and run grub2-mkconfig and thats all. It always worked for me. >> >> On C8 this does not work anymore, grub2-mkconfig is not enough, it generates only the grub.cfg but it does not update the menu entries and need to modify each entry using grubby. At this point what grub.cfg is used for if directives are not loaded by it and need grubby to modify entries? >> >> I'm missing something.... > Don?t use grub2-mkconfig, it is really only for initial grub configuration. It has a problematic past in CentOS 7 too. Disabling blscfg is possible but it isn?t the default setup and not the recommended way of updating kernel entries. > > If you need to update kernel parameters, use grubby. That?s what is run in the kernel package install scripts (via new-kernel-package). That?s what is run in packages like the nvidia 3rd party packages. > > > -- > Jonathan Billings > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centosOk thank you for your suggestion.