Other Handbook, at Chapter: 18.5 USB Storage Devices

Hello guys !

In the Handbook, at Chapter: 18.5 USB Storage Devices you can read:

"Suppose a USB thumbdrive is plugged in, a device /dev/da0s1 appears."

Please, can you tell me if, plugging a USB thumbdrive, the /dev/da0s1 can be disabled, so that I can only have /dev/da0 in /dev ?

Is there a configuration file to instruct to do this ?

Thanks.
 
No, you can't change this. FreeBSD detects a usb device when it is inserted. If this is a usb mass storage device, FreeBSD looks for any known partition scheme (for example MBR, GPT) on it. If a known partition scheme is found, FreeBSD shows the partitions as well.
So for a MBR partitioned device
da0 - the device itself
da0s1 - first partition
da0s2 - second partition
and so on.
 
Ok !!! very good.

It's not possible ....

Thanks a lot tingo for your reply.
So does for Linux, too. When you insert a usb disk with mbr, it should be /dev/sdb is the usb itself, /dev/sdb1 for the first partition and so on. You can't change that :D
 
No, you can't change this. FreeBSD detects a usb device when it is inserted. If this is a usb mass storage device, FreeBSD looks for any known partition scheme (for example MBR, GPT) on it. If a known partition scheme is found, FreeBSD shows the partitions as well.
So for a MBR partitioned device
da0 - the device itself
da0s1 - first partition
da0s2 - second partition
and so on.

What I find difficult is that using FreeBSD you are unable to access files on a USB stick which is formatted but not partitioned, whereas Windows can.
 
balanga said:
What I find difficult is that using FreeBSD you are unable to access files on a USB stick which is formatted but not partitioned, whereas Windows can.
Are you sure about this? I remember I had this disk which was, as you say, formatted but not partitioned, and Windows only offered me to format the disk.

But to stay on topic:
vince66 said:
Please, can you tell me if, plugging a USB thumbdrive, the /dev/da0s1 can be disabled, so that I can only have /dev/da0 in /dev ?
I honestly don't know any operating system that could be forced to ignore partitions.
 
If there is no partition on a disk then it's simply impossible for an OS to make heads or tails from it. I could see how you might be able to access it as some kind of "blob" * or by merely assuming certain aspects (like cluster size) but even if that would somewhat work then I really wouldn't put too much trust in that.

* (edit): So roughly comparable to placing a file somewhere, applying a filesystem on it and then using that as extra storage.
 
Back
Top