Bug 582153

Summary: mount/99mount-root.sh does not respect comments
Product: [Fedora] Fedora Reporter: Jakob Hirsch <jh.redhat-2018>
Component: dracutAssignee: Harald Hoyer <harald>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: harald, jonathan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dracut-005-2.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-11 19:46:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakob Hirsch 2010-04-14 09:46:36 UTC
Description of problem:

dracut's mount/99mount-root.sh just searches the first line in $NEWROOT/etc/fstab which has '/' as the second word. This fails badly if you have this in your fstab:

#/dev/sda1	/	ext3	defaults	1 1
/dev/sda1	/	ext4	defaults	1 1

Which I happen to had after replacing my harddisk and switching to ext4 at this opportunity.


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

dracut-004-4.fc12.noarch

How reproducible:

always

Steps to Reproduce:
1. Insert a commented line in your fstab with / as the second word and some file system that does not match you / fs, e.g.

#/dev/blub  /  fat 0 0

2. reboot
3. watch dracut failing
  
Actual results:

remounting the root fs fails

Expected results:

remounting the root fs suceeds


Additional info:

man 5 fstab says "The proper way to read records from fstab is to use the routines getmntent(3)." Maybe we should do that :)

Comment 1 Fedora Update System 2010-04-15 14:38:10 UTC
dracut-005-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/dracut-005-2.fc12

Comment 2 Fedora Update System 2010-04-15 14:39:58 UTC
dracut-005-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/dracut-005-2.fc12

Comment 3 Fedora Update System 2010-04-15 14:49:03 UTC
dracut-005-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/dracut-005-2.fc12

Comment 4 Fedora Update System 2010-04-16 23:44:20 UTC
dracut-005-2.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dracut'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/dracut-005-2.fc12

Comment 5 Fedora Update System 2010-05-11 19:46:12 UTC
dracut-005-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.