67

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 4

89

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
  • 4
    More detailed please i am an absolute beginner on this OS.But i will try these instructions
    – Slash
    Aug 19, 2012 at 18:33
  • 1
    I tried and i get the same error
    – Slash
    Aug 19, 2012 at 18:38
  • 5
    for partitioned drives, use sudo parted -l instead of sudo fdisk -l
    – user35581
    May 7, 2016 at 16:08
  • I have a GNU/Linux (ext4) partition, this command worked for me: sudo mount /dev/sda1 /media/ -t ext4 Nov 12, 2020 at 10:41
  • I have tried the two commands provided in this answer. Here is the result that I obtain, "NTFS signature is missing. Failed to mount '/dev/sda': Invalid argument The device '/dev/sda' 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? " Any thoughts on how to proceed? Jun 15, 2022 at 13:20
30

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 used the command of step 2 and i get the same error.I copy/pasted it to be sure.I didn't made it on mounting it so i can't follow the next steps
    – Slash
    Aug 20, 2012 at 7:05
  • 1
    @Slash Are you sure your NTFS volume isn't corrupted? sudo ntfsck /dev/sdb1, this command will scan an NTFS volume for errors, are there any?
    – Dan
    Aug 20, 2012 at 7:29
  • i get the the same error with before
    – Slash
    Aug 20, 2012 at 7:59
  • When i use this command "sudo ntfsck /dev/sdb1 " I get the same error with this command "sudo mount -t ntfs-3g /dev/sdb1 /media/Skliros_Diskos"
    – Slash
    Aug 20, 2012 at 8:02
  • I tried to mount the volume of skliros_diskos from disk utility i get another error which is this:Error mounting: mount exited with exit code 1: helper failed with: Unprivileged user can not mount NTFS block devices using the external FUSE library. Either mount the volume as root, or rebuild NTFS-3G with integrated FUSE support and make it setuid root. Please see more information at tuxera.com/community/ntfs-3g-faq/#unprivileged
    – Slash
    Aug 20, 2012 at 8:05
21

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
2

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 must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .