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 1262621 - CoreOS image: EXT4-fs (sda3): couldn't mount RDWR because of unsupported optional features (ff000000)
Summary: CoreOS image: EXT4-fs (sda3): couldn't mount RDWR because of unsupported opti...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1262491
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-13 15:47 UTC by Richard W.M. Jones
Modified: 2015-09-13 18:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1262491
Environment:
Last Closed: 2015-09-13 18:10:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2015-09-13 15:47:24 UTC
Description:

Trying to mount a CoreOS stable image on the RHEL 7 kernel fails
with this error:

[    2.838285] EXT4-fs (sda3): couldn't mount RDWR because of unsupported optional features (ff000000)

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

host kernel: 3.10.0-229.el7.x86_64
libguestfs-1.28.1-1.53.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

Download the CoreOS stable from:
http://stable.release.core-os.net/amd64-usr/766.3.0/coreos_production_qemu_image.img.bz2
and uncompress it.

On Fedora, this image can be opened for write with guestfish.

On RHEL 7.1 however, the image cannot be opened for write:

$ guestfish -a coreos_production_qemu_image.img -m /dev/sda3
libguestfs: error: mount_options: /dev/sda3 on / (options: ''): mount: wrong fs type, bad option, bad superblock on /dev/sda3,

Add the guestfish -v -x parameters to show the kernel error:
$ guestfish -v -x -a coreos_production_qemu_image.img -m /dev/sda3
[...]
mount -o  /dev/sda3 /sysroot/
[   11.882105] EXT4-fs (sda3): couldn't mount RDWR because of unsupported optional features (ff000000)

The same thing happens with loop/kpartx, but it's a bit more complicated
because first you have to convert the format to raw:

$ mkdir /tmp/mnt
$ qemu-img convert coreos_production_qemu_image.img coreos_production_qemu_image.img.raw
$ sudo losetup /dev/loop0 coreos_production_qemu_image.img.raw
$ sudo kpartx -av /dev/loop0 
$ sudo mount /dev/mapper/loop0p3 /tmp/mnt
mount: wrong fs type, bad option, bad superblock on /dev/mapper/loop0p3,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
$ dmesg | tail
...
[1241914.741858] EXT4-fs (dm-2): couldn't mount RDWR because of unsupported optional features (ff000000)
$ sudo kpartx -d /dev/loop0
$ sudo losetup -d /dev/loop0

Comment 2 Richard W.M. Jones 2015-09-13 18:08:36 UTC
This was solved by Eric Sandeen.  His comment follows:

My best guess is that they're using something similar to the hack around
line 458 of:

https://chromium.googlesource.com/chromiumos/platform/crosutils/+/ea621903e927ac
f77889bcda4fa71636f4af7158/common.sh

  # These two helpers clobber the ro compat value in our root filesystem.

  disable_rw_mount() {
    local rootfs="$1"
    local offset="${2-0}"  # in bytes
    local ro_compat_offset=$((0x464 + 3))  # Set 'highest' byte
    printf '\377' |
      sudo dd of="$rootfs" seek=$((offset + ro_compat_offset)) \
            conv=notrunc count=1 bs=1
  }

There's a new flag upstream that would serve this purpose better:

  commit 2cb5cc8b09c939c77826635956c35995b15c9331
  Author: Darrick J. Wong <darrick.wong>
  Date:   Thu Feb 12 22:31:21 2015 -0500

    ext4: support read-only images

    Add a rocompat feature, "readonly" to mark a FS image as read-only.
    The feature prevents the kernel and e2fsprogs from changing the image;
    the flag can be toggled by tune2fs.

Comment 3 Richard W.M. Jones 2015-09-13 18:10:09 UTC
The link in the previous comment was split.  It should be:
https://chromium.googlesource.com/chromiumos/platform/crosutils/+/ea621903e927acf77889bcda4fa71636f4af7158/common.sh


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