Bug 1227939

Summary: anaconda-ks.cfg is different from the one used for installation
Product: Red Hat Enterprise Linux 7 Reporter: Vivek Goyal <vgoyal>
Component: anacondaAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: mbanas, vgoyal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-21.48.22.57-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 23:07:21 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:

Description Vivek Goyal 2015-06-03 21:31:11 UTC
Description of problem:

I am trying to install rhel 7.1 using a kickstart file. I am trying to leave free space in root volume group using --reserved-percentage=20. After installation I look at anaconda-ks.cfg and looks little different from what I used for installation. 

Here is what I specified in my kickstart.

# Disk partitioning information
part /boot --size=500
part pv.1 --size=500 --grow
volgroup rhel --pesize=4096 pv.1 --reserved-percent=20
logvol /  --size=500 --grow --name=root --vgname=rhel
logvol swap --size=2048 --name=swap --vgname=rhel

And here is what's present in anaconda-ks.cfg after installation.

# Disk partitioning information
part pv.64 --fstype="lvmpv" --size=50699
part /boot --fstype="xfs" --size=500
volgroup rhel --pesize=4096 pv.64
logvol swap  --fstype="swap" --size=2048 --name=swap --vgname=rhel
logvol /  --fstype="xfs" --grow --size=500 --name=root --vgname=rhel


Two of the differences are notable.

--reserved-percent=20 disappeared. 

and

"part pv.1 --size=500 --grow" changed to " part pv.64 --fstype="lvmpv" --size=50699"

I am not sure if both the above are expected or not. 

Opening a bug to figure it out.

As a user, I think I expect to retain my original settings so that I can
use same kickstart file on other machines.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Brian Lane 2015-07-16 21:10:31 UTC
I'm not sure that's correct. The kickstart written to /root/ reflects the system as installed, and isn't just a copy of the source kickstart. As you can see it replaced that by adding the --size=50699 to the pv creation.

Maybe we should also copy the original un-modified kickstart to /root/ as well?

Comment 3 Vivek Goyal 2015-07-17 00:46:06 UTC
Copying un-modified kickstart sounds like a good idea to me.

Comment 4 David Cantrell 2015-07-17 17:45:52 UTC
(In reply to Vivek Goyal from comment #3)
> Copying un-modified kickstart sounds like a good idea to me.

Why?  You already have that kickstart file because you had to provide it to start the installation.

Comment 5 Vivek Goyal 2015-07-17 18:07:22 UTC
I think it just acts as template. For my initial system installation I had no where to begin with so I installed a system, took that kickstart file and modified it to and passed it in for second install.

So if I login into a system and I want to know how that system is configured, I can just take original kickstart file and use it for installation of other system. Without knowing where is the kickstart file which original admin used.

Comment 6 Vivek Goyal 2015-07-17 18:08:57 UTC
IOW, I think unmodified file will act as a template kickstart file out of box for other sytems too. (Assuming that unmodified one is more generic as compared to modified one and can apply to a wide variety of systems).

Comment 7 Brian Lane 2015-11-10 18:31:22 UTC
Let's copy the original ks.cfg from /run/install/ into /var/log/anaconda along with all the other logs:

https://github.com/rhinstaller/anaconda/pull/447

Comment 11 errata-xmlrpc 2016-11-03 23:07:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2158.html