I'm running CentOS 6.3 inside of VirtualBox and am having trouble seeing my USB 2.0 thumb drive. In VirtualBox I go to Devices, USB drives and can capture my connected thumb drive. I've created a mount point in CentOS but fdisk doesn't show the drive (I'm expecting to see SDC) there. What am I missing?

  • What is your host OS? Can you see an event pertaining to the device in Centos' dmesg output (open a shell, plug the device in, then type dmesg followed by enter)? – tink Mar 19 '13 at 19:40
  • What is the filesystem on your thumb drive? If it is NTFS, for instance, CentOS as shipped won't read it (needs ntfs-3g from EPEL). – Deer Hunter Mar 19 '13 at 21:39
  • Oh, and what do you see in /media/ after capturing? – Deer Hunter Mar 19 '13 at 21:40

An USB thumb drive should show up in sysfs under /sys/block/ and should be named sd*. Here is a short script which checks every device under /sys/block if it is an USB drive:


function is_usb_disk()
        is_usb_attached=$(udevadm info --query=property --path="/sys/block/$device" | grep -i "^ID_BUS=usb$")
        is_disk=$(udevadm info --query=property --path="/sys/block/$device" | grep -i "^ID_TYPE=disk$")
        if [[ -n $is_usb_attached && -n $is_disk ]]; then
                return 0
                return 1

for block_device in $(ls /sys/block); do
        is_usb_disk $block_device
        if [[ $? -eq 0 ]]; then
                serial=$(udevadm info --query=property --path="/sys/block/$block_device" | grep "^ID_SERIAL=" | cut -d "=" -f 2)
                echo "/dev/$block_device ($serial) is an USB disk."

This script checks for every block device if it is attached to the USB bus (via property ID_BUS) and if it is a disk (via property ID_TYPE). If it finds a device there both is true it prints the device node with the corresponding device serial.

You can just copy that to a file e.g. find_usb_disks.sh. Give it execute permission via chmod u+x find_usb_disks.sh and run it. The output will look like that:

/dev/sdb (0204_Flash_Disk_19250701EF6B1E05-0:0) is an USB disk.

If it doesn't return anything, it is likely that your thumb drive isn't "inserted" properly. Check via lsmod if modules like usb_storage are loaded. If usb_storage is not loaded, unplug your device, run

modprobe usb_storage

plug it in again and see if your thumb drive appears. A good way to monitor if your device is recognized by the kernel is

udevadm monitor

Unplug your USB device, run that command, plug your device in again. As soon as you plug your usb device in, you should see kernel (and udev) "add" actions.

Remember that if the disk has partitions a partition number will be attached to the device node name (e.g. /dev/sdb1). My script wouldn't find the partition, it just checks if a devices was added properly.


you have to install Extension pack for this . read this https://www.virtualbox.org/manual/ch01.html#intro-installing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.