How do I mount an SD card?

I have the same laptop, the slot does work on Ubuntu 12.04, but the OS doesn't seem to find the card when it is inserted. It appears you have 2 options in the short term:

  1. Reboot with the SDcard in the slot.

  2. Do a PCI re-scan

    echo 1 | sudo tee /sys/bus/pci/rescan
    

The bug with the workaround is listed here.


There are a few things you can do to make sure everything is working as expected.

1) Verify that Ubuntu knows about your SD card slot and what to do with it
2) Verify that Ubuntu knows you inserted something
3) Verify that Ubuntu understands the filesystem on the thing you inserted.

1) Check the outputs of the commands sudo lspci -v -nn, sudo lsusb, and sudo lshw on the command line. Here is a good guide for understanding lshw which lists an example SD Card reader.

2) Then run the following command before inserting the SD card and a few seconds after inserting it: ls -la /dev/sd*. This command lists all of the hard drives, CDs, DVDs, floppies, SD cards, etc that Ubuntu knows about. (These are called Block Devices).

Ideally you will see a few entries on the second run that you don't see on the first. For example:

$ls -la /dev/sd*
brw-rw---- 1 root disk 8,  0 2012-01-14 11:27 /dev/sda
brw-rw---- 1 root disk 8, 16 2012-01-14 11:27 /dev/sdb
brw-rw---- 1 root disk 8, 32 2012-01-14 11:27 /dev/sdc
brw-rw---- 1 root disk 8, 33 2012-01-14 11:27 /dev/sdc1
brw-rw---- 1 root disk 8, 34 2012-01-14 11:27 /dev/sdc2
brw-rw---- 1 root disk 8, 35 2012-01-14 11:27 /dev/sdc3
brw-rw---- 1 root disk 8, 36 2012-01-14 11:27 /dev/sdc4
brw-rw---- 1 root disk 8, 37 2012-01-14 11:27 /dev/sdc5

(Now insert the SD card)

$ls -la /dev/sd*
brw-rw---- 1 root disk 8,  0 2012-01-14 11:27 /dev/sda
brw-rw---- 1 root disk 8, 16 2012-01-14 11:27 /dev/sdb
brw-rw---- 1 root disk 8, 32 2012-01-14 11:27 /dev/sdc
brw-rw---- 1 root disk 8, 33 2012-01-14 11:27 /dev/sdc1
brw-rw---- 1 root disk 8, 34 2012-01-14 11:27 /dev/sdc2
brw-rw---- 1 root disk 8, 35 2012-01-14 11:27 /dev/sdc3
brw-rw---- 1 root disk 8, 36 2012-01-14 11:27 /dev/sdc4
brw-rw---- 1 root disk 8, 37 2012-01-14 11:27 /dev/sdc5
brw-rw---- 1 root disk 8, 64 2012-01-14 11:28 /dev/sdd

See that extra one at the end /dev/sdd that is the SD card.

3) Check that Ubuntu understands the filesystem on the drive. I would bet it is either Fat32 or NTFS. You can check if your copy of Ubuntu understands those filesystems (it should) by running this command: cat /proc/filesystems. In this list vfat is Fat32 and (for all intents and purposes) fuse is NTFS. **Note: this list is not extensive.

A better way is to simply try to mount the SD card manually. Run the following commands in order until one works (replace the X in /dev/sdX1 with the letter from step 2):

sudo mount /dev/sdX1 /mnt
sudo mount -t vfat /dev/sdX1 /mnt
sudo mount -t ntfs /dev/sdX1 /mnt
sudo mount -t msdos /dev/sdX1 /mnt

No output means it worked, and you should be able to navigate to your SD card with nautilus at /mnt. If none of them worked, try plugging your SD card into a windows machine and running chkdsk on it, or verify the filesystem type.


This seems to work better for me:

sudo fdisk -l (it's a lower case L)

This shows all the /dev/sdX names and blocks and more information about the capacity/space of the "disks".

Then, I just use the command:

sudo mkdir /media/sdcard/ (create a directory for the SD card to be mounted to)

(command mount) (location name /dev/sdd1/) (mounted to created folder) sudo mount /dev/sdd1/ /media/sdcard/

You can mount it to just media if you want, and then here is the umount command for unmounting:

sudo umount /dev/sdd1/

Then, you can remove the directory with sudo rmdir /sdcard.