Good day All,
Recently I have performed a clean install of Fedora 24 and I will like to make some persistent changes to grub2, in the past (Fedora 23) I would modify /etc/sysconfig/grub and append the changes to the GRUB_CMDLINE and run grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg and I would be okay. However when I try to get /etc/sysconfig/grub which is a symbolic link to /etc/default/grub I no long see the options to make the changes, Instead I see this content in both /etc/default/grub
# # DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub #
### BEGIN /etc/grub.d/00_header ### set pager=1
if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="${saved_entry}" fi
if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else
**snip**
I have checked the F24 docs on modify grub2 and I see that it still advise on editing GRUB_CMDLINE from /etc/sysconfig/grub.
Can someone shed some light on making persistent changes to the grub cmdline on F24.
Thanks in advance.
On Thu, 07 Jul 2016 10:45:30 +0800 Earl Ramirez wrote:
run grub2-mkconfig
As near as I can tell, absolutely nothing ever runs the grub2-mkconfig program, so unless you run it yourself you can make permanent changes by simply editing the grub.cfg file directly.
When dnf installs a new kernel, it simply looks at the existing kernel lines in grub.cfg and copies the same options to the new kernel line (or the "grubby" program it runs does that).
Hi Earl,
On Fedora 24 it's the same configuration as Fedora 23, you have to edit /etc/default/grub file and after run the grub2-mkconfig command to update the grub.cfg Configuration file in /boot. Make sure that the symbolic link of /etc/sysconfig/grub is still pointing to /etc/default/grub file.
Cheers, Edouard.
2016-07-07 14:51 GMT+02:00 Tom Horsley horsley1953@gmail.com:
On Thu, 07 Jul 2016 10:45:30 +0800 Earl Ramirez wrote:
run grub2-mkconfig
As near as I can tell, absolutely nothing ever runs the grub2-mkconfig program, so unless you run it yourself you can make permanent changes by simply editing the grub.cfg file directly.
When dnf installs a new kernel, it simply looks at the existing kernel lines in grub.cfg and copies the same options to the new kernel line (or the "grubby" program it runs does that). -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 08/07/16 02:07, Edouard Fazenda wrote:
Hi Earl,
On Fedora 24 it's the same configuration as Fedora 23, you have to edit /etc/default/grub file and after run the grub2-mkconfig command to update the grub.cfg Configuration file in /boot. Make sure that the symbolic link of /etc/sysconfig/grub is still pointing to /etc/default/grub file.
Cheers, Edouard.
Hi Earl, just following on from what Edouard said, I have never used /etc/sysconfig/grub to make grub changes, as until your thread I didn't know it existed. All the grub documentation I have seen has said to make changed directly to /etc/default/grub, which is what I have always done. Like Tom and you have both indicated I have always run grub2-mkconfig/grub2-install manually because I don't like the format of the grub menu built by grubby (which is automatically run when a new kernel is installed as Tom said). Also as I understand it, grubby does not use /etc/default/grub to build its grub menus.
From what you have shown in your thread it looks like /etc/sysconfig/grub is linked to the wrong file. It seems to be linked to /etc/grub.d/00-header, so you may want to re-link it back to /etc/default/grub. I have checked on my F24 system and /etc/sysconfig/grub is a link to /etc/default/grub.
regards, Steve
2016-07-07 14:51 GMT+02:00 Tom Horsley <horsley1953@gmail.com mailto:horsley1953@gmail.com>:
On Thu, 07 Jul 2016 10:45:30 +0800 Earl Ramirez wrote: > run grub2-mkconfig As near as I can tell, absolutely nothing ever runs the grub2-mkconfig program, so unless you run it yourself you can make permanent changes by simply editing the grub.cfg file directly. When dnf installs a new kernel, it simply looks at the existing kernel lines in grub.cfg and copies the same options to the new kernel line (or the "grubby" program it runs does that). -- users mailing list users@lists.fedoraproject.org <mailto:users@lists.fedoraproject.org> To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org-- ________________________________________ Edouard Fazenda Tel : 0688451444
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Hi, all,
I have checked on my F24 system and /etc/sysconfig/grub is a link to /etc/default/grub.
The same with me, on a fresh instalattion of Fedora 24: ls /etc/sysconfig/grub -al lrwxrwxrwx. 1 root root 17 Jun 10 21:31 /etc/sysconfig/grub -> /etc/default/grub
Regards, Rami Rosen
On 8 July 2016 at 06:03, Stephen Morris samorris@netspace.net.au wrote:
On 08/07/16 02:07, Edouard Fazenda wrote:
Hi Earl,
On Fedora 24 it's the same configuration as Fedora 23, you have to edit /etc/default/grub file and after run the grub2-mkconfig command to update the grub.cfg Configuration file in /boot. Make sure that the symbolic link of /etc/sysconfig/grub is still pointing to /etc/default/grub file.
Cheers, Edouard.
Hi Earl, just following on from what Edouard said, I have never used /etc/sysconfig/grub to make grub changes, as until your thread I didn't know it existed. All the grub documentation I have seen has said to make changed directly to /etc/default/grub, which is what I have always done. Like Tom and you have both indicated I have always run grub2-mkconfig/grub2-install manually because I don't like the format of the grub menu built by grubby (which is automatically run when a new kernel is installed as Tom said). Also as I understand it, grubby does not use /etc/default/grub to build its grub menus.
From what you have shown in your thread it looks like /etc/sysconfig/grub is linked to the wrong file. It seems to be linked to /etc/grub.d/00-header, so you may want to re-link it back to /etc/default/grub. I have checked on my F24 system and /etc/sysconfig/grub is a link to /etc/default/grub.
regards, Steve
Thanks for the responses all, I have confirmed that the symbolic link points to /etc/default/grub
$ ls -la /etc/sysconfig/ total 152 lrwxrwxrwx. 1 root root 17 Jun 11 02:31 grub -> /etc/default/grub
when I use less to read /etc/default/grub, below is what I am seeing; therefore, the /etc/default/grub file is not the same on this box, I will whip up a F24 KVM instance and copy the /etc/default/grub file to this box and I think I should be good.
# DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub #
### BEGIN /etc/grub.d/00_header ### set pager=1
if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="${saved_entry}" fi
if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else */etc/default/grub*
Thanks again all,
I copied the /etc/default/grub from the KVM, modified the GRUB_CMDLINE_LINUX and everything is as expected now.
Well I only glanced at the replies and all - which take an approach which seems kinda strange - but I am not much into Fedora at this time.
I am suspicious that the approach here may not handle kernel updates well.
Well perhaps a few things I learned during my short quest to make a kind of “backup-tool repair-tool forensic-tool multi-distro” flash drive may be useful here. I made some flash drives which I do use from time to time today but I got discouraged by the “firmware can equal maleware” issues with flash drives so planned to move on (likely to USB-SSD if I ever get back to it).
This was making an normal “hard drive” boot environment for an Ubuntu install with the modification to the grub control files to produce an Ubuntu installation on the flash drive which would:
process updates well including changes to the kernel NOT probe the local environment when processing kernel updates Preserve the “menuentry boot stanzas” which would boot to the tools above (loop mounted .iso and other Linux partitions on the flash drive).
The grub control files:
/etc/default/grub
Here adding the “ GRUB_DISABLE_OS_PROBER=true “ line prevented looking at the local environment while building the flash drives on various boxes. There are many switches and controls available here.
/etc/grub.d/40_custom (note: the README in /etc/grub.d)
Here you can add “menuentry boot stanzas” which will automatically make themselves part of grub.cfg ( /boot/grub/grub.cfg in Ubuntu) during an update process involving a new kernel.
HTH
On Thu, Jul 7, 2016 at 10:05 PM, Earl A Ramirez earlaramirez@gmail.com wrote:
Thanks again all,
I copied the /etc/default/grub from the KVM, modified the GRUB_CMDLINE_LINUX and everything is as expected now.
-- Kind Regards Earl Ramirez
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 8 July 2016 at 18:10, Tom Horsley horsley1953@gmail.com wrote:
On Thu, 7 Jul 2016 23:52:18 -0700 Tod Merley wrote:
I am suspicious that the approach here may not handle kernel updates
well.
Kernel updates utterly ignore /etc/default/grub and just copy the new kernel's args from one of the old kernel's args. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
That is true but when you run grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg it will update all of the kernel arguments; therefore, when the kernel is updated there will be no issues.
Earl A Ramirez thanks for sharing this issue.
I am interested in how it goes with this over time.
I am interested in which UEFI/Secure boot modes you use and how.
I hope all goes well.
On Fri, Jul 8, 2016 at 4:29 AM, Earl A Ramirez earlaramirez@gmail.com wrote:
On 8 July 2016 at 18:10, Tom Horsley horsley1953@gmail.com wrote:
On Thu, 7 Jul 2016 23:52:18 -0700 Tod Merley wrote:
I am suspicious that the approach here may not handle kernel updates
well.
Kernel updates utterly ignore /etc/default/grub and just copy the new kernel's args from one of the old kernel's args. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
That is true but when you run grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg it will update all of the kernel arguments; therefore, when the kernel is updated there will be no issues.
-- Kind Regards Earl Ramirez
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Fri, 8 Jul 2016 13:05:09 +0800 Earl A Ramirez wrote:
I copied the /etc/default/grub from the KVM, modified the GRUB_CMDLINE_LINUX and everything is as expected now.
Maybe I'm paranoid, but one file being utterly incorrect would lead me to wonder how many other files were also messed up :-(.