Other USB 3 and Virtual Box are not compatible with FreeBSD 11.2

jphartmann

Member

Reaction score: 2
Messages: 25

I "installed" the VirtualBox image of FreeBSD 11.2 (thought it was 12, but uname says differently).

Setup is 3.5" disk with ext2 file system in USB 2 caddy -> USB 3 hub -> USB 3 port.

The hub is then brought into the virtual machine using the device menu item.

When the virtual machine is configured for USB 3, the following happens:

On the base system (no patches), FreeBSD reboots without a crash dump when one accesses the drive after mounting it.

Having applied the four patches, the directory structure is readable, but no files can be accessed. Obscure message about device not something. (Sorry, unable to cut'n'paste.)

Dropping the virtual machine down to a USB 2 controller fixes the problem.
 

aragats

Daemon

Reaction score: 701
Messages: 1,618

First of all, VirtualBox supports USB 3 only with extension packs, which are not supported on FreeBSD.
Secondly, the most of actual USB 3 hardware implementations are buggy: they are not fully compatible with USB 2 although they have to by the specs.
 
OP
J

jphartmann

Member

Reaction score: 2
Messages: 25

Clearly, the extension pack was installed; however I take your point that USB 3 is unsupported by BSD in a virtual machine. What follows relates to a virtual machine that is configured with a USB 2 hub.

I can see that FreeBSD might be confused, since gparted on Ubuntu is confused too: The entire drive (/dev/sde in Linux parlance) is marked as zfs (which it once was). There is now also a /dev/sde1 partition that Ubuntu can see, but I do have to tell Ubuntu what it is, which is unusual:

root@asus:~# mount /dev/sde1 /mnt
mount: /mnt: more filesystems detected on /dev/sde1; use -t <type> or wipefs(8).
root@asus:~# mount -t ext4 /dev/sde1 /mnt
root@asus:~#


I'll put the stuff on a properly formatted drive and report back.
 
OP
J

jphartmann

Member

Reaction score: 2
Messages: 25

This is in the context of Virtual Box; hence the lack of FreeBSD support for USB 3 stands.

However, I do take the point of one of the guidelines that one should not assume that the casual reader knows the title of the thread; I have edited accordingly.
 

aragats

Daemon

Reaction score: 701
Messages: 1,618

Clearly, the extension pack was installed
Well, you never mentioned that your host system is Linux (I figured it out from your other post) (-:

I guess, the issue is not related to FreeBSD. I've seen such things with Windows guests a lot. The best results I got by using USB 2 ports of the host computer (my laptop has 2 USB 3 and 2 USB 2 ports).
I don't think it's possible to fix such issues since it's a combination of VB's USB bridge and buggy USB 3 ports. In general USB is very sensitive to timing, and VB's USB bridge introduces extra delays.
[OFFTOPIC] Five years ago that extra lag helped me a lot finding a bug in a USB device I was developing, and customers reported intermittent failures I could not reproduce with real hardware.
 
OP
J

jphartmann

Member

Reaction score: 2
Messages: 25

Trying to attach a USB 3 drive to BSD via USB 3 hub and port fails with a Virtual Box error, as the VM's controller is USB 2. I get a similar failure with a USB 3 caddy, hub, and port.

Putting the data on a freshly formatted EXT4 drive allowed me to attach and import them OK from a USB 2 caddy.

In conclusion,

1. To read USB disks in a FreeBSD/VirtualBox environment, you need a USB 2 component in the chain from the disk to the processor. Perhaps this information could go in the handbook.

2. I would like to see USB 3 supported by FreeBSD in a VirtualBox virtual machine. (Then the handbook would not need updating.)

3. FreeBSD has a few niggles when you subject it to some "interesting" corner cases of disk formatting, but nothing that I should say requires fixing.
 
Top