automount usb msdosfs no partition table
Edward Napierala
trasz at freebsd.org
Wed Oct 11 10:20:39 UTC 2017
2017-10-09 0:10 GMT+01:00 Tomasz CEDRO <tomek at cedro.info>:
> Hello world :-)
>
> I need to configure automount for a testing machine. It seems to work
> fine, except for two issues:
>
> 1. Mount point does not disappear after device disappears, what makes
> things harder to script when device is gone. automount -c does not
> remove the mountpoint, only restarting the service does. It is a bug
> or feature?
>
Bug, or perhaps a missing feature. No known workaround at this point,
I'm afraid.
> 2. Automounter does not mount USB Pendrive / MSDOSFS devices that does
> not have a parition table. Some USB Drives does not have valid
> partition table, they appear as /dev/da0 and can be mounted with
> mount_msdosfs /dev/da0 /mnt, but they are not recognised by
> automounter.. how can I make it work with such devices?
>
It should just work:
[trasz at v2:~]% ll /media
total 5
drwxr-xr-x 3 root wheel 512 Oct 6 15:38 .
drwxr-xr-x 21 root wheel 1024 Oct 5 23:58 ..
[trasz at v2:~]% doas mdconfig -s1g
md0
trasz at v2:~]% doas newfs_msdos /dev/md0
newfs_msdos: cannot get number of sectors per track: Operation not supported
newfs_msdos: cannot get number of heads: Operation not supported
/dev/md0: 2096576 sectors in 65518 FAT16 clusters (16384 bytes/cluster)
BytesPerSec=512 SecPerClust=32 ResSectors=1 FATs=2 RootDirEnts=512
Media=0xf0 FATsecs=256 SecPerTrack=63 Heads=255 HiddenSecs=0
HugeSectors=2097152
[trasz at v2:~]% ll /media
total 5
drwxr-xr-x 3 root wheel 512 Oct 6 15:38 .
drwxr-xr-x 21 root wheel 1024 Oct 5 23:58 ..
drwxr-xr-x 3 root wheel 512 Oct 10 06:50 md0
[trasz at v2:~]%
With the pendrive plugged in, can you do "gpart show",
"/etc/autofs/special_media" (as root), and paste the output?
More information about the freebsd-questions
mailing list