New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the EFI code for grub_config and grub_menuentry #48
Conversation
…for grub2. Code copied from kernel_parameter/grub2.rb
…for grub2. Code copied from kernel_parameter/grub2.rb Added missing setting of os_name in grub_config/grub2.rb and grub_menuentry/grub2.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're going to have to park this one for the moment.
@tparkercbn Do you have a good way of detecting whether or not EFI mode is being used? The reason that we didn't do this initially is that we couldn't figure out how to do this and you could end up updating a file that has no effect.
Should we update both files?
From reading the code it looks like it loops over the files and updates only the ones that exist.
If there is no /boot/efi/EFI directory then nothing will be done.
This is the same code that was already in the kernel_parameter/grub2.rb file that is being used for other variables in different sections of grub, I just ported it over.
I am using this branch on all of my servers (~1000) most of which are still HP G8s with Legacy BIOS and am not seeing any issues. I added this code to support the new G10 systems that are EFI only.
Let me know if there is anything else you would like me to add.
I have also attached a very simple fact that I have on my systems for determining what mode we are using that seems consistent at least on Debian8 and 10 and CentOS7 and 8
Tom
====================== boot_mode.rb ======================
require 'facter'
Facter.add('boot_mode') do
setcode do
if File.exists?('/sys/firmware/efi')
boot_mode = 'UEFI'
else
boot_mode = 'BIOS'
end
boot_mode
end
end
=========================================================
From: Trevor Vaughan <notifications@github.com>
Sent: Wednesday, March 11, 2020 10:13 AM
To: hercules-team/augeasproviders_grub <augeasproviders_grub@noreply.github.com>
Cc: Tom Parker <tparker@cbnco.com>; Mention <mention@noreply.github.com>
Subject: Re: [hercules-team/augeasproviders_grub] Fixed the EFI code for grub_config and grub_menuentry (#48)
@trevor-vaughan requested changes on this pull request.
We're going to have to park this one for the moment.
@tparkercbn<https://github.com/tparkercbn> Do you have a good way of detecting whether or not EFI mode is being used? The reason that we didn't do this initially is that we couldn't figure out how to do this and you could end up updating a file that has no effect.
Should we update both files?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#48 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABJYF5QAIZS3PWTCGUNHWI3RG6L7PANCNFSM4KPNAGEA>.
|
@tparkercbn Good call. I'll approve this and push it based on your use in production. Thanks! |
The grub.cfg path was not being found for grub_config and grub_menuentry providers with EFI and grub2. This pull request fixes that.