Manual mount
There's LOADS of documentation available on the usage of that command. I will try to give you ONLY what's required.
Open a shell (applications->GNOME terminal) or if you want to show your friend that you are geeky, press Ctrl+Alt+F1. You can press Ctrl+Alt+F7 to come back to GUI mode.
Type
sudo fdisk -l and press ENTER
See the output. It will be something like this
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 1913 19457 140930212+ f W95 Ext'd (LBA)
/dev/sda5 1913 4462 20482843+ 7 HPFS/NTFS
/dev/sda6 6708 11171 35857048+ 83 Linux
/dev/sda7 11172 19457 66557263+ 7 HPFS/NTFS
/dev/sda8 4463 4717 2048256 82 Linux swap / Solaris
/dev/sda9 4718 6707 15984643+ 83 Linux
As you can see, my first partition /dev/sda1 is an ntfs partition, and I have two other ntfs partitions /dev/sda5 and /dev/sda7
So if I want to mount these, I would first have to create a mount point - one mount point if I want to access them one at a time, or multiple mount points if I want to access them all together.
When you are recovering data I recommend that you access one partition at a time.
Creating a mount point:
Let us create a new mount point
share in
/mnt
Type
sudo mkdir /mnt/share and press ENTER
Type
ls /mnt to see your newly created mount point
Mounting:
When you mount using the
mount command, you have to specify the filesystem type, the device you want to mount, and the mount point. Let us mount the first partition. In my case, my first partition has a filesystem type ntfs, device name is /dev/sda1 and I want to mount it to /mnt/share. So the command will be
sudo mount -t ntfs /dev/sda1 /mnt/share and press ENTER
Note that unlike what is suggested in the post above, I did not ask you to use the ntfs-3g filesystem type. This is because in data recovery we are happy with read only access, we do not really want to write to the partition. If you want to write to the partition, use
ntfs-3g in the above command instead of ntfs. If your filesystem is FAT32 it will show up in the fdisk -l output as vfat. In that case use the parameter
vfat instead of
ntfs in the above command.
Recover data:
In the GUI mode, simply browse to /mnt/share and copy paste to wherever you want.
In text mode (geeky), first decide where you want to copy the data to. See the output of fdisk -l
Any pendrive usbdrive will show up as /dev/sdb
x or /dev/sdc
x where
x is a number from 1 onwards.
Create a new mount point
Type
sudo mkdir /mnt/usbshare and press ENTER
Type
ls /mnt to see your newly created mount point
Mount the pendrive
sudo mount -t vfat /dev/sdb1 /mnt/usbshare and press ENTER
If you get an error message saying that the drive is already mounted then check for the same. Just type the command mount and press ENTER. Most likely the pendrive would have been automatically mounted to /media/disk
Also note that if you have a hard disk or pendrive with multiple partitions, then they will be automatically mounted as /media/disk /media/disk-1 /media/disk-2 etc.
Let us say I want to copy the data from /dev/sda1 which I have mounted on /mnt/share to my pendrive on /dev/sdb1 mounted on /mnt/usbshare
The command will be
sudo cp -rv /mnt/share/ /mnt/usbshare/
or
sudo cp -rv /mnt/share/ /media/disk/
After the files have been copied, type
sudo ls /mnt/usbshare
or
sudo ls /media/disk
to check the destination folder/drive.
Unmount your hard disk partition:
sudo umount /mnt/share