Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running a Ubuntu 11 guest on a Windows XP host with VMware. I want to format an SD card in Ubuntu, but I can't figure out which /dev/xxx device the SD card is.

I plug the card into the built-in socket of my laptop. I "safely remove" the device in Windows. Then, I "connect" the PCMCIA reader in VMware. Now, I was supposed to see a new device like /dev/sdx, but it doesn't appear.

How can I find what the name of my USB device's name and mount it?

/var/log/message is empty.

Here is the output of dmesg:

[ 5268.927308] usb 2-1: new full speed USB device number 12 using uhci_hcd

And, here are the last lines of /var/log/syslog:

Oct 31 18:51:21 ubuntu kernel: [ 5268.927308] usb 2-1: new full speed USB device number 12 using uhci_hcd

Oct 31 18:51:21 ubuntu mtp-probe: checking bus 2, device 12: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-1"

Oct 31 18:51:21 ubuntu mtp-probe: bus: 2, device: 12 was not an MTP device

share|improve this question

migrated from stackoverflow.com Nov 1 '11 at 1:12

This question came from our site for professional and enthusiast programmers.

    
Ubuntu 11 does not have /var/log/messages... –  hovanessyan Oct 31 '11 at 17:12

8 Answers 8

If it has a label use /dev/disk/by-label/[USB label] to format the disk

EDIT: Try /dev/disk/by-id/usb*

share|improve this answer
    
no, it doesn't have :( –  mustafa Oct 31 '11 at 17:30
    
aren't there any other methods? –  mustafa Oct 31 '11 at 20:35
    
USBs are usually /dev/sb followed by a number, or something along thoses lines if I'm not completely correct, it might be /dev/sdb followed by a number but not normally /dev/sda, so if there's only one plugged in that should do it –  Will03uk Oct 31 '11 at 23:32

sudo fdisk -l will list the partition table on all available hard disks; it uses the Linux naming scheme for disks, handy for troubleshooting and remembering which partition is where.

Use man fdisk for more information on the parameters of fdisk.

share|improve this answer

Try using lsusb to see if the sd card reader is picked up in virtualbox. Another option would be to use palimpsest (also known by its menu entry, Disk Utility.)

Don't be afraid to use the GUI programs - they do work! If palimpsest sees your device, it will tell you the device node, so you can use the CLI utilities.

share|improve this answer

Try lsblk. This is the output from my current setup:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0 195.3G  0 part 
├─sda2   8:2    0     4G  0 part [SWAP]
└─sda3   8:3    0 266.5G  0 part /
sdb      8:16   0 465.8G  0 disk 
└─sdb1   8:17   0 460.8G  0 part /home
sr0     11:0    1  1024M  0 rom  

I'm using Ubuntu 12.10.

share|improve this answer

Open a terminal and run ls /dev before you enable that USB device in vmware. Run ls /dev/ again after you enabled it and look for what pops up

share|improve this answer
ls -1 /dev > ~/before.txt

plug it in, then

ls -1 /dev > ~/after.txt

diff ~/before.txt ~/after.txt
share|improve this answer

lsblk seems to work:

rishi@rishi-Inspiron-1018:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0 230.9G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0     2G  0 part [SWAP]
sdb      8:16   1   7.4G  0 disk 
└─sdb1   8:17   1   7.4G  0 part /media/3765-3233

So now I know my SD card is in /dev/sdb1.

share|improve this answer
    
Suspect. When using Debian live, I saw sdc (my usb device) listed in lsblk output but not in /dev. –  user982671 Oct 28 at 18:47
# dir /dev/disk/by-path/
total 0
drwxr-xr-x. 2 root root 180 Aug 26 15:51 .
drwxr-xr-x. 6 root root 120 Aug 25 17:20 ..
lrwxrwxrwx. 1 root root   9 Aug 25 17:12 pci-0000:00:03.2-usb-0:3:1.0-scsi-0:0:0:0 -> ../../sr0
lrwxrwxrwx. 1 root root   9 Aug 26 15:51 pci-0000:00:03.2-usb-0:4.1.1:1.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx. 1 root root  10 Aug 26 15:51 pci-0000:00:03.2-usb-0:4.1.1:1.0-scsi-0:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx. 1 root root  10 Aug 26 15:51 pci-0000:00:03.2-usb-0:4.1.1:1.0-scsi-0:0:0:0-part2 -> ../../sdb2
lrwxrwxrwx. 1 root root  10 Aug 26 15:51 pci-0000:00:03.2-usb-0:4.1.1:1.0-scsi-0:0:0:0-part3 -> ../../sdb3
lrwxrwxrwx. 1 root root   9 Aug 25 17:12 pci-0000:07:00.0-scsi-0:2:0:0 -> ../../sda
lrwxrwxrwx. 1 root root  10 Aug 25 17:12 pci-0000:07:00.0-scsi-0:2:0:0-part1 -> ../../sda1

and

# dir /dev/disk/by-id/
total 0
drwxr-xr-x. 2 root root 280 Aug 27 01:20 .
drwxr-xr-x. 6 root root 120 Aug 25 17:20 ..
lrwxrwxrwx. 1 root root  10 Aug 25 17:20 dm-name-VG_RAID_201010081812-LV_RAID_201010081617 -> ../../dm-0
lrwxrwxrwx. 1 root root  10 Aug 27 01:20 dm-name-top4 -> ../../dm-2
lrwxrwxrwx. 1 root root  10 Aug 25 17:20 dm-uuid-LVM-XCQXKaPB3snmEgx9ZNGRssIxGmJPje6TXKMLyop5meKH3x3KiJ1H1q3aoqgXpci1 -> ../../dm-0
lrwxrwxrwx. 1 root root   9 Aug 25 17:12 scsi-36842b2b04963f900144207e1091bf90c -> ../../sda
lrwxrwxrwx. 1 root root  10 Aug 25 17:12 scsi-36842b2b04963f900144207e1091bf90c-part1 -> ../../sda1
lrwxrwxrwx. 1 root root   9 Aug 25 17:12 usb-ASUS_SBW-06D2X-U_3248433031354B4A30303030-0:0 -> ../../sr0
lrwxrwxrwx. 1 root root   9 Aug 26 15:51 usb-ST916041_2AS_579FFFFFFFFF-0:0 -> ../../sdb
lrwxrwxrwx. 1 root root  10 Aug 26 15:51 usb-ST916041_2AS_579FFFFFFFFF-0:0-part1 -> ../../sdb1
lrwxrwxrwx. 1 root root  10 Aug 26 15:51 usb-ST916041_2AS_579FFFFFFFFF-0:0-part2 -> ../../sdb2
lrwxrwxrwx. 1 root root  10 Aug 26 15:51 usb-ST916041_2AS_579FFFFFFFFF-0:0-part3 -> ../../sdb3
lrwxrwxrwx. 1 root root   9 Aug 25 17:12 wwn-0x6842b2b04963f900144207e1091bf90c -> ../../sda
lrwxrwxrwx. 1 root root  10 Aug 25 17:12 wwn-0x6842b2b04963f900144207e1091bf90c-part1 -> ../../sda1
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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