Mounting an USB flash drive that has Ventoy in it

I have a pen drive with Ventoy installed to where I want to move a Fedora ISO to. In /dev there are da0, da0s1, da0s2. I tried to mount da0, which is the right partition to move ISOs to, but it says invalid argument. The commands I used were: mount_msdosfs /dev/da0 /media/pendrive and mount -v -t msdosfs /dev/da0 /media/pendrive both exhibiting invalid argument. Please help.
 
So many things could be wrong. To begin with, Ventoy does something funny: while it is not an OS, in some fashion (which a 1-minute scan of the web doesn't explain) it takes over managing the file systems on the memory stick. But it doesn't seem to work under FreeBSD, at least not according to its documentation.

Next question: "Invalid argument" can have many causes. Most likely, /dev/da0 is the wrong thing, that would be the whole pen drive, but it is partitioned. If da0s1 and da0s2 exist, then da0 does not contain a file system you can mount. Try the above commands again with da0s1/da0s2 instead as the first argument. And before you do that, you should find out which of the two actually is the file system you want to write to, and what the file system type is. You can use for example the "file" utility to determine that.

Another possible failure: /pendrive or /media/pendrive may be missing, or may have the wrong permissions (if you are not root).
 
So many things could be wrong. To begin with, Ventoy does something funny: while it is not an OS, in some fashion (which a 1-minute scan of the web doesn't explain) it takes over managing the file systems on the memory stick. But it doesn't seem to work under FreeBSD, at least not according to its documentation.

Next question: "Invalid argument" can have many causes. Most likely, /dev/da0 is the wrong thing, that would be the whole pen drive, but it is partitioned. If da0s1 and da0s2 exist, then da0 does not contain a file system you can mount. Try the above commands again with da0s1/da0s2 instead as the first argument. And before you do that, you should find out which of the two actually is the file system you want to write to, and what the file system type is. You can use for example the "file" utility to determine that.

Another possible failure: /pendrive or /media/pendrive may be missing, or may have the wrong permissions (if you are not root).
Sorry, I meant /media/pendrive for the two commands. I've created this directory and mounted on it as root. When I do
mount -v -t msdosfs /dev/da0s1 /media/pendrive, the output is:
Code:
mount_msdosfs: /dev/da0s1: Invalid argument
zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls, fsid b54b080cde7b036e)
Btw, the system is able to successfully mount /dev/da0s2 on /media/pendrive but it's not the right partition to put the ISO in. Because I already have two ISOs (FreeBSD and ArchLinux) in this Ventoy setup and they don't show up in the /dev/da0s2 partition.
 
Sorry, I meant /media/pendrive for the two commands. I've created this directory and mounted on it as root. When I do
mount -v -t msdosfs /dev/da0s1 /media/pendrive, the output is:

mount_msdosfs: /dev/da0s1: Invalid argument
zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls, fsid b54b080cde7b036e)

That partition is usually an EXFAT filesystem. You'll need to install sysutils/fusefs-exfat
from packages or ports and mount it with mount.exfat /dev/da0s1 /media/pendrive
 
That partition is usually an EXFAT filesystem. You'll need to install sysutils/fusefs-exfat
from packages or ports and mount it with mount.exfat /dev/da0s1 /media/pendrive
The result for that is:

Code:
root@bluray:/media # mount.exfat /dev/da0s1 /media/pendrive
FUSE exfat 1.3.0
WARN: volume was not unmounted cleanly.
fuse: failed to open fuse device: No such file or directory

I've given up and plugged my flash drive on a macbook to save the ISO.
 
May I join with my output of gpart list da0, please?
My output looks like this
Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 976773167
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: da0s1
Mediasize: 500080574464 (466G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1048576
Mode: r0w0e0
efimedia: HD(1,MBR,0x7ad965e6,0x800,0x3a379000)
rawtype: 7
length: 500080574464
offset: 1048576
type: ntfs
index: 1
end: 976721919
start: 2048
Consumers:
1. Name: da0
Mediasize: 500107862016 (466G)
Sectorsize: 512
Mode: r0w0e0

I also have installt sysutils/fusefs-exfat an still I don|t get it right, is the Mode r0w0r0 part of the problem?
 
That partition is usually an EXFAT filesystem. You'll need to install sysutils/fusefs-exfat
from packages or ports and mount it with mount.exfat /dev/da0s1 /media/pendrive
Beside that, if you put vfs.usermount=1 in /etc/sysctl.conf and

Code:
root@FreeBaSeD-T430:~ # cat /etc/devfs.rules
[system=10]
add path 'ad[0-9]\*'        mode 666 group operator
add path 'ada[0-9]\*'        mode 666 group operator
add path 'da[0-9]\*'        mode 666 group operator
add path 'acd[0-9]\*'        mode 666 group operator
add path 'cd[0-9]\*'        mode 666 group operator
add path 'mmcsd[0-9]\*'        mode 666 group operator
add path 'pass[0-9]\*'        mode 666 group operator
add path 'xpt[0-9]\*'        mode 666 group operator
add path 'ugen[0-9]\*'        mode 666 group operator
add path 'usbctl[0-9]\*'    mode 666 group operator
add path 'usb/\*'            mode 666 group operator
add path 'fd[0-9]\*'        mode 666 group operator
add path 'uscan[0-9]\*'        mode 666 group operator
add path 'video[0-9]\*'        mode 666 group operator
add path 'lpt[0-9]\*'        mode 666 group cups
add path 'ulpt[0-9]\*'        mode 666 group cups
add path 'unlpt[0-9]\*'        mode 666 group cups

And

Code:
root@FreeBaSeD-T430:~ # tail -20 /etc/devfs.conf
perm    vboxnetctl 0660

# Permit users to acess various devices
perm    /dev/acd0    0666
perm    /dev/acd1    0666
perm    /dev/cd0    0666
perm    /dev/da0    0666
perm    /dev/da1    0666
perm    /dev/da2    0666
perm    /dev/da3    0666
perm    /dev/da4    0666
perm    /dev/da5    0666
perm    /dev/pass0    0666
perm    /dev/uscanner0    0666
perm    /dev/video0    0666

# In order for wireshark be able to capture packets when used by unprivileged
# user, /dev/bpf should be in network group and have read-write permissions.
own  bpf* root:network
perm bpf* 0660

You can mount using graphical file manger with a mouse click.
 
wow, you guys pr0duced a whole lot of advices, thank you!
so far I managed with ntfs-3g, that did it. That last entry I did not swallow yet, but it looks interessting too :9
 
Y:
ou can mount using graphical file manger with a mouse click.
:: this is an idea I rilly like a lot...

still... ok, so <root> is doing well, however <user> is not allowed to do mount_fusefs, hm. <vfs.usermount=1 in /etc/sysctl.conf> yes, I did...
 
still... ok, so <root> is doing well, however <user> is not allowed to do mount_fusefs, hm. <vfs.usermount=1 in /etc/sysctl.conf> yes, I did...

Did you edit /etc/devfs.conf and add the following lines?
Code:
own     da*     root:operator
perm    da*     0660
I think you need to reboot, or service devfs restart for it to take effect
 
Y:
ou can mount using graphical file manger with a mouse click.
:: this is an idea I rilly like a lot...

If there are any users apart from yourself using this system, you need to be very careful about granting user access - especially read/write access - to a wide range of devices. Some of those listed above horrify me, e.g. /dev/ada* ...

still... ok, so <root> is doing well, however <user> is not allowed to do mount_fusefs, hm. <vfs.usermount=1 in /etc/sysctl.conf> yes, I did...

Please read chapter (now) 19 of the Handbook, particularly 19.4 on USB devices. Some advice given in this thread contradicts that; I'd bet on the Handbook.

Did you edit /etc/devfs.conf and add the following lines?
Code:
own     da*     root:operator
perm    da*     0660

Section 19.4 rather recommends adding to /etc/devfs.rules:
Code:
[localrules=5]
add path 'da*' mode 660 group operator
and to /etc/rc.conf:
Code:
devfs_system_ruleset="localrules"

I think you need to reboot, or service devfs restart for it to take effect

The latter should be sufficient.

However you also need the user concerned to own the directory being mounted upon. Either use a local directory e.g. ~/mymnt (easiest) or have root add user's subdirectories to system mountpoints e.g. /media

Code:
# mkdir -p /media/siguri
# chown siguri /media/siguri
 
Hello Smithi, thank You for your reply. The recommendation reflect my path of doing, so I get the feeling I am on the right track...
 
Now, that I tried this and that with the stuff you guys put here I still find <user> to be not permitted to do <code: ntfs-3g /dev/da0s1 /mnt/user>. And yes, /mnt/user is chown and yes, <user> is in group operator...?hm What do say to that, if I may ask.
 
Y:
ou can mount using graphical file manger with a mouse click.
:: this is an idea I rilly like a lot...

still... ok, so <root> is doing well, however <user> is not allowed to do mount_fusefs, hm. <vfs.usermount=1 in /etc/sysctl.conf> yes, I did...

Sorry, I forgot about the groups.
Here are the ones I'm in:
1671089534860.png
 
By the way... instead of opening another thread. May I ask here how-to mount an .iso file. I used to this in linux with <mount -o loop Freud.iso /media>. How are you doing this in freebsd, please?
 
By the way... instead of opening another thread. May I ask here how-to mount an .iso file. I used to this in linux with <mount -o loop Freud.iso /media>. How are you doing this in freebsd, please?
Sorry, fatfingered 'post' ... back soon

Study mdconfig(8)

Code:
 # mdconfig Freud.iso
md0      # result, or md1 etc
 # mount_cd9660 /dev/md0 /media
 % mount -p       # to check ...

or as a one-liner:

Code:
 # mount_cd9660 /dev/$(mdconfig Freud.iso) /media
 
Now, that I tried this and that with the stuff you guys put here I still find <user> to be not permitted to do <code: ntfs-3g /dev/da0s1 /mnt/user>. And yes, /mnt/user is chown and yes, <user> is in group operator...?hm What do say to that, if I may ask.

You need to show, not tell. I can't tell what you mean by "with the stuff" or "is chown" or what commands you are issuing or what responses the OS gives.

Try cut n paste from real sessions, posted in \[code\] blocks, for practice; it will make it easier for others to help you. Cheers
 
I have a pen drive with Ventoy installed to where I want to move a Fedora ISO to. In /dev there are da0, da0s1, da0s2. I tried to mount da0, which is the right partition to move ISOs to, but it says invalid argument. The commands I used were: mount_msdosfs /dev/da0 /media/pendrive and mount -v -t msdosfs /dev/da0 /media/pendrive both exhibiting invalid argument. Please help.
Personally, I would always use the GPT option when installing Ventoy, and also leave plenty of reserve space.

With GPT you know that da0p1 is the partition wth your ISOs, and da0p2 has all the Ventoy magic. Something else I always do after installing Ventoy is to reformat da0p1 as ext4 as I find it easier to handle than exFAT. In fact I only recently discovered that mfsBSD includes support for ext4, so would definitely copy the mfsBSD iso to da0p1, which would even allow you to create another partition on the drive and install FreeBSD on it.
 
Back
Top