How to mount an external HDD?

I have Ubuntu Linux 12.04 version the latest right now.I want to mount an external HDD NTFS 1TB.I have followed many guides but still no success.The error I'm getting is this:

Failed to read last sector (1953523119): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or it was not setup correctly (e.g. by not using mdadm --build ...), or a wrong device is tried to be mounted, or the partition table is corrupt (partition is smaller than NTFS), or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
Using Storage Device MAnager i get this error:Error mounting: mount exited with exit code 1: helper failed with:
mount: only root can mount /dev/sdb1 on /media/Skliros_Diskos {external disk name} 

When I use sudo fdisk -l, this is the output:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e0bc6 Device Boot Start End Blocks Id System
/dev/sda1 * 2048 618854399 309426176 83 Linux
/dev/sda2 618856446 625141759 3142657 5 Extended
/dev/sda5 618856448 625141759 3142656 82 Linux swap / Solaris
Disk /dev/sdb: 1000.2 GB, 1000202043392 bytes
255 heads, 63 sectors/track, 121600 cylinders, total 1953519616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002093a Device Boot Start End Blocks Id System
/dev/sdb1 2048 1953525167 976761560 7 HPFS/NTFS/exFAT
2

4 Answers

Try to see if there is an entry in the disk list with

sudo fdisk -l 

Then try mounting it with

sudo mount -t ntfs /dev/sdb1 /media

To find the correct /dev/sdb location for your external drive look at the result of sudo fdisk -l.

5

Step 1: Create a folder

sudo mkdir /media/Skliros_Diskos

Step 2: Mount NTFS filesystem

sudo mount -t ntfs-3g /dev/sdb1 /media/Skliros_Diskos

Please note the spaces. As per your comment on the question, you did not add spaces in the command.

You should not mount it on the /media directory, since the system might use it thus might not allow you to umount the disk easily. Another reason is, when you plug-in another external drive, Ubuntu will automatically create a directory in the /media and mount the system on that directory, which could probably have some side effects, as the /media directory would be your external drive.

Once mounted, you can access it normally through Nautilus (The default Ubuntu GUI file browser). It should be listed in the list on the left side, if it isn't, press Ctrl+L and type /media/Skliros_Diskos.

Or you access it in the terminal with cd /media/Skliros_Diskos.

20

I find more cosy the use of lsblk instead of fdisk -l even because recently it is not always needed to specify the file system type a priory. Moreover I want to mimic the behaviour of the mounting through Device Notifier with the command line. Tested on Kubuntu 14.04 LTS.

Step 1: Individuate from where

To individuate where is I prefer to use lsblk (from util-linux package)

lsblk 

That gives something like

 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 925.5G 0 part /
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 6G 0 part [SWAP]
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 1.8T 0 part 

In this case, the external hard drive that I am attempting to mount is referred to as sdb1. Note that the external drive is not mounted (because the MOUNTPOINT entry is blank), and, importantly, if I unplug the external hard drive, then I will not see the entry sdb1 anymore.

Step 2: mount

If I want to mount it in an existing directory /Full/path/ and my user id uid =1000 and my group id is gid=1000 I can use directly

sudo mount /dev/sdb1 /Full/path/ -o uid=1000,gid=1000,utf8,dmask=027,fmask=137

That gives me the same mounting option that I have when I mount it graphically through the Device Notifier

Notes:

  • You can see your uid:gid with grep $USER /etc/passwd : are respectively the 3rd and the 4th field separated by :
  • man mount for all the mount options

Ubuntu 18.04.5,
To mount and/or unmount a disk from the shell prompt (Terminal)
in the same fashion as an external disk gets mounted "automagically".
(e.g. /media/$USER/Disk-Label/ )

Prerequisite: the disk is visible as "disk" and possibly also as "part" in the output of;
$ lsblk
e.g.

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
...
sdb 8:16 0 2,7T 0 disk
└─sdb1 8:17 0 2T 0 part
...

Then it will look like this:

$ udisksctl mount --block-device /dev/sdb1
==== AUTHENTICATING FOR org.freedesktop.udisks2.filesystem-mount-other-seat ===
Authentication is required to mount WDC WD30EZRX-00DC0B0 (/dev/sdb1)
Authenticating as: $USER,,, ($USER)
Password: **********
==== AUTHENTICATION COMPLETE ===
Mounted /dev/sdb1 at /media/$USER/USB-exfat.
$ ls -l /media/$USER
total nnn
drwxrwxrwx 1 $USER $USER 131072 jan 1 1970 USB-exfat
$ ls -lA /media/$USER/USB-exfat
total 0
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
...
sdb 8:16 0 2,7T 0 disk
└─sdb1 8:17 0 2T 0 part /media/$USER/USB-exfat
$ udisksctl unmount --block-device /dev/sdb1
...
Unmounted /dev/sdb1.
$

Where $USER will be the login name of the current user, assuming that user is present is among those specified by sudoers (e.g. admin[?] and sudo group members).


exfat partitions:
sudo apt install exfat-fuse exfat-utils

You Might Also Like