Leap 42.3 Mounting USB with changed filesystem, purging previous udev rules

Leap 42.3 KDE
Originally used dd to write the Leap 42.3 iso image for a clean install on a system. After installing the system the USB has been reformatted now automounting that USB fails (? udev rules have been created that it matches but are no longer applicable)

When hot plugging the USB dolphin throws the following error:An error occurred while accessing ‘openSUSE-Leap-42.3-DVD-x86_64033’, the system responded: The requested operation has failed: Error mounting /dev/sdc1 at /run/media/anne/openSUSE-Leap-42.3-DVD-x86_64033: Command-line `mount -t “iso9660” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=100,iocharset=utf8,mode=0400,dmode=0500” “/dev/sdc1” “/run/media/anne/openSUSE-Leap-42.3-DVD-x86_64033”’ exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

disk is no longer formatted as iso. current

anne@linux:~> dmesg | grep -i usb 571.197767] usb 2-4: new SuperSpeed USB device number 2 using xhci_hcd
571.214691] usb 2-4: New USB device found, idVendor=0781, idProduct=5580
571.214708] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
571.214710] usb 2-4: Product: Extreme
571.214711] usb 2-4: Manufacturer: SanDisk
571.214713] usb 2-4: SerialNumber: AA026214140615522535
571.232308] usb-storage 2-4:1.0: USB Mass Storage device detected
571.232673] scsi host6: usb-storage 2-4:1.0
571.232839] usbcore: registered new interface driver usb-storage
571.234691] usbcore: registered new interface driver uas

If I look in /dev/disk/by-id I can see entries, that are no longer applicable
anne@linux:/dev/disk/by-id> ls
usb-SanDisk_Extreme_AA026214140615522535-0:0
usb-SanDisk_Extreme_AA026214140615522535-0:0-part1

I used udevadm monitor to find the the device then test

anne@linux:/dev/disk/by-id> udevadm test /devices/pci0000:00/0000:00:14.0/usb2/2-4/IMPORT builtin ‘usb_id’ /usr/lib/udev/rules.d/40-libgphoto2.rules:9
IMPORT builtin skip ‘usb_id’ /usr/lib/udev/rules.d/50-udev-default.rules:13
IMPORT builtin ‘hwdb’ /usr/lib/udev/rules.d/50-udev-default.rules:13
MODE 0664 /usr/lib/udev/rules.d/50-udev-default.rules:41
PROGRAM ‘/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb2/2-4 2 3’ /usr/lib/udev/rules.d/69-libmtp.rules:2283
starting ‘/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb2/2-4 2 3’
‘/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb2/2-4 2 3’(out) ‘0’
Process ‘/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb2/2-4 2 3’ succeeded.
handling device node ‘/dev/bus/usb/002/003’, devnum=c189:130, mode=0664, uid=0, gid=0
preserve permissions /dev/bus/usb/002/003, 020664, uid=0, gid=0
preserve already existing symlink ‘/dev/char/189:130’ to ‘…/bus/usb/002/003’
ACTION=add
BUSNUM=002
DEVNAME=/dev/bus/usb/002/003
DEVNUM=003
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb2/2-4
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=Extreme
ID_MODEL_ENC=Extreme
ID_MODEL_FROM_DATABASE=SDCZ80 Flash Drive
ID_MODEL_ID=5580
ID_REVISION=0010
ID_SERIAL=SanDisk_Extreme_AA026214140615522535
ID_SERIAL_SHORT=AA026214140615522535
ID_USB_INTERFACES=:080650:
ID_VENDOR=SanDisk
ID_VENDOR_ENC=SanDisk
ID_VENDOR_FROM_DATABASE=SanDisk Corp.
ID_VENDOR_ID=0781
MAJOR=189
MINOR=130
PRODUCT=781/5580/10
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=4617899681
Unload module index
Unloaded link configuration context.

If I look in Removable Devices - System Settings Module
openSUSE-Leap-42.3-DVD-x86_64033 is listed as “attached” twice, and also in disconnected.

What is the easiest way to purge the udev rules that are no longer applicable? ie how can I automount this usb without suse mounting the USB as iso. More generally how can I rid udev of the generated rules that no longer apply?

Thanks

Is it a “larger than 32 GB” USB formatted with “exFAT”?

If so, there are licensing issues – with the Redmond folks.

  • Yes, there is a driver in Packman but, be very aware of the licensing issues if you choose to install it . . .

[HR][/HR]Installing a licensed Windows 10 in a VM is possibly the cheapest way out of the exFAT licensing mess . . .

thank you for your reply.

Yes, its a 64 GB drive listed as HPFS/NTFS/exFAT in fdisk. I don’t think its a driver issue though as I have no problem manually mounting the usb via konsole mount command. I would prefer not to have to sudo mount the drive manually though…

When I plug the drive in Device Notifier detects the USB but dolphin throws an error if I try to open it:

An error occurred while accessing 'openSUSE-Leap-42.3-DVD-x86_64033', the system responded: The requested operation has failed: Error mounting /dev/sdc1 at /run/media/anne/openSUSE-Leap-42.3-DVD-x86_64033: Command-line `mount -t "iso9660" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=100,iocharset=utf8,mode=0400,dmode=0500" "/dev/sdc1" "/run/media/anne/openSUSE-Leap-42.3-DVD-x86_64033"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdc1,

This USB is not listed in fstab.

The USB doesn’t currently have the label openSUSE-Leap-42.3-DVD-x86_64033. The USB was mounted during install as I booted to the USB to install the OS, the only time this USB would have had that label and format is during the installation period. The issue is now whenever I plug in the USB Device Notifier assumes its an ISO images, even though its not, and tries to mount as such which fails.

I don’t know what udev rule, is identifying the drive as “openSUSE-Leap-42.3-DVD-x86_64033” an ISO image, I’m hoping to update the rule to mount the drive automatically without manual terminal intervention. If I am wrong in thinking its in udev rule: any advice where else I should be looking for where Device Notifier is getting these settings would be appreciated.

Be sure you copy the iso to the device NOT a partition on the device.

Sorry, but, it is a driver issue:

  • HPFS/NTFS/exFAT are proprietary files systems with licensing issues.

Yes, it may be possible to mount the thing but, you will not be able to access to the data on the drive because the required FUSE driver is not installed.


 > zypper info fuse-exfat
Loading repository data...
Reading installed packages...


Information for package fuse-exfat:
-----------------------------------
Repository     : Packman Repository
Name           : fuse-exfat
Version        : 1.2.6-4.1
Arch           : x86_64
Vendor         : http://packman.links2linux.de
Installed Size : 74.0 KiB
Installed      : No
Status         : not installed
Source package : fuse-exfat-1.2.6-4.1.src
Summary        : Free exFAT file system implementation
Description    :
    This driver is the first free exFAT file system implementation with write
    support. exFAT is a simple file system created by Microsoft. It is intended
    to replace FAT32 removing some of it's limitations. exFAT is a standard FS
    for SDXC memory cards.

 > 

[HR][/HR]Please be aware that, there are legal issues related to the installation of the FUSE exFAT driver on any Linux system and, AFAIK, there isn’t a channel for private users to pay the license fee to Microsoft.
[HR][/HR]Yes, Android and Apple can read and write to exFAT devices because, they have a bulk license agreement with Microsoft.
[HR][/HR]Yes, the Linux systems embedded in your automobile may be able to read and write to exFAT devices because, there’s a licensed exFAT driver for embedded Linux systems which the manufacturer of your automobile has purchased.
[HR][/HR]Yes, your QNAP NAS (once again embedded Linux) may be able to read and write exFAT devices but, only if you have purchased the exFAT driver from QNAP ($3,99 USD).
[HR][/HR]Please be aware, you have been warned . . .

Hello,
i have exactly the same problem with an old USB key of 2GB (FAT 32), that i used to install Suse and than reformatted.
I have the problem ONLY with this key. When i plug the key, dolphin see the old label, but i found out that downgrading UDEV and SYSTEMD to the original version
shipped with Leap 42.3 solves the problem (USB is once again mounted correctly).
So, anyone has idea how to purge udev or we have to wait for an update of UDEV package?

Thanks
Simone

To put it another way, with standard, out-of-the-box, Leap 42.3 versions of the “udev” and “systemd” packages – both version 228-32.2 – the USB behaviour is “as expected”.

But, if the “udev” and “systemd” packages are installed from some other source (where?), the USB behaviour is not as expected.

So, where did you obtain the “udev” and “systemd” packages? – From which repositories?
Searching the openSUSE repositories doesn’t, currently, provide any clues as to where the other repositories are located:
<https://software.opensuse.org/search> <https://software.opensuse.org/package/udev> <https://software.opensuse.org/package/systemd>

Hi,

The source is always the official Update Repo, with systemd and udev 228-27.2-x86_64 i can mount the Usb Key, with systemd and udev 228-29.1 or 228-32.2 i have the problem.

Thanks
Simone

Leap 42.3; Laptop with USB 3.0; latest udev and systemd packages.

I grabbed 3 really old USB sticks, one of them is only 120 MB – they all mounted OK and KDE Dolphin can access them OK. They all mounted with “vFAT”. On the other hand, I’ve never reformatted them, ever.

What happens if, the “bad” USB stick is reformatted once again?

I was finally able to solve the problem with Gparted, but i had to rebuild the partition table of the usb key (format only was not enough).
Strange thing, Gparted decided to automount the Windows 10 partition from the hard disk after the initial scan.

Anyway now the usb key is mounted correctly.

I just used the dd command with sync to copy the downloaded openSUSE iso to the USB and booted directly to the USB for the install, there were no issues copying the openSUSE image or the OS install itself (the openSUSE installer is quite nice and polished).

I’m pleased **d****curtisfra **is now convinced that it is possible to mount and transfer files to/from NTFS without installing additional packages from the base install.

This isn’t a show stopper for me as I mentioned above, I simply manually mount the USB via konsole, It’s just a mild annoyance that device notifier pops up immediately when connecting the device and attempts to mount it as `mount -t “iso9660” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=100,iocharset=utf8,mode=0400,dmode=0500” and fails. I wanted to understand why this was happening and what configuration setting was responsible (and maybe how it identified the disk serial number?). I hit a wall when looking at udev.

I have found some files in /var/lib/hardware/udi that maybe responsible. I know nothing about UDI (? Universal Driver Interface) and some of the information online (wikipedia for example) calls it a defunct project. I’m going to remove those files and report back the results.

Thank you for supporting users experiencing issues.

Udev doesn’t play a part in identifying the filesystem though. This tells me that something in the device formatting is stale and that udisksd detects that the file system is iso9660. What does the following report?

sudo blkid

Did you completely wipe the device (eg dd or wipefs ) after using it as a bootable device with the installation ISO, and before attempting to reformat it again?

openSUSE includes several RPM packages with no licensing issues which support NTFS file systems, such as:

  • ntfs-3g;
  • ntfsprogs.

The CLI command “apropos ntfs” lists all the NTFS utilities installed by default on openSUSE systems.

NTFS does not, currently, have any licensing issues with commercial enterprises such as the Redmond folks – Microsoft . . .

**** exFAT has more than a few, nasty, licensing issues !!! ****

Same issue with a 16 GB FAT32 formatted USB key on Leap 42.2. I had to downgrade udev to version 228-25.6.1 to get the right behaviour.

deano_ferrari](https://forums.opensuse.org/member.php/122-deano_ferrari) apologies for my delayed response, one of the patches pushed out resolved the issue (still unsure of the underlying issue or the patch that resolved it), and I see no way to mark this issue as resolved.

… I’m not sure how I reformatted the device it could have been dd, the KDE partitioner application which I’m not very familiar with, or even the Windows format utility.

when running sudo blkid it reports the same as it did after reformatting it from a bootable device,
/dev/sdc1: LABEL=“usb-extreme” the UUID," TYPE=“ntfs”

No changes have been made to the format of the USB device but now there are no issues when connecting it to the system and opening it with the dolphin file manager. I no longer have to sudo mount from the terminal (dolphin doesn’t try to mount it as an iso).

I do appreciate the heads up on udisksd sys daemon, it looks like it would have been more fruitful looking at udisksctl command line tool rather than udevadm monitor to troubleshoot before I requested assistance. That maybe useful for me in the future thanks.

See https://bugzilla.opensuse.org/show_bug.cgi?id=1046268
It was caused by a wrong udev rule in the udev package itself.