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 1077310 - wipefs problem with some live .isos
Summary: wipefs problem with some live .isos
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: Tomas Dolezal
URL:
Whiteboard:
Depends On:
Blocks: 970394
TreeView+ depends on / blocked
 
Reported: 2014-03-17 17:15 UTC by Matthias Clasen
Modified: 2015-03-05 13:18 UTC (History)
6 users (show)

Fixed In Version: util-linux-2.23.2-17.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:18:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0501 0 normal SHIPPED_LIVE util-linux bug fix and enhancement update 2015-03-05 16:20:51 UTC

Description Matthias Clasen 2014-03-17 17:15:18 UTC
We are seeing udisks failure to re-format certain iso9660 formatted usb sticks. This is being described in https://bugzilla.redhat.com/show_bug.cgi?id=970394 
Further analysis in the upstream bug https://bugs.freedesktop.org/show_bug.cgi?id=76178 seems to indicate that this is a problem with wipefs, which udisks uses to remove the previous formatting.

Comment 2 Karel Zak 2014-03-20 13:30:10 UTC
OK, I'm not able to reproduce the problem on wipefs level on Fedora:

# dd if=/home/archive/iso/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/sdb bs=8M
119+1 records in
119+1 records out
999292928 bytes (999 MB) copied, 411.443 s, 2.4 MB/s

# eject /dev/sdb

... remove and insert again the flash

# lsblk /dev/sdb
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb      8:16   1  3.7G  0 disk
├─sdb1   8:17   1  953M  0 part /run/media/kzak/Fedora-Live-Desktop-x86_64-20-1
├─sdb2   8:18   1  4.9M  0 part
└─sdb3   8:19   1 19.7M  0 part

... as expected, partitions visible, sdb1 mounted

# umount /run/media/kzak/Fedora-Live-Desktop-x86_64-20-1

# wipefs -a /dev/sdb1
/dev/sdb1: 5 bytes were erased at offset 0x00008001 (iso9660): 43 44 30 30 31
/dev/sdb1: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdb1: 2 bytes were erased at offset 0x00000000 (mac): 45 52
/dev/sdb1: calling ioclt to re-read partition table: Invalid argument
                                                  ^^^^^^^^^^^^^^^^
... this is stupid thing, but without affect to wipefs functionality

Now try it again to see what is on the device:

# wipefs  /dev/sdb1
# blkid -p  /dev/sdb1

... nothing visible on the device.

# eject /dev/sdb

... remove and insert again the flash 

# lsblk /dev/sdb
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdb    8:16   1  3.7G  0 disk

kernel does not see any partition table here.

Comment 3 RHEL Program Management 2014-04-04 05:47:50 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Karel Zak 2014-04-24 11:52:20 UTC
Improved by upstream commit 24ed07818403f2ce52f9116a749036d58b91ca81:

# wipefs -a /dev/sdb1
/dev/sdb1: 5 bytes were erased at offset 0x00008001 (iso9660): 43 44 30 30 31
wipefs: /dev/sdb1: ignore nested "dos" partition table on non-whole disk device
wipefs: /dev/sdb1: ignore nested "mac" partition table on non-whole disk device
wipefs: Use the --force option to force erase.

... we can backport it to RHEL-7.1.

Comment 5 Ondrej Holy 2014-05-23 11:21:46 UTC
Udev still see the wrong fs type after calling "wipefs -a /dev/sdb1" with the announced commit:

$ udevadm info --query=env /sys/block/sdb/sdb1 | grep ID_FS_TYPE
ID_FS_TYPE=iso9660

The following fix have been found by Harald Hoyer:

$ echo "change" > /sys/block/sdb/uevent
$ echo "change" > /sys/block/sdb/sdb1/uevent
$ udevadm info --query=env /sys/block/sdb/sdb1 | grep ID_FS_TYPE

Wipefs affects also sdb, but no change uevent is send to him. Consequently there is wrong fs type for sdb1, because the type is inherited from sdb.

Could we call the missing uevent from wipefs for those hybrid isos (e.g. call it in case when force option is needed)?

Comment 6 Karel Zak 2014-05-26 10:39:00 UTC
(In reply to Ondrej Holy from comment #5)
>
> $ echo "change" > /sys/block/sdb/uevent
> $ echo "change" > /sys/block/sdb/sdb1/uevent
> $ udevadm info --query=env /sys/block/sdb/sdb1 | grep ID_FS_TYPE
> 
> Wipefs affects also sdb, but no change uevent is send to him. Consequently
> there is wrong fs type for sdb1, because the type is inherited from sdb.
> 
> Could we call the missing uevent from wipefs for those hybrid isos (e.g.
> call it in case when force option is needed)?

hmm... seems like request for nasty workaround.

Would be better to have a generic solution? The partition could be modified by many other tools. I guess it's possible to detect this situation in udev rules -- all you need is to scan also whole-disk device (e.g. sdb) on partition (e.g. sdb1) "change" event if the partition has ID_PART_ENTRY_OFFSET=0.

Comment 11 errata-xmlrpc 2015-03-05 13:18:18 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/RHBA-2015-0501.html


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