USB flash drive: no media found

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
crahan
Posts: 11
Joined: 15. Apr 2016, 14:21

USB flash drive: no media found

Post by crahan »

I recently bought a Sandisk Extreme 64GB flash drive (model number SDCZ80-064G-FFP) and while it works perfectly fine in dedicated Linux, Windows and Mac OS X hosts, it keeps failing when used in VirtualBox. I've tested with the flash drive partitioned as FAT32, exFAT. In all cases the drive works fine on dedicated hardware. Files can be read and copied over to the drive without issues. To me this appears to indicate the drive itself is working as expected.

When I connect the drive to VirtualBox (either to a Xubuntu or a Windows 7 VM), VirtualBox correctly makes the drive accessible to the guest OS. But in both cases (Linux and Windows) it ends up being recognised as a drive with no media inserted. In Windows, the drive appears but clicking on it pops up a request to insert media. In Linux dmesg shows /dev/sdb being detected, but no partitions are found. Trying to partition the drive using cfdisk shows the "No medium found" error message. Gparted doesn't even list /dev/sdb as an option for partitioning.

dmesg output:

Code: Select all

[   28.654211] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[   28.680737] usb 2-1: New USB device found, idVendor=0781, idProduct=5580
[   28.680741] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   28.680743] usb 2-1: Product: Extreme
[   28.680745] usb 2-1: Manufacturer: SanDisk
[   28.680746] usb 2-1: SerialNumber: AA010118161550470319
[   28.708104] usb-storage 2-1:1.0: USB Mass Storage device detected
[   28.708196] scsi host3: usb-storage 2-1:1.0
[   28.711502] usbcore: registered new interface driver usb-storage
[   28.717525] usbcore: registered new interface driver uas
[   29.708039] scsi 3:0:0:0: Direct-Access     SanDisk  Extreme          0001 PQ: 0 ANSI: 6
[   29.712811] sd 3:0:0:0: Attached scsi generic sg2 type 0
[   29.718321] sd 3:0:0:0: [sdb] Attached SCSI removable disk
lsusb output

Code: Select all

vm@xubuntu:~$ lsusb
Bus 002 Device 002: ID 0781:5580 SanDisk Corp. SDCZ80 Flash Drive
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Output when trying to access the drive using cfdisk:

Code: Select all

vm@xubuntu:~$ sudo cfdisk /dev/sdb
[sudo] password for vm: 
cfdisk: cannot open /dev/sdb: No medium found
I've tried connecting the drive directly so USB3 is used and I've also tried with a USB2 extension cable to force USB2. The same issue in both cases: drive is recognized by the Linux and Windows guest OS, but both operating systems state that no medium was found. None of my other USB2 or USB3 flash drives exhibit the same behaviour.

Thanks in advance for any advise anyone might be able to give me.
Attachments
Xubuntu-2016-04-15-14-06-57.log.gz
VirtualBox log file
(17.77 KiB) Downloaded 9 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: USB flash drive: no media found

Post by mpack »

Access it as a shared folder.
crahan
Posts: 11
Joined: 15. Apr 2016, 14:21

Re: USB flash drive: no media found

Post by crahan »

Thanks for the reply!

The thing is I'm trying to use YUMI to create a multiboot USB drive. It needs to install a bootloader which isn't an option if the flash drive is accessed as a shared folder unfortunately. YUMI works on Windows and I only have that OS available as a VM (Windows 7). Which is why I'm stuck in this situation :)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: USB flash drive: no media found

Post by mpack »

Then make sure you install USB3 drivers in the guest. Win7 for example has no support for USB3 out of the box.

I should also mention: I don't know what YUMI is, but the VirtualBox VM BIOS doesn't support booting from USB (not be confused with locating a normal VM on a host USB drive).
crahan
Posts: 11
Joined: 15. Apr 2016, 14:21

Re: USB flash drive: no media found

Post by crahan »

The USB3 drivers are indeed installed correctly. Other USB3 flash drives work without issue in VirtualBox. But as they're all a little slower than the Sandisk 64GB I would like to get the Sandisk working.

There's no need to boot from USB inside VirtualBox though. YUMI just installs a range of ISO's to the flash drive and makes it bootable (with a nice menu to select the right ISO to use). I just use VirtualBox to prepare and install ISO images to the flash drives. The flash drive is then used to boot on actual dedicated hardware. It basically runs things like DBAN, Kali, Tails, CloneZilla, memtest8, etc.

So what I know so far is:
1. my other (somewhat slower) USB3 flash drives work fine in VirtualBox VM's (they all mount and can be read without issue on both a Linux and Windows 7 VM)
2. The Sandisk Extreme 64GB works fine on dedicated hardware and can be mounted and read by different operating systems (Windows 7, OS X, Linux)

My VirtualBox install can definitely handle USB3 flash drives (as indicated by point 1) and the Sandisk Extreme 64GB seems to be working fine (as indicated by item 2). So I'm left wondering if this might be a bug? I guess submitting a bug report might be a good option to try next?

Thanks again for your help and insight mpack! I really appreciate it.
Post Reply