Problems mounting usb flash-drive

I'm trying to save files to a perfectly ordinary brand-new usb-key. Please consider this documentation of things I've tried. I'm not stymied or pulling my hair out yet. Yet :-) One of my next steps is to consult the handbook. (I always try google first, in the off-chance it'll land me right on it) -the error I get is attached.

Code:
root@ozzie:~ # fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=3773 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=3773 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA))
    start 128, size 60628864 (29603 Meg), flag 0
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 628/ head 64/ sector 1
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Code:
root@ozzie:~ # ls /dev/da*
/dev/da0	/dev/da0s1
Code:
root@ozzie:~ # mount_msdosfs /dev/da0s1 /media/usb
mount_msdosfs: /media/usb: No such file or directory
Code:
root@ozzie:~ # mount /dev/da0s1 /media/usb
mount: /media/usb: No such file or directory
Code:
root@ozzie:~ # mount /dev/da0 /media/usb
mount: /media/usb: No such file or directory
root@ozzie:~ # mount_msdosfs /dev/da0 /media/usb
mount_msdosfs: /media/usb: No such file or directory
Code:
root@ozzie:~ # mount /dev/da0
mount: /dev/da0: unknown special file or file system
Code:
root@ozzie:~ # mount /dev/da0s1
mount: /dev/da0s1: unknown special file or file system
selected output from dmesg:
Code:
ugen0.3: <vendor 0x1a40 USB 2.0 Hub> at usbus0
uhub3 on uhub0
uhub3: <vendor 0x1a40 USB 2.0 Hub, class 9/0, rev 2.00/1.11, addr 19> on usbus0
uhub3: 4 ports with 4 removable, self powered
ugen0.4: <vendor 0x6557 USB DISK 2.0> at usbus0
umass0 on uhub3
umass0: <vendor 0x6557 USB DISK 2.0, class 0/0, rev 2.00/1.00, addr 26> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:2:0: Attached to scbus2
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: < USB DISK 2.0 PMAP> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 90009B838C2AC448
da0: 40.000MB/s transfers
da0: 29604MB (60628992 512 byte sectors)
da0: quirks=0x3<NO_SYNC_CACHE,NO_6_BYTE>
Code:
root@ozzie:~ # usbconfig
...
ugen0.4: <vendor 0x6557 USB DISK 2.0> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (200mA)
...
 

Attachments

  • Screenshot_2022-02-02_11-46-11.png
    Screenshot_2022-02-02_11-46-11.png
    94.7 KB · Views: 441
[ -d /media/usb ] || mkdir -p /media/usb
mount -t msdosfs /dev/da0s1 /media/usb

if it fails
file -s /dev/da0s1

you need bourne (sh shell) for the first line to work
otherwise just verify that /media/usb exists
 
[ -d /media/usb ] || mkdir -p /media/usb
mount -t msdosfs /dev/da0s1 /media/usb

if it fails
file -s /dev/da0s1

you need bourne (sh shell) for the first line to work
otherwise just verify that /media/usb exists

very interesting. before, in thunar, it showed:
Code:
 /media/USB_DISK_2.0_07009AE05ECE6E14_s1/
..I've seen that before, through the command-line, though I don't recall how I got it to show me all that.
now, it -also- displays
Code:
 /media/usb
..trying to move files to it gives the attached error:
..that's probably because, from the desktop, I'm not root. So now all I have to do it figure out file-transfer via the command-line (I've done this before.. way back when..), or how to get my local user the necessary permissions. ..and hope that the resulting files will be readable by other operating systems.

.. looks like this should do the trick: https://befused.com/copy-an-entire-directory-in-freebsd/

thanks!
 

Attachments

  • second_screenshot.png
    second_screenshot.png
    93.3 KB · Views: 240
I'm trying to save files to a perfectly ordinary brand-new usb-key. Please consider this documentation of things I've tried. I'm not stymied or pulling my hair out yet. Yet :-) One of my next steps is to consult the handbook. (I always try google first, in the off-chance it'll land me right on it) -the error I get is attached.

Code:
root@ozzie:~ # fdisk /dev/da0
******* Working on device /dev/da0 *******
parameters extracted from in-core disklabel are:
cylinders=3773 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=3773 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA))
    start 128, size 60628864 (29603 Meg), flag 0
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 628/ head 64/ sector 1
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Code:
root@ozzie:~ # ls /dev/da*
/dev/da0	/dev/da0s1
Code:
root@ozzie:~ # mount_msdosfs /dev/da0s1 /media/usb
mount_msdosfs: /media/usb: No such file or directory
Code:
root@ozzie:~ # mount /dev/da0s1 /media/usb
mount: /media/usb: No such file or directory
Code:
root@ozzie:~ # mount /dev/da0 /media/usb
mount: /media/usb: No such file or directory
root@ozzie:~ # mount_msdosfs /dev/da0 /media/usb
mount_msdosfs: /media/usb: No such file or directory
Code:
root@ozzie:~ # mount /dev/da0
mount: /dev/da0: unknown special file or file system
Code:
root@ozzie:~ # mount /dev/da0s1
mount: /dev/da0s1: unknown special file or file system
selected output from dmesg:
Code:
ugen0.3: <vendor 0x1a40 USB 2.0 Hub> at usbus0
uhub3 on uhub0
uhub3: <vendor 0x1a40 USB 2.0 Hub, class 9/0, rev 2.00/1.11, addr 19> on usbus0
uhub3: 4 ports with 4 removable, self powered
ugen0.4: <vendor 0x6557 USB DISK 2.0> at usbus0
umass0 on uhub3
umass0: <vendor 0x6557 USB DISK 2.0, class 0/0, rev 2.00/1.00, addr 26> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:2:0: Attached to scbus2
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: < USB DISK 2.0 PMAP> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 90009B838C2AC448
da0: 40.000MB/s transfers
da0: 29604MB (60628992 512 byte sectors)
da0: quirks=0x3<NO_SYNC_CACHE,NO_6_BYTE>
Code:
root@ozzie:~ # usbconfig
...
ugen0.4: <vendor 0x6557 USB DISK 2.0> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (200mA)
...

reminder of how to navigate to folders on the usb:
Code:
root@ozzie:~ # ls
.cshrc		.history	.k5login	.login		.profile	xorg.conf.new
root@ozzie:~ # cd /media
root@ozzie:/media # ls
Seagate_Expansion_NAATTNKZ_s1		USB_DISK_2.0_07009AE05ECE6E14_s1	USB_DISK_2.0_07009B2D992ADF02_s2
Seagate_Expansion_NAATTNKZ_s11		USB_DISK_2.0_07009AE05ECE6E14_s11	usb
-note the addition of "usb" to the list.. ..and the presence of seagate expansion.. that's an external hard-drive (I think) that isn't currently connected to the computer, so it's listing in media seems a mystery..
 
reminder of how to navigate to folders on the usb:
Code:
root@ozzie:~ # ls
.cshrc		.history	.k5login	.login		.profile	xorg.conf.new
root@ozzie:~ # cd /media
root@ozzie:/media # ls
Seagate_Expansion_NAATTNKZ_s1		USB_DISK_2.0_07009AE05ECE6E14_s1	USB_DISK_2.0_07009B2D992ADF02_s2
Seagate_Expansion_NAATTNKZ_s11		USB_DISK_2.0_07009AE05ECE6E14_s11	usb
-note the addition of "usb" to the list.. ..and the presence of seagate expansion.. that's an external hard-drive (I think) that isn't currently connected to the computer, so it's listing in media seems a mystery..

hmm..
Code:
root@ozzie:/media/usb # mkdir files_from_freebsd
mkdir: files_from_freebsd: Device not configured
root@ozzie:/media/usb # cd ../USB_DISK_2.0_07009AE05ECE6E14_s1
root@ozzie:/media/USB_DISK_2.0_07009AE05ECE6E14_s1 # mkdir files_from_freebsd
mkdir: files_from_freebsd: Device not configured
still following instructions/suggestions in the handbook:
Code:
root@ozzie:~ # mount /dev/da0 /media/usb
mount: /dev/da0: No such file or directory
root@ozzie:~ # mount /media/usb
mount: /media/usb: unknown special file or file system
root@ozzie:~ # mount /media/USB_DISK_2.0_07009AE05ECE6E14_s1
mount: /media/USB_DISK_2.0_07009AE05ECE6E14_s1: unknown special file or file system
ah?
Code:
root@ozzie:~ # mount_msdosfs /dev/da0s1 /media/usb
root@ozzie:~ # ls
.cshrc		.history	.k5login	.login		.profile	xorg.conf.new
root@ozzie:~ # cd /media
root@ozzie:/media # ls
Seagate_Expansion_NAATTNKZ_s1		USB_DISK_2.0_07009AE05ECE6E14_s1	USB_DISK_2.0_07009B2D992ADF02_s2
Seagate_Expansion_NAATTNKZ_s11		USB_DISK_2.0_07009AE05ECE6E14_s11	usb
root@ozzie:/media # cd usb
root@ozzie:/media/usb # mkdir files_from_freebsd
root@ozzie:/media/usb # ls
files_from_freebsd
fascinating.. if I didn't know better (..I don't..), I'd say there are multiple mount points for the same file system..
Code:
root@ozzie:/media/usb # cd
root@ozzie:~ # mount_msdosfs /dev/da0s1 /media/USB_DISK_2.0_07009AE05ECE6E14_s1
mount_msdosfs: /dev/da0s1: Device busy
root@ozzie:~ # umount /dev/da0s1
root@ozzie:~ # mount_msdosfs /dev/da0s1 /media/USB_DISK_2.0_07009AE05ECE6E14_s1
root@ozzie:~ # umount /dev/da0s1
root@ozzie:~ # mount /dev/da0s1 /media/USB_DISK_2.0_07009AE05ECE6E14_s1
mount: /dev/da0s1: No such file or directory
root@ozzie:~ # mount_msdosfs /dev/da0s1 /media/USB_DISK_2.0_07009AE05ECE6E14_s1
root@ozzie:~ # cd /media/usb
root@ozzie:/media/usb # ls
root@ozzie:/media/usb # cd ../USB_DISK_2.0_07009AE05ECE6E14_s1
root@ozzie:/media/USB_DISK_2.0_07009AE05ECE6E14_s1 # ls
files_from_freebsd
 
Code:
# mkdir -p /media/da0s1
# mount -v -t msdosfs /dev/da0s1 /media/da0s1
# umount -v -t msdosfs /dev/da0s1 /media/da0s1

This is how I've been doing it the past 12 years or so.

 
  • Thanks
Reactions: a6h
Code:
# mkdir -p /media/da0s1
# mount -v -t msdosfs /dev/da0s1 /media/da0s1
# umount -v -t msdosfs /dev/da0s1 /media/da0s1

This is how I've been doing it the past 12 years or so.

thanks!

..may I humbly suggest you communicate with the people in charge of the handbook so that this beginners guide features more prominently? I don't think it popped up when I dove in the first time. The ride could definitely have been smoother, and I make no claim I did it all properly, quite the converse..
 
Please stop using fdisk(8), use gpart(8) instead. And show us the output of gpart show da0.
as commanded! :-)
Code:
root@ozzie:~ # gpart show da0
=>       63  121110465  da0  MBR  (58G)
         63      60609       - free -  (30M)
      60672  121049856    1  fat32lba  (58G)
(..this is a fresh usb.. -same type if being larger capacity and usb 3.0 instead of 2.0 qualifies as the "same type"..)
..btw, I ended up getting the files successfully copied over, even though I didn't realize it. I tried to un-mount the drive, it gave errors, and I gave up. I then later stuck the usb into my other laptop just to check what was there (I was labeling usb's to keep track of things) and to my surprise, all the files I had been trying to copy were there! So now I'm back here in part to document how I finally did that..
 
as commanded! :-)
Code:
root@ozzie:~ # gpart show da0
=>       63  121110465  da0  MBR  (58G)
         63      60609       - free -  (30M)
      60672  121049856    1  fat32lba  (58G)
(..this is a fresh usb.. -same type if being larger capacity and usb 3.0 instead of 2.0 qualifies as the "same type"..)
..btw, I ended up getting the files successfully copied over, even though I didn't realize it. I tried to un-mount the drive, it gave errors, and I gave up. I then later stuck the usb into my other laptop just to check what was there (I was labeling usb's to keep track of things) and to my surprise, all the files I had been trying to copy were there! So now I'm back here in part to document how I finally did that..
..woops.. I copied over a 1.1GB file just fine.. then when I went to copy over an 11GB file, it tells me the file is too large. ? gpart show da0 shows right there that I have 58G.. and the 1.1 GB file wouldn't fit in 30M, so something funky is going on.. the 1.1 GB file is a zip archive.. could that be part of the problem?
 
From the book of frequently asked questions:

8. Disks, File Systems, and Boot Loaders

Would you find it useful to have an answer there?

Side note

FreeBSD bug 261706 – FAT32 (LBA) misrepresented as a link in the manual page for gpart(8)
ok, I finally understood what you're actually asking. yes! (as long as google searches for "how to use usb with freebsd" or something equivalent, end up pointing to it..) Close to: "How do I use a new removable drive?" would seem appropriate :-) ..perhaps below it as a special case? :-)
 
thanks!

..may I humbly suggest you communicate with the people in charge of the handbook so that this beginners guide features more prominently? I don't think it popped up when I dove in the first time.
They are well aware of me and my work already. I'm a potential Pandporas Box they monitor closely..

It's been featured in freebsdnews.com twice. Their spider got my post on another forum, bsdmag.org picked up their article and promoted it on their English and Arabic Facebook pages:


Siseneg is the name of my other bot. I have my own Facebook Education website ranked pages now, one for me and one for my domain where it's posted. They're listed in the About section of my Profile.


The second time it was featured in freebsdnews.com was the post I made here, featuring ILUXA's desktop: with the article.


Who left for good after being sanctioned when the community adopted their new paradigm of what is and is not acceptable behaviors ito meet Cable TV News broadcast guidelines regarding lies and personal attacks.

The ride could definitely have been smoother, and I make no claim I did it all properly, quite the converse..

I'm sorry about that. All my posts are Moderated and take some time to appear. You struggled on after I posted till a Mod had time to approve it as being acceptable for the Public to view.

I've been sanctioned and remain under threat of further sanctions if I don't adopt a submissive affect and honor those who lack it through silence.

The rewrite of it to use pkg instead of ports will appear on my site and should be done Monday. Check my Facebook pages.

This message is awaiting moderator approval, and is invisible to normal visitors.
 
They are well aware of me and my work already. I'm a potential Pandporas Box they monitor closely..

It's been featured in freebsdnews.com twice. Their spider got my post on another forum, bsdmag.org picked up their article and promoted it on their English and Arabic Facebook pages:


Siseneg is the name of my other bot. I have my own Facebook Education website ranked pages now, one for me and one for my domain where it's posted. They're listed in the About section of my Profile.


The second time it was featured in freebsdnews.com was the post I made here, featuring ILUXA's desktop: with the article.


Who left for good after being sanctioned when the community adopted their new paradigm of what is and is not acceptable behaviors ito meet Cable TV News broadcast guidelines regarding lies and personal attacks.



I'm sorry about that. All my posts are Moderated and take some time to appear. You struggled on after I posted till a Mod had time to approve it as being acceptable for the Public to view.

I've been sanctioned and remain under threat of further sanctions if I don't adopt a submissive affect and honor those who lack it through silence.

The rewrite of it to use pkg instead of ports will appear on my site and should be done Monday. Check my Facebook pages.

This message is awaiting moderator approval, and is invisible to normal visitors.
I commend you for your continued efforts! Somebody will benefit from them, I'm sure!
 
I commend you for your continued efforts! Somebody will benefit from them, I'm sure!
..I decided to post this weeks (months?) back but have been otherwise occupied -> I just wanted to emphasize how much I commiserate with your frustration and discouragement. I'm very familiar with the general feeling. I encourage you all I can to maintain your efforts and keep up your good cheer! Sounds like the world is, and will continue to become, a better place with you in it!
 
The limit of FAT32 (known as msdosfs on FreeBSD) is 4 GB.

To omit that limitation exFAT was created.

This sounds like it should be very helpful. For further clarity, you could identify the command to be used on bsd (seeing as you've said that FAT32 isn't called fat32 on bsd..). I'm researching now how to do this..
 
Code:
# mkdir -p /media/da0s1
# mount -v -t msdosfs /dev/da0s1 /media/da0s1
# umount -v -t msdosfs /dev/da0s1 /media/da0s1

This is how I've been doing it the past 12 years or so.


..and the trek continues -> putting this here because it seems most appropriate. I considered creating a new thread. Trying, again, to unmount a usb-key. Using the above method.

Code:
root@ozzie:~ # mount -v -t msdosfs /dev/da0s1 /media/da0s1
/dev/da0s1 on /media/da0s1 (msdosfs, local, writes: sync 1 async 0, reads: sync 1848 async 0, fsid 7a00000032000000)
root@ozzie:~ # umount -v -t msdosfs /dev/da0s1 /media/da0s1
/dev/da0s1: unmount from /media/da0s1
umount: /media/da0s1: not a file system root directory
root@ozzie:~ #

Anticipating being asked for it:
Code:
root@ozzie:~ # gpart show da0
=>       63  121110465  da0  MBR  (58G)
         63      60609       - free -  (30M)
      60672  121049856    1  fat32lba  (58G)
 
Code:
gpart show -p
mount -t msdosfs try parameters -s and/or -o large.

for "-o" see what grahamperrin wrote above. for gpart show -p :

Code:
root@ozzie:~ # gpart show -p
=>       63  250069617    ada0  MBR  (119G)
         63          1          - free -  (512B)
         64  249561088  ada0s1  freebsd  [active]  (119G)
  249561152     508528          - free -  (248M)

=>        0  249561088   ada0s1  BSD  (119G)
          0  241172480  ada0s1a  freebsd-ufs  (115G)
  241172480    8388608  ada0s1b  freebsd-swap  (4.0G)

=>       63  121110465    da0  MBR  (58G)
         63      60609         - free -  (30M)
      60672  121049856  da0s1  fat32lba  (58G)

=>       63  121110465    diskid/DISK-07009BCF0BB09B63  MBR  (58G)
         63      60609                                  - free -  (30M)
      60672  121049856  diskid/DISK-07009BCF0BB09B63s1  fat32lba  (58G)
Code:
root@ozzie:~ # mount -v -t -o msdosfs /dev/da0s1 /media/da0s1
usage: mount [-adflpruvw] [-F fstab] [-o options] [-t ufs | external_type]
       mount [-dfpruvw] special | node
       mount [-dfpruvw] [-o options] [-t ufs | external_type] special node
root@ozzie:~ # mount -v -t -s msdosfs /dev/da0s1 /media/da0s1
usage: mount [-adflpruvw] [-F fstab] [-o options] [-t ufs | external_type]
       mount [-dfpruvw] special | node
       mount [-dfpruvw] [-o options] [-t ufs | external_type] special node
root@ozzie:~ # mount -v -t -s -o msdosfs /dev/da0s1 /media/da0s1
mount: /dev/da0s1: Operation not supported by device
/dev/ada0s1a on / (ufs, local, journaled soft-updates, writes: sync 1569 async 18648, reads: sync 17188 async 688, fsid 59c85f6081eb028b)
 
Back
Top