Bug 1055104

Summary: grub2-mkconfig -o destroys a symlink
Product: [Fedora] Fedora Reporter: Tomas Dolezal <todoleza>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: andriusb, bcl, bugs.michael, dennis, mads, mkolaja, pholica, pjones, vgaikwad
Target Milestone: ---Keywords: Patch, Regression
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http//
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1032182 Environment:
Last Closed: 2014-01-20 17:25:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1032182    
Bug Blocks:    

Description Tomas Dolezal 2014-01-18 20:00:59 UTC
+++ This bug was initially created as a clone of Bug #1032182 +++

Description of problem:
There is the following symbolic link in the system by default:

/etc/grub2.cfg -> /boot/grub2/grub.cfg

The following command, however, destroys the link by replacing it with a regular file:

mkconfig-grub2 -o /etc/grub2.cfg

Version-Release number of selected component (if applicable):
grub2-2.00-25.fc20.x86_64

How reproducible:
always

Steps to Reproduce:
1. make sure that /etc/grub2.cfg is a symlink to /boot/grub2/grub.cfg
2. run mkconfig-grub2 -o /etc/grub2.cfg
3. rpm -V grub2 fails because destination file becomes a regular file with updated content, grub2 is not updated

Actual results:
/etc/grub2.cfg is a regular file

Expected results:
/etc/grub2.cfg is a symlink

Additional info:

Comment 1 Mads Kiilerich 2014-01-18 20:40:23 UTC
It has "always" been that way. It has never been recommended/documented to use the symlink for mkconfig. The symlink is only for grubby.

Comment 2 Michael Schwendt 2014-01-19 08:52:43 UTC
Tomas, see bug 743977 for an older ticket about this.

Comment 3 Brian Lane 2014-01-20 17:25:35 UTC

*** This bug has been marked as a duplicate of bug 743977 ***