…
Code:root@ozzie:~ # fstyp /dev/da0s1 msdosfs
/sbin/fsck_msdosfs -n /dev/da0s1
…
Code:root@ozzie:~ # fstyp /dev/da0s1 msdosfs
/sbin/fsck_msdosfs -n /dev/da0s1
/sbin/fsck_msdosfs -n /dev/da0s1
root@ozzie:~ # /sbin/fsck_msdosfs -n /dev/da0s1
** /dev/da0s1
** Phase 1 - Read FAT and checking connectivity
** Phase 2 - Checking Directories
** Phase 3 - Checking for Lost Files
4 files, 52 GiB free (1701127 clusters)
Why all the parameters on umount?umount -v -t msdosfs /dev/da0s1 /media/da0s1
/dev/da0s1 /flash msdosfs rw,noauto 0 0
/dev/da0 /flash1 msdosfs rw,noauto 0 0
Why all the parameters on umount?
It looks like that device mounts correctly, are you asking why it doesn't unmount correctly?
If gpart shows a partition that is a dos fs, when it gets plugged in you wind up with /dev/da0s1. One
can also format the raw device so you only wind up with /dev/da0.
I have these lines in my /etc/fstab to make it a little simpler.
/dev/da0s1 /flash msdosfs rw,noauto 0 0 /dev/da0 /flash1 msdosfs rw,noauto 0 0
Then as root I simply "mount /flash1" (or /flash depending on what ls -ltr /dev/da0* says), do what I need to, then
I do umount /flash1 to unmount it.
A quick "man umount" n shows that "-t" is for type to unmount, but it looks like your syntax is wrong based on man page.
If it mounts successfully, then try
umount /dev/da0s1
or
umount /media/da0s1
or if it is the only msdosfs mounted try
umount -t msdosfs
root@ozzie:~ # umount /dev/da0s1
umount: /dev/da0s1: unknown file system
root@ozzie:~ # umount /media/da0s1
umount: /media/da0s1: not a file system root directory
root@ozzie:~ # umount -t msdosfs
usage: umount [-fNnv] special ... | node ... | fsid ...
umount -a | -A [-F fstab] [-fnv] [-h host] [-t type]
Ok, so that supports my statement "problem unmounting, not mounting", correct?
When you mount it, can you access the device, list contents, add files, delete files? Note you may need to be root to do so.
After entering the mount command for da0s1, what does the command "mount" without any arguments show? Does it
actually show /dev/da0s1 mounted?
I know you show output of dmesg earlier, but to double check:
after the device is inserted, if you do "ls -ltr /dev/da*" is shows /dev/da0s1, yes?
Also, have you tried physically different devices? If so, none of them work?
root@ozzie:~ # mount -t msdosfs /dev/da0s1 /media/da0s1
root@ozzie:~ # mount
/dev/ada0s1a on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/da0s1 on /media/da0s1 (msdosfs, local)
root@ozzie:~ # ls -ltr /dev/da*
crw-r----- 1 root operator 0x7a Mar 24 14:51 /dev/da0s1
crw-r----- 1 root operator 0x79 Mar 24 14:51 /dev/da0
I'd have about 5 secs of hair pulling....My attitude just now is more that of a curious detective than a desperate/frustrated person pulling their hair out..though that person is in there to.. ..hehe.. ;-)
Problems mounting usb flash-drive
Code:root@ozzie:~ # mount -t msdosfs /dev/da0s1 /media/da0s1 root@ozzie:~ # mount /dev/ada0s1a on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) /dev/da0s1 on /media/da0s1 (msdosfs, local)
… if I remove it without it dismounted properly, they might vanish. …
mount_msdosfs -o sync /dev/da0s1 /media/da0s1
-o sync
is not specified at mount time, then you can sync
at any time.well, tried this. created a new directory for files brought -back- from the usb. it started copying fine, but it said it would take an hour, so I stopped it. I figured it was obvious the files were there, no? well, I went ahead and took out the usb. plug it back in.. files gone. this is checking it with thunar because.. why not? it seems to be the default for freebsd. ..I'm using the xfce desktop, because.. it worked. I can still copy them back over again, but it'll probably take that hour all over again, and the biggest files weren't copied. trying the solutions of others now..I'd have about 5 secs of hair pulling....
As for the files vanishing, etc. If you haven't actually written anything to device in a while (5 minutes would be 100's of years) they shouldn't vanish. Even after you unmount an USB device it may take a few secs (5 or so) to completely flush writes to the device. I typically do the umount command then wait a minute or so after it completes.
If you have enough space on your hard drive, I would create a temp directory and then copy the files from usb to the hard drive. That way you could actually verify the contents.
If the contents check out, then you don't need to worry about corrupting the USB device.
Just another couple questions:
you did a "mkdir /media/da0s1" at some point, yes? I think I saw that on one of the previous pages, just don't want to look.
Are you running a desktop environment of any kind, with maybe a file manager? Reason is sometimes they try to automount devices and
maybe causing issues.
mount: /media/usb: No such file or directory
mount -t msdosfs /dev/da0s1 /mnt
.well, now I know why not to use thunar, or rather, to trust it. I use the mount command suggested by grahamperrin, and lo and behold, the files appear! (both in command line, -and- in thunar!) -ok, will get back to this later..well, tried this. created a new directory for files brought -back- from the usb. it started copying fine, but it said it would take an hour, so I stopped it. I figured it was obvious the files were there, no? well, I went ahead and took out the usb. plug it back in.. files gone. this is checking it with thunar because.. why not? it seems to be the default for freebsd. ..I'm using the xfce desktop, because.. it worked. I can still copy them back over again, but it'll probably take that hour all over again, and the biggest files weren't copied. trying the solutions of others now..
… with thunar because.. why not? it seems to be the default for freebsd. …
BTW, i think that /media directory is something from ports. …
root@ozzie:~ # mount_msdosfs -o sync /dev/da0s1 /media/da0s1
root@ozzie:~ # umount_msdosfs -o sync /dev/da0s1 /media/da0s1
umount_msdosfs: Command not found.
root@ozzie:~ # umount
usage: umount [-fNnv] special ... | node ... | fsid ...
umount -a | -A [-F fstab] [-fnv] [-h host] [-t type]
root@ozzie:~ # umount -o sync /dev/da0s1 /media/da0s1
umount: illegal option -- o
usage: umount [-fNnv] special ... | node ... | fsid ...
umount -a | -A [-F fstab] [-fnv] [-h host] [-t type]
root@ozzie:~ # umount sync /dev/da0s1 /media/da0s1
umount: sync: statfs: No such file or directory
umount: sync: unknown file system
umount: unmount of /media/da0s1 failed: Device busy
umount: unmount of /media/da0s1 failed: Device busy
root@ozzie:~ # umount sync /dev/da0s1 /media/da0s1
umount: sync: statfs: No such file or directory
umount: sync: unknown file system
umount: unmount of /media/da0s1 failed: Device busy
umount: unmount of /media/da0s1 failed: Device busy
root@ozzie:~ # umount /dev/da0s1 /media/da0s1
umount: unmount of /media/da0s1 failed: Device busy
umount: unmount of /media/da0s1 failed: Device busy
root@ozzie:~ # umount /media/da0s1
umount: unmount of /media/da0s1 failed: Device busy
root@ozzie:~ # umount /dev/da0s1
umount: unmount of /media/da0s1 failed: Device busy
well, this is encouraging:BTW, i think that /media directory is something from ports. The typically /mnt directory exists by default.
So it (*can) bemount -t msdosfs /dev/da0s1 /mnt
.
*It doesn't matter in the functionality where you mount it, only the directory have to exist.
root@ozzie:~ # mount -t msdosfs /dev/da0s1 /mnt
root@ozzie:~ # umount -t msdosfs /dev/da0s1
root@ozzie:~ #
… "Device busy" errors occurred after I closed thunar.
The limit of FAT32 (known as msdosfs on FreeBSD) is 4 GB.
To omit that limitation exFAT was created.
Could somebody please confirm that you can't format a usb-key with exFAT using FreeBSD? …
I created anms-basic-data
partition on a hard disk drive, created an exFAT file system in the partition, used mount.exfat-fuse(8) to mount the file system, …
mkexfatfs
.% pkg provides mkexfatfs
Name : exfat-utils-1.3.0
Desc : Utilities to create, check, label and dump exFAT filesystem
Repo : FreeBSD
Filename: usr/local/sbin/mkexfatfs
usr/local/man/man8/mkexfatfs.8.gz
% pkg search -o exfat-utils
sysutils/exfat-utils Utilities to create, check, label and dump exFAT filesystem
%