Bug 830114 - grub2-tools does not install /etc/default/grub
grub2-tools does not install /etc/default/grub
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2012-06-08 05:17 EDT by Jan Vcelak
Modified: 2013-03-03 20:30 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-08 14:47:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Vcelak 2012-06-08 05:17:55 EDT
Description of problem:

File "/etc/default/grub" is not created after package installation and "/etc/sysconfig/grub" becomes dangling symlink.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. remove /etc/default/grub and /etc/sysconfig/grub
2. reinstall grub2-efi grub2-tools

Actual results:
no /etc/default/grub

Expected results:
some /etc/default/grub with default config?

Additional info:
Comment 1 Mads Kiilerich 2012-06-08 06:10:17 EDT
The default /etc/default/grub has intentionally been dropped by pjones because anaconda 'always' create and overwrite it anyway. The file is however still owned as %config %shadow. You removed anacondas file manually - don't do that.

Upstream use /etc/default which is debian-style (AFAIK) and a slightly odd child on Fedora. Someone requested that the equally odd but Fedora-ish /etc/sysconfig should be used instead and they got a symlink. The symlink might be dangling if Fedora haven't been installed properly, but it still points at a file that is owned and should be present in a correctly installed system.

What you describe is thus 'works as intended'. Please explain and reopen if you disagree.
Comment 2 Jan Vcelak 2012-06-08 06:35:46 EDT
I disagree a little bit.

If I switch between bootloaders from some reason (in my case was it switching from BIOS booting to EFI booting) and I do not want any garbage left in my system, I remove the grub packages, delete all configuration files and then reinstall the packages. This is not the only use case.

I do not like when Anaconda generates me something which I'm not able to restore without Anaconda or without digging manually in the Anaconda source codes to determine what should I create or execute.

I think, that grub2 should install the configuration file, and Anaconda should just append relevant options at the end of the file. (Wit some comment, that the options were added by Anaconda. But this is not important.)

Anyway, the options are documented in /usr/share/doc/grub2-tools-2.0/grub.html well, so I can recreate the configuration file by myself. But if grub creates the file with some nice defaults for me, it would be happier.

Reopening, feel free to reclose. ;-)
Comment 3 Mads Kiilerich 2012-06-08 06:55:24 EDT

FWIW: I agree with you - it seems like the package maintainer doesn't, and I don't see any new convincing arguments here.

Besides that: Creating a sh config file with a known format is one thing - editing (or even appending) to a sh config file is more error prone when we can't know what kind of conditional statements has been written to the file. Some kind of .d with prioritized config snippets would perhaps be better. 

Good luck.

Note You need to log in before you can comment on or make changes to this bug.