vermaden / automount

Simple devd(8) based automounter for FreeBSD
66 stars 20 forks source link

Mounting FAT32 not successful #12

Closed thefallenidealist closed 5 years ago

thefallenidealist commented 5 years ago

Hi and thanks for you tool. I like the idea of devd based automounter (I had something like that in mind but more primitive) - but I was lazy :)

Today I tried it with some random USB stick ("SanDisk Ultra USB 3.0 32GB") which was (I presume) formated by manufacturer. After attaching, my filemanager will start, but disk is not mounted nor error message was shown.

gpart show da0
=>       1  60063743  da0  MBR  (29G)
         1        31       - free -  (16K)
        32  60063712    1  fat32lba  (29G)

2019-01-13 18:29:04 /dev/da0: random wait for '0.2' seconds before 'attach' action                                                                                                                                 
2019-01-13 18:29:04 /dev/da0: attach                                                                                                                                                                               
2019-01-13 18:29:05 /dev/da0: filesystem not supported or no filesystem                                                                                                                                            
2019-01-13 18:29:06 /dev/da0s1: random wait for '0.8' seconds before 'attach' action                                                                                                                               
2019-01-13 18:29:06 /dev/da0s1: attach                                                                                                                                                                             
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs ** /dev/da0s1                                                                                                                                                         
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs ** Phase 1 - Read and Compare FATs                                                                                                                                    
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs ** Phase 2 - Check Cluster Chains                                                                                                                                     
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs ** Phase 3 - Checking Directories                                                                                                                                     
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs ** Phase 4 - Checking for Lost Files                                                                                                                                  
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs 6523 files, 2793328 free (698871 clusters)                                                                                                                            
2019-01-13 18:29:07 /dev/da0s1: mount (fat) 

/usr/local/sbin/automount da0s1 attach
mount_msdosfs: /dev/da0s1: mount option <large> is unknown: Invalid argument

Problem can be fixed with removing "-large" flag to mount_msdosfs command:

- FATCMD=$( mount_msdosfs ${OPTS} -o large -o longnames -m 644 -M 755 -D ${CODEPAGE} -L ${ENCODING} ${USEROPTS} ${DEV} ${MNT} )                                                                          
+ FATCMD=$( mount_msdosfs ${OPTS} -o longnames -m 644 -M 755 -D ${CODEPAGE} -L ${ENCODING} ${USEROPTS} ${DEV} ${MNT} )

Information about my system:

% pkg info -E automount
automount-1.5.8
% uname -rv
FreeBSD 12.0-RELEASE-p1
vermaden commented 5 years ago

Thanks ;)It was removed (-o large) in 1.5.9 version, but 1.5.9 (or later) automount has not beed pushed to Ports.I have asked Bryan Drawery to do that but he did not made this yet.Regards.Od: "The Fallen Idealist" <notifications@github.com>Do: "vermaden/automount" <automount@noreply.github.com>; Wysłane: 20:44 Niedziela 2019-01-13Temat: [vermaden/automount] Mounting FAT32 not successful (#12)Hi and thanks for you tool. I like the idea of devd based automounter (I had something like that in mind but more primitive) - but I was lazy :) Today I tried it with some random USB stick ("SanDisk Ultra USB 3.0 32GB") which was (I presume) formated by manufacturer. After attaching, my filemanager will start, but disk is not mounted nor error message was shown. gpart show da0 => 1 60063743 da0 MBR (29G) 1 31 - free - (16K) 32 60063712 1 fat32lba (29G)

2019-01-13 18:29:04 /dev/da0: random wait for '0.2' seconds before 'attach' action
2019-01-13 18:29:04 /dev/da0: attach
2019-01-13 18:29:05 /dev/da0: filesystem not supported or no filesystem
2019-01-13 18:29:06 /dev/da0s1: random wait for '0.8' seconds before 'attach' action
2019-01-13 18:29:06 /dev/da0s1: attach
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs /dev/da0s1
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs
Phase 1 - Read and Compare FATs
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs Phase 2 - Check Cluster Chains
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs
Phase 3 - Checking Directories
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs ** Phase 4 - Checking for Lost Files
2019-01-13 18:29:07 /dev/da0s1: fsck_msdosfs 6523 files, 2793328 free (698871 clusters)
2019-01-13 18:29:07 /dev/da0s1: mount (fat)

/usr/local/sbin/automount da0s1 attach mount_msdosfs: /dev/da0s1: mount option <large> is unknown: Invalid argument

Problem can be fixed with removing "-large" flag to mount_msdosfs command:

Information about my system: % pkg info -E automount automount-1.5.8 % uname -rv FreeBSD 12.0-RELEASE-p1

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

thefallenidealist commented 5 years ago

Thanks ;)It was removed (-o large) in 1.5.9 version, but 1.5.9 (or later) automount has not beed pushed to Ports

Sorry, I should have tried the GitHub version before opening issue report. GitHub version works for mounting my USB stick :)

vermaden commented 5 years ago

Try latest 1.6.1 it has other features and fixes.It also now supports MTP devices, remember to also copy automount_devd.conf to /usr/local/etc/devdRegards.Od: "The Fallen Idealist" <notifications@github.com>Do: "vermaden/automount" <automount@noreply.github.com>; Wysłane: 18:04 Poniedziałek 2019-01-14Temat: Re: [vermaden/automount] Mounting FAT32 not successful (#12) Thanks ;)It was removed (-o large) in 1.5.9 version, but 1.5.9 (or later) automount has not beed pushed to Ports

Sorry, I should have tried the GitHub version before opening issue report. GitHub version works for mounting my USB stick :)

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

thefallenidealist commented 5 years ago

I tried and indeed it is working for FAT32 and Android phone. Thank you again :)

vermaden commented 5 years ago

Welcome, happy automounting :)Od: "The Fallen Idealist" <notifications@github.com>Do: "vermaden/automount" <automount@noreply.github.com>; Wysłane: 23:37 Poniedziałek 2019-01-14Temat: Re: [vermaden/automount] Mounting FAT32 not successful (#12)I tried and indeed it is working for FAT32 and Android phone. Thank you again :)

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.