Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1595372

Summary: Installing with kickstarter file restults in incorrect /etc/fstab
Product: Red Hat Enterprise Linux 6 Reporter: stewart.hansen
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.9CC: kdudka, toneata
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-03 12:27:16 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:
Attachments:
Description Flags
KickStart file used. none

Description stewart.hansen 2018-06-26 18:52:52 UTC
Created attachment 1454786 [details]
KickStart file used.

Description of problem:
When using a kickstarter to install RHEL6, the fstab and grub do not agree on the bootable media. That is the swap and the root partition are incorrect in the /etc/fstab file.

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


How reproducible:
It is reproducible when installed on a hard drive that is smaller than the maxsize specified in the kickstarter.

Steps to Reproduce:
1. Use a harddrive that is smaller than the 20GB maxsize.

2. Use a kickstarter that sets up the partitions with the following
# Disk Partition Information
part /boot  --fstype=ext4 --label BOOT --size=100 --ondisk=sda
part /      --fstype=ext4 --label ROOT --size=6000 --grow --maxsize=20000 --ondisk=sda
part swap   --fstype=swap --label SWAP --size=512 --ondisk=sda

3. Run the kick starter on a rhel-server-6.9-i386-dvd.iso

Actual results:
After installing on media that is smaller than the maxsize. In the anaconda installer, there appears to be a sorting routine for the partitions and it sets up the partions as followes:
/boot -> /dev/sda1
/swap -> /dev/sda2
/     -> /dev/sda3

(note that swapping the lines for the ROOT and SWAP in the kickstarter didn't affect the result)

Grub is then configured to boot from /dev/sda3. 
However, the /etc/fstab file has the files as 
/dev/sda2	/		ext4	defaults	1 1
/dev/sda1	/boot		ext4	defaults	1 2
/dev/sda3	/swap		swap	defaults	0 0

Expected results:
The result that was expected was
/boot -> /dev/sda1
/     -> /dev/sda2
/swap -> /dev/sda3

With Grub and /etc/fstab files agreeing on the booting partition

Additional info:
There was inconsistent results when adjusting the maxsize value to smaller than the harddrive, greater than 10G failed yet 6G would succeed.

One that was discovered to get around this was by adding the key word --asprimary to the kickstart for the BOOT and ROOT partitions. Using the asprimery would also create the partitions in the order as outlined in the kickstarter.

So there are ways around this bug, but there is a bug when creating partition this way. Simply put Grub and /etc/fstab should be initialized correctly from the installation. Sorting the partitions is fine as long as it is accounted for in the install and doesn't break the install.

Comment 2 Kamil Dudka 2018-06-27 07:14:53 UTC
The setup package has nothing to do with kickstarts.  Switching to anaconda...