0

While trying to mount a Windows partition named work documents I used the following command:

[root@Feddy /]# mount /mnt/'work documents'
mount: can't find /mnt/work documents in /etc/fstab or /etc/mtab

I also checked the /etc/fstab file which had the following text:

#
# /etc/fstab
# Created by anaconda on Wed Jan 25 02:55:31 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=7e62aa40-0b33-472b-8a90-4e2cfa1078e3 /                       ext4    defaults        1 1
UUID=df07538e-e5c8-46cf-ad14-efb2db70839b swap                    swap    defaults        0 0

The partition name is work documents as shown in this snapshot:

enter image description here

Now how do I mount this partition from the terminal?

Suhail Gupta
  • 2,273
  • 10
  • 30
  • 38

1 Answers1

1

Ref: Fedora NTFS-3G


fstab

Your method works if the device is listed in /etc/fstab something like following

# <file system> <dir>           <type>  <options>   <dump>  <pass>
/dev/<NTFS-part>    /mnt/work\ documents    ntfs-3g defaults    0   0

Check Partition

Since that is not the case, you need to know the device name of the NTFS partition. Check the out put with fdisk -l like following

# fdisk -l

Disk /dev/sda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders, total 167772160 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: 0x0003f6b3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   160851967    80424960   83  Linux
/dev/sda2       160854014   167770111     3458049    5  Extended
/dev/sda5       160854016   167770111     3458048   82  Linux swap / Solaris

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 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: 0xbc491472

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     4192964     2096451    7  HPFS/NTFS/exFAT
/dev/sdb2         4192965    16450559     6128797+   5  Extended
/dev/sdb5         4193028    16450559     6128766    7  HPFS/NTFS/exFAT

In the above case, /dev/sdb1 and /dev/sdb5 are both NTFS patitions.

To mount /dev/sdb1, do the following

mount -t ntfs-3g /dev/sdb1 /mnt/work\ documents

Trail and Error

If there are multiple NTFS partitions and you don't know which one to use, just try them one by one like below

  1. Try sdb1

    mount -t ntfs-3g /dev/sdb1 /mnt/work\ documents
    
  2. Check content

    ls /mnt/work\ documents
    
  3. Not what I want, un-mount it

    umount /mnt/work\ documents
    
  4. Try next one, sdb5

    mount -t ntfs-3g /dev/sdb5 /mnt/work\ documents
    
  5. Check content again

    ls /mnt/work\ documents
    
  6. If there are more to check, just repeat the mount and umount process.

John Siu
  • 5,405