Ubuntu – Auto mount a disk drive in ubuntu 14.04 LTS (Bookmark directory not found)

14.04automountdirectoryfilemanagermount

I'm using ubuntu 14.04 LTS. When I start my pc and click on any bookmark from the file manager it shows this error:

Unable to find the requested file. Please check the spelling and try again.
Unhandled error message: Error when getting information for file '/media/angel/DOC/edu': No such file or directory

But when I open DOC drive and again clink on the same bookmark it works properly. Can anybody tell me why is this happening and how to solve this issue?

Edit: Output of lsblk is following: (ubuntu is installed in sda5)

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 119.2G  0 disk 
├─sda1   8:1    0  91.3G  0 part 
├─sda2   8:2    0     1K  0 part 
├─sda5   8:5    0  24.1G  0 part /
└─sda6   8:6    0   3.8G  0 part [SWAP]
sdb      8:16   0 465.8G  0 disk 
├─sdb1   8:17   0  93.2G  0 part 
├─sdb2   8:18   0     1K  0 part 
├─sdb5   8:21   0  93.2G  0 part 
├─sdb6   8:22   0  89.3G  0 part 
├─sdb7   8:23   0  93.2G  0 part 
├─sdb8   8:24   0  93.2G  0 part 
└─sdb9   8:25   0   3.8G  0 part 
sr0     11:0    1  1024M  0 rom  

After opening the disk drive the output of lsblk is bellow:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 119.2G  0 disk 
├─sda1   8:1    0  91.3G  0 part 
├─sda2   8:2    0     1K  0 part 
├─sda5   8:5    0  24.1G  0 part /
└─sda6   8:6    0   3.8G  0 part [SWAP]
sdb      8:16   0 465.8G  0 disk 
├─sdb1   8:17   0  93.2G  0 part 
├─sdb2   8:18   0     1K  0 part 
├─sdb5   8:21   0  93.2G  0 part 
├─sdb6   8:22   0  89.3G  0 part /media/angel/DOC
├─sdb7   8:23   0  93.2G  0 part 
├─sdb8   8:24   0  93.2G  0 part 
└─sdb9   8:25   0   3.8G  0 part 
sr0     11:0    1  1024M  0 rom

The output of sudo blkid gives the following information about sdb6:

/dev/sdb6: LABEL="DOC" UUID="04280A22280A12FA" TYPE="ntfs"

Best Answer

From the output of lsblk, before and after the link starts working, it appears that your partition is not mounted automatically.

Since it is an NTFS partition (looking at the output of sudo blkid), you can make your partition automount by adding the following line to your fstab file:

/dev/sdb6 /media/angel/DOC ntfs auto
  • If it does not exist already, create the directory to mount into:

    sudo mkdir /media/angel/DOC
    
  • Open the fstab file:

    gksu gedit /etc/fstab
    

    (you might have to install gksu first)

    and add the line:

    /dev/sdb6 /media/angel/DOC ntfs auto
    

    at the end of the file, save the changes.

  • Test your new entry by the command:

    sudo mount -a
    
Related Question