Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev problem?

  1. #1
    Join Date
    Apr 2015
    Location
    Berlin
    Posts
    44

    Default automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev problem?

    Hi

    I have a partitioned external drive and it is not mounted and more correctly via dolphin and mounting any of those partitions (e.g. /dev/sda2) in dolphin by clicking on the device item results in an error message:
    Code:
    Error mounting /dev/sda2 at /run/media/andreas/UDF-Externe-Festplatte:  Command-line `mount -t "udf" -o  "uhelper=udisks2,nodev,nosuid,uid=0,gid=0,iocharset=utf8" "/dev/sda2"  "/run/media/andreas/UDF-Externe-Festplatte"' exited with non-zero exit  status 32: mount: Falscher Dateisystemtyp (wrong system filtype),  ungültige Optionen, der Superblock von /dev/sda2 ist beschädigt,  fehlende Kodierungsseite oder ein anderer Fehler
    lsblk gives the output:
    Code:
    lsblk --output NAME,KNAME,FSTYPE,LABEL,UUID,SIZE
    NAME   KNAME FSTYPE LABEL                  UUID                                   SIZE
    sda    sda   udf    UDF-Externe-Festplatte 589edd3fLinuxUDF                     931,5G
    ├─sda1 sda1  ntfs   NTFS1000MB             6D1B61A41DAB9E71                      1000M
    └─sda2 sda2  ext4   Linux-Externe-FP       c8442952-f42a-4e91-baf6-6957e30e345c 930,5G


    … but using just a simple mount, works correctly:
    Code:
    mount /dev/sda2 /run/media
    I figured out, that it has something to do with udev and its roles, and somehow it uses wrong device settings. But I cannot figure out where or how to change that.

    Where can it be fixed?
    • Do I have to create a fstab entry instead?
    • Was the external drive perhaps misconfigured that lead to wrong settings?


    Thank you for your help,
    Infinite_Dao

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,724

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    I am not sure you see the difference between the two mounts.

    The desktop mount does this with file system type udf.

    You mount without telling which file system type. The software then tries an intelligent guess and apparently has a hit with ext4 (which you show it is).

    Thus the question is why the desktop mount explicitly says it is udf.

    Strange is that lsblk already says that sda is udf. That would rule out partitioning at all!
    Nevertheless two partitions are reported.

    Is there a history connected to this device e.g. had it a udf (or iso) image before?

    Edit:
    You say you partitioned it, but with what and how.
    Last edited by hcvv; 17-Aug-2017 at 06:21.
    Henk van Velden

  3. #3
    Join Date
    Apr 2015
    Location
    Berlin
    Posts
    44

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    Quote Originally Posted by hcvv View Post
    Is there a history connected to this device e.g. had it a udf (or iso) image before?

    Edit:
    You say you partitioned it, but with what and how.
    Yes, I experimented with udf for interconnecting between different OS, but abandoned this approach. Then I partitioned it into the parts I did for other reasons.

    The question(s) remain
    • how can I force the system to mount any of the subpartitons, say sda2 correctly?
    • or can I fix the device itself, to provide the system with proper informations
    • or does the system, udev perhaps, store any configurations that cause this error in mounting it by using the wrong type.


    The odd thing is, that 2 weeks ago I had no problems in mounting it in dolphin. Irregularly I did system updates and suddenly (since 1 week or so) something occurred that provokes this error in not mounting it using dolphin (guess work on part of the system based on device information)

    As the system reports correctly that /dev/sda2 is ext4, I would expect the mounter to guess also the right type to mount, but it does not :-/ …

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,724

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    I asked which what and how you did partition. Lacking an answer I have to guess.
    You probably tried to partition it with GPT partitioning. I assume because the disk itself still has a label, a type that says UDF and a UUID which tries to communicate the same.
    Apparently the tool you used did not erase that information. I am not sure what should be there for a partitioned disk, but it is not there.

    It now looks as if the type udf is projected upon the partitions by the udev/udisk/etc software and the real types there are not detected anymore.

    Do you have already data on the partitions? I mean data that you can not restore from elsewhere?

    Another thing that draws my attention that this is /dev/sda. Most of the time sda is the system disk of a system and other disks are enumerated as sdb, sdc, sdd, etc. I hope you are correct here, because doing actions on the wrong disk will be fatal.

    When there is nothing of importance there, my advice would be to erase the first blocks of the disk, to be sure the UDF information is gone::
    Code:
    dd if=/dev/zero of=/dev/sda  bs=4096 count=8
    will erase more then enough.

    Then partition it to your needs and create file systems on the partitions to your needs.
    Henk van Velden

  5. #5
    Join Date
    Apr 2015
    Location
    Berlin
    Posts
    44

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    Quote Originally Posted by hcvv View Post
    When there is nothing of importance there, my advice would be to erase the first blocks of the disk, to be sure the UDF information is gone::
    Code:
    dd if=/dev/zero of=/dev/sda  bs=4096 count=8
    will erase more then enough.

    Then partition it to your needs and create file systems on the partitions to your needs.
    well …
    • I did back up first the data using rsync to another device
    • I applied dd if=/dev/zero of=/dev/sda bs=4096 count=8
    • partitioned it using gparted as I need it
    • and it mounts again as expected in dolphin


    Now it is copying back all the data. The reason it is listed as /dev/sda, I’m not sure, may be it is the sequence it is plugged in or was mounted/not mounted on shutdown and reboot, I don’t know but I also realized this somewhat odd order.

    Now it looks like
    Code:
    lsblk --output NAME,KNAME,FSTYPE,LABEL,UUID,SIZE
    NAME   KNAME FSTYPE LABEL            UUID                                   SIZE
    sda    sda                                                                931,5G
    ├─sda1 sda1  ntfs   NTFS1000MB       0C177EB129D82032                         1G
    └─sda2 sda2  ext4   LINUX-ext4-930GB 411b4da0-2ce4-4b4b-b57e-25ed519e7d1f 930,5G

    But I wonder: was there no other solution as to erase all device settings and built it anew?

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,724

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    Quote Originally Posted by Infinite_Dao View Post

    Now it looks like
    Code:
    lsblk --output NAME,KNAME,FSTYPE,LABEL,UUID,SIZE
    NAME   KNAME FSTYPE LABEL            UUID                                   SIZE
    sda    sda                                                                931,5G
    ├─sda1 sda1  ntfs   NTFS1000MB       0C177EB129D82032                         1G
    └─sda2 sda2  ext4   LINUX-ext4-930GB 411b4da0-2ce4-4b4b-b57e-25ed519e7d1f 930,5G
    I think you agree that that looks better
    Quote Originally Posted by Infinite_Dao View Post

    But I wonder: was there no other solution as to erase all device settings and built it anew?
    AFAIK the openSUSE documentaion about how to put an installation ISO on an USB stick also advices to erase the first few blocks when one wants to use that USB again as a partitioned device. I can however not find the URL to that doc now.

    IMHO it is a failure of the partitioning software. But as you fail to explain what you used (after I at least two times asked for it ), I can not say much about that.

    I assume that the whole GPT thing is still rather new and that it will take some more time before everything has settled down and to find out what best practices are in handling it in all, sometimes special, situations.
    Henk van Velden

  7. #7
    Join Date
    Apr 2015
    Location
    Berlin
    Posts
    44

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    Quote Originally Posted by hcvv View Post
    IMHO it is a failure of the partitioning software. But as you fail to explain what you used (after I at least two times asked for it ), I can not say much about that.
    I’m sorry, but I can’t tell much about that because I did not log my steps. When I did experiment with UDF, I did:
    Code:
    su -
    dd if=/dev/zero of=/dev/sdb bs=1M count=1                                                                                                              
    # 1+0 Datensätze ein
    # 1+0 Datensätze aus
    # 1048576 Bytes (1,0 MB) kopiert, 0,00335914 s, 312 MB/s
    # root@infinitedao:~ # sync
    sync
    
    mkudffs --utf8 --blocksize="512" --lvid="UDF-Externe-Festplatte" --vid="UDF-Externe-Festplatte" --media-type=hd /dev/sdb
    sync
    I thought UDF would be great to use on different OS, but it failed because it is limited for long filenames especially in nested folders. Then I “erased” the device somehow (but I can’t recall), and for partitioning, I’m convinced I used gparted as well. So to recall the critical steps in between I would have to time-travel backwards ;-) …

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,724

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    There must be some big misunderstanding here.

    You told several time that somewhere in the whole thing you partitioned the device.

    I only asked you several times which tool you used to partition.

    I would be very surprised if you can not remember what you used: fdisk, gdisk, YaST > Partitioner, whatever, ...............

    Oder.

    Dus hast mehrmals erwähnt das die Platte partitioniert worden ist.

    Ich habe mehrfach gefragt womit.

    Das mußt du dich doch errinnern!

    Es ist umso interessanter weil dieses Program die alte Daten in die Tabelle hinterlassen hat.
    Henk van Velden

  9. #9
    Join Date
    Apr 2015
    Location
    Berlin
    Posts
    44

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    Quote Originally Posted by hcvv View Post
    There must be some big misunderstanding here.

    You told several time that somewhere in the whole thing you partitioned the device.

    I only asked you several times which tool you used to partition.
    Kindly: I already wrote it: gparted, the gnome partitioner.

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,724

    Default Re: automount USB, external drive; Error mounting /dev/sda2 (wrong filtype udf vs. ext4), udev probl

    Quote Originally Posted by Infinite_Dao View Post
    Kindly: I already wrote it: gparted, the gnome partitioner.
    Thanks, I have no experience with it.
    Henk van Velden

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •