Re: automount usb msdosfs no partition table

2017-10-11 Thread Edward Napierala
2017-10-09 0:10 GMT+01:00 Tomasz CEDRO :

> 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@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@v2:~]% doas mdconfig -s1g
md0
trasz@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@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@v2:~]%

With the pendrive plugged in, can you do "gpart show",
"/etc/autofs/special_media" (as root), and paste the output?
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: automount usb msdosfs no partition table

2017-10-10 Thread Tomoaki AOKI
Does sysutils/automount (not sysutils/automounter) work as expected?

 *Need fix for head, though. The fix itself is easy, but I've stuck
  with version check to create extra patch for ports.

Attached patch for head. If you want to use sysutils/automount on head,
apply it as root AFTER install for now.


On Mon, 9 Oct 2017 21:07:29 +0200
Tomasz CEDRO  wrote:

> On Mon, Oct 9, 2017 at 8:59 PM, Scott Bennett  wrote:
> > Tomasz CEDRO  wrote:
> >> i cannot format that device, as its the "firmware feature" that it has no
> >> partition table.. i would have to fix the firmware.. but it would be nice
> >> to automount it anyway as macos, linux and windoze can :-)
> >  Well, put a partition table onto it, then.  You can use either gpart(8)
> > or fdisk(8) to do that and to create a slice, and then use newfs_msdos(8) to
> > create the file system.
> >  I understood from your previous message that you wanted to create a 
> > FAT32
> > file system on /dev/da0 rather than on /dev/da0s1, which meant on the bare
> > device rather than on a slice.  Otherwise, create the partition table, 
> > create
> > a slice, and proceed.
> 
> The problem is device has hardcoded filesystem, with no partition
> table, all this is created by firmware on device boot, cannot get
> formatted nor partitioned.. I can mount it by hand.. but it does not
> get automounted.. and exactly this part is the problem and quest here
> :-) :-)
> 
> -- 
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> ___
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
> 


-- 
Tomoaki AOKI
--- /usr/local/sbin/automount.orig	2015-09-21 16:10:07.114602000 +0900
+++ /usr/local/sbin/automount	2017-09-30 00:23:51.855577000 +0900
@@ -423,12 +423,12 @@ case ${2} in
   __log "${DEV}: fsck_msdosfs ${LINE}"
 done
 __wait_for_device ${DEV}
-if mount_msdosfs ${OPTS} -o large -o longnames -m 644 -M 755 \
+if mount_msdosfs ${OPTS} -o longnames -m 644 -M 755 \
  -D ${CODEPAGE} -L ${ENCODING} ${DEV} ${MNT}
 then
   ADD=1
 else
-  __log "${DEV}: mount failed (fat) 'mount_msdosfs ${OPTS} -o large -o longnames -D ${CODEPAGE} -L ${ENCODING} -m 644 -M 755 ${DEV} ${MNT}'"
+  __log "${DEV}: mount failed (fat) 'mount_msdosfs ${OPTS} -o longnames -D ${CODEPAGE} -L ${ENCODING} -m 644 -M 755 ${DEV} ${MNT}'"
   exit 1
 fi
 __log "${DEV}: mount (fat)"
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Re: automount usb msdosfs no partition table

2017-10-09 Thread Tomasz CEDRO
On Mon, Oct 9, 2017 at 8:59 PM, Scott Bennett  wrote:
> Tomasz CEDRO  wrote:
>> i cannot format that device, as its the "firmware feature" that it has no
>> partition table.. i would have to fix the firmware.. but it would be nice
>> to automount it anyway as macos, linux and windoze can :-)
>  Well, put a partition table onto it, then.  You can use either gpart(8)
> or fdisk(8) to do that and to create a slice, and then use newfs_msdos(8) to
> create the file system.
>  I understood from your previous message that you wanted to create a FAT32
> file system on /dev/da0 rather than on /dev/da0s1, which meant on the bare
> device rather than on a slice.  Otherwise, create the partition table, create
> a slice, and proceed.

The problem is device has hardcoded filesystem, with no partition
table, all this is created by firmware on device boot, cannot get
formatted nor partitioned.. I can mount it by hand.. but it does not
get automounted.. and exactly this part is the problem and quest here
:-) :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: automount usb msdosfs no partition table

2017-10-09 Thread Scott Bennett
Tomasz CEDRO  wrote:

> i cannot format that device, as its the "firmware feature" that it has no
> partition table.. i would have to fix the firmware.. but it would be nice
> to automount it anyway as macos, linux and windoze can :-)
>
 Well, put a partition table onto it, then.  You can use either gpart(8)
or fdisk(8) to do that and to create a slice, and then use newfs_msdos(8) to
create the file system.
 I understood from your previous message that you wanted to create a FAT32
file system on /dev/da0 rather than on /dev/da0s1, which meant on the bare
device rather than on a slice.  Otherwise, create the partition table, create
a slice, and proceed.


  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
**
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: automount usb msdosfs no partition table

2017-10-09 Thread Tomasz CEDRO
i cannot format that device, as its the "firmware feature" that it has no
partition table.. i would have to fix the firmware.. but it would be nice
to automount it anyway as macos, linux and windoze can :-)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


automount usb msdosfs no partition table

2017-10-09 Thread Scott Bennett
On Date: Mon, 9 Oct 2017 01:10:19 +0200 Tomasz CEDRO  wrote:

> I need to configure automount for a testing machine. It seems to work
> fine, except for two issues:

 I've never used the automounter, so I can't help you with that.
>
> 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?
>
> 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?
>
 Try newfs_msdos(8).


  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
**
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


automount usb msdosfs no partition table

2017-10-08 Thread Tomasz CEDRO
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?

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?

Any hints appreciated :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"