Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 154768 - mkinitrd creates broken ramdisks if /etc/fstab contains 'rw'
Summary: mkinitrd creates broken ramdisks if /etc/fstab contains 'rw'
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Brian Lane
QA Contact: Kevin Baker
Depends On:
TreeView+ depends on / blocked
Reported: 2005-04-14 01:39 UTC by Wojciech Palacz
Modified: 2014-12-01 23:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-07-27 17:57:14 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Wojciech Palacz 2005-04-14 01:39:21 UTC
Description of problem:
system won't boot with an initrd image, if it was created when /etc/fstab
contained 'rw' in the root filesystem options

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

How reproducible:

Steps to Reproduce:
1. edit /etc/fstab, replace 'defaults' with 'rw'
2. do something which invokes mkinitrd (e.g. install updated kernel)
3. reboot
Actual results:
initrd mounts / read-write, then 'fsck /' fails, and rc.sysinit drops
you to the emergency shell

Expected results:
should boot without problems

Additional info:
problem lies with one command in the generated ramdisk
    mount -o rw --ro -t ext3 /dev/root /sysroot
which mounts in rw mode, instead of ro mode.

Can be difficult to figure out if several months pass between 1. and 2.

You can either fix nash, so that '--ro' will have higher priority
than '-o rw', or enhance mkinird to do s/rw/defaults/.

Comment 1 Peter Jones 2005-04-20 18:47:37 UTC
Why is it set to "rw" in /etc/fstab?  I think this shouldn't be a supported
thing to do, but if you've got a good reason, I'd like to hear it so I can

Comment 2 Wojciech Palacz 2005-04-21 15:20:15 UTC
> Why is it set to "rw" in /etc/fstab?

No particular reason. I was editing /etc/fstab by hand, and "rw" is
easier to type than "defaults".

> I think this shouldn't be a supported thing to do...

mount(8) says "defaults -- Use default options: rw, suid, dev, exec,
auto, nouser, and async".
So, IMHO, system should behave exactly the same no matter if /etc/fstab
contains "defaults", "rw", "rw,suid,dev", "suid,async", or any other
subset of default options.

Consider also the reverse of your question - is there a good reason why
user should not be allowed to put "rw" into /etc/fstab ?

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