15

I have to copy my SD card to my hard-drive. I know that I have to mount and unmount it, but the following line doesn't work:

dd if=/media/oneiric of=~/sd-card-copy.img

That was my first try, but then I found out that I have to unmount my card and select /dev/sdX. The problem is that the command fdisk -l isn't showing anything. Nothing happens and therefore I can't copy my files.

How can I fix this?

Fern Moss
  • 8,925
Adi
  • 153

2 Answers2

23

Run mount | grep "/media/oneiric". This will show the sdcard device (/dev/sdXX). Then run:

sudo umount /media/oneiric
sudo dd if=/dev/sdXX of=~/sd-card-copy.img
Eric Carvalho
  • 55,453
6

If you prefer a GUI approach you can use the Disks application that comes installed on Ubuntu by default.

The following steps work to create an image of most types of drives, SD cards and USBs included.

Steps:

  1. Insert the SD card/USB/hard drive.
  2. Open the Disks application.
  3. Locate, then select, the drive you want to image in the left column.
  4. Click on the "Drive Options" button at the top right of the app. On newer versions the button's icon is three vertical dots, on older versions it's a gear.
  5. Select "Create Disk Image..." from the menu.
  6. Specify a name and location to save the image.
  7. Click "Start Creating..."

It can take a while depending on the size of the drive but after some amount of time you should have you disk image.

DaveLak
  • 165