Page 1 of 2

How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 12:54 pm
by Linil
I've two HDD and one has NTFS partition is there any way in Linux Mint 17 KDE to automount these drives at startup.

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 12:59 pm
by ninomrki

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 1:32 pm
by Linil
Read the last line:

Code: Select all

linil@linil-PC:~ > sudo fdisk -l
[sudo] password for linil: 

Disk /dev/sda: 64.0 GB, 64023257088 bytes
255 heads, 63 sectors/track, 7783 cylinders, total 125045424 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: 0x94581f86

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      718847      358400    7  HPFS/NTFS/exFAT
/dev/sda2          718848    62982143    31131648    7  HPFS/NTFS/exFAT
/dev/sda3        62984190   125042687    31029249    5  Extended
/dev/sda5        62984192    70887423     3951616   82  Linux swap / Solaris
/dev/sda6        70889472   125042687    27076608   83  Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x9f95e7f6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sdb2          206848   204799999   102296576    7  HPFS/NTFS/exFAT
/dev/sdb3       204800000   409599999   102400000    7  HPFS/NTFS/exFAT
/dev/sdb4       409600000  1953521663   771960832    f  W95 Ext'd (LBA)
/dev/sdb5       409602048   614402047   102400000    7  HPFS/NTFS/exFAT
/dev/sdb6       614404096  1953521663   669558784    7  HPFS/NTFS/exFAT
linil@linil-PC:~ > sudo mkdir /media/sdb2
linil@linil-PC:~ > sudo gedit /etc/fstab
sudo: gedit: command not found
linil@linil-PC:~ > sudo pluma /etc/fstab
sudo: pluma: command not found
linil@linil-PC:~ > 
gedit and pluma both not working... :(

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 1:53 pm
by altair4
gedit and pluma both not working... :(
Becasue you are using KDE.

Try:

Code: Select all

kdesudo kate /etc/fstab
And since you have two hard drives I would recommend using UUID's instead of something like /dev/sdb2. You can get the UUID for your partitions with this command:

Code: Select all

sudo blkid -c /dev/null

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 2:12 pm
by Linil
Thank you... It worked.. :)
But during boot up it shows :
Error while mounting /etc/fstab
press s to skip or m for manual recovery

I skipped using s key and everything works as expected. All the drives mounted as required.
Is there any way to remove this error

I'm using UUID code but the other method also gives same error.
Here's my edited fstab file:

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=0ebb028a-a3d3-4a5a-a9f3-1ead823ee57b /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=a0a3186b-54f0-4bbc-acba-e575fe6cea66 none            swap    sw              0       0
UUID=B2A83EE9A83EAC2B /media/sdb2 ntfs defaults 0 0
UUID=CAF62273F6225FC5 /media/sdb3 ntfs defaults 0 0
UUID=B0D23D62D23D2E4A /media/sdb6 ntfs defaults 0 0

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 2:17 pm
by altair4
please post the output of the command:

Code: Select all

sudo blkid -c /dev/null
And this one:

Code: Select all

sudo mount -a
EDIT: And this one:

Code: Select all

mount

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 2:29 pm
by Linil
sudo blkid -c /dev/null

Code: Select all

/dev/sda1: LABEL="System Reserved" UUID="04DAA854DAA843B0" TYPE="ntfs" 
/dev/sda2: LABEL="Win8" UUID="9E68B14668B11E49" TYPE="ntfs" 
/dev/sda5: UUID="a0a3186b-54f0-4bbc-acba-e575fe6cea66" TYPE="swap" 
/dev/sda6: UUID="0ebb028a-a3d3-4a5a-a9f3-1ead823ee57b" TYPE="ext4" 
/dev/sdb1: LABEL="System Reserved" UUID="860CB2F60CB2DFFB" TYPE="ntfs" 
/dev/sdb2: LABEL="Work" UUID="B2A83EE9A83EAC2B" TYPE="ntfs" 
/dev/sdb3: LABEL="Personal" UUID="CAF62273F6225FC5" TYPE="ntfs" 
/dev/sdb5: LABEL="Softwares" UUID="DA822FC7822FA6CB" TYPE="ntfs" 
/dev/sdb6: LABEL="Entertainment" UUID="B0D23D62D23D2E4A" TYPE="ntfs" 
sudo mount -a

Code: Select all

[mntent]: line 1 in /etc/fstab is bad
[mntent]: warning: no final newline at the end of /etc/fstab
mount

Code: Select all

/dev/sda6 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sdb2 on /media/sdb2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb3 on /media/sdb3 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb6 on /media/sdb6 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 2:51 pm
by altair4
Edit /etc/fstab again:

Code: Select all

kdesudo kate /etc/fstab
Put the mouse cursor at the end of the last line:
UUID=B0D23D62D23D2E4A /media/sdb6 ntfs defaults 0 0
Then press the enter key

Save the file and run this again:

Code: Select all

sudo mount -a

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 2:54 pm
by Linil
mount

Code: Select all

sudo mount -a

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 2:58 pm
by altair4
Does that mean it produced no error messages?

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 2:59 pm
by Linil
Sorry

Code: Select all

[mntent]: line 1 in /etc/fstab is bad

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 3:08 pm
by altair4
Well, one error down one to go :wink:

I'm trying to figure out what's the problem with line 1.

If taken literally it's a comment so I don't know why it's upset with that. The real first line is the one that mounts your system partition and I don't see anything wrong with that either.

Um..... give me a minute or two maybe I'm just missing something..............

If you do a:

Code: Select all

cat /etc/fstab
Does it still look like this:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda6 during installation
UUID=0ebb028a-a3d3-4a5a-a9f3-1ead823ee57b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=a0a3186b-54f0-4bbc-acba-e575fe6cea66 none swap sw 0 0
UUID=B2A83EE9A83EAC2B /media/sdb2 ntfs defaults 0 0
UUID=CAF62273F6225FC5 /media/sdb3 ntfs defaults 0 0
UUID=B0D23D62D23D2E4A /media/sdb6 ntfs defaults 0 0

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 3:11 pm
by Linil
Yes same output.

cat /etc/fstab

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=0ebb028a-a3d3-4a5a-a9f3-1ead823ee57b /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=a0a3186b-54f0-4bbc-acba-e575fe6cea66 none            swap    sw              0       0
UUID=B2A83EE9A83EAC2B /media/sdb2 ntfs defaults 0 0
UUID=CAF62273F6225FC5 /media/sdb3 ntfs defaults 0 0
UUID=B0D23D62D23D2E4A /media/sdb6 ntfs defaults 0 0

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 3:43 pm
by Spearmint2
Linil wrote:Sorry

Code: Select all

[mntent]: line 1 in /etc/fstab is bad
wouldn't that be a fat32 format, to be labeled vfat? I'm surprised blkid would read it as ntfs. Notice, it's NOT mounting.

Code: Select all

    /dev/sda1: LABEL="System Reserved" UUID="04DAA854DAA843B0" TYPE="ntfs" 

Code: Select all


check it again

blkid /dev/sda1

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 3:48 pm
by WharfRat
This is also strange [mntent]: warning: no final newline at the end of /etc/fstab

Open the file, move to the end of the last line and press enter then save the file and try the mount command.

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 3:57 pm
by Spearmint2
WharfRat wrote:This is also strange [mntent]: warning: no final newline at the end of /etc/fstab

Open the file, move to the end of the last line and press enter then save the file and try the mount command.
Maybe he saved the file after adjusting as a windows type file which would have added different line endings to it.

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 4:15 pm
by altair4
WharfRat wrote:This is also strange [mntent]: warning: no final newline at the end of /etc/fstab

Open the file, move to the end of the last line and press enter then save the file and try the mount command.
We took care of that one earlier - that error message is gone:
altair4 wrote:Edit /etc/fstab again:

Code: Select all

kdesudo kate /etc/fstab
Put the mouse cursor at the end of the last line:
UUID=B0D23D62D23D2E4A /media/sdb6 ntfs defaults 0 0
Then press the enter key

Save the file and run this again:

Code: Select all

sudo mount -a
Depending on how you look at this line 1 is either this:
# /etc/fstab: static file system information.
Or this:
UUID=0ebb028a-a3d3-4a5a-a9f3-1ead823ee57b / ext4 errors=remount-ro 0 1
So far I'm not getting it.

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 4:40 pm
by colyn
The easiest way I have found to automount NTFS partitions is to open a terminal and enter

Code: Select all

sudo apt-get install ntfs-config
Once done go to your system folder and open the NTFS configuration tool and check the partitions you want mounted and make sure to give read/write to each. This will automatically write the entries to fstab..

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 5:31 pm
by altair4
colyn wrote:The easiest way I have found to automount NTFS partitions is to open a terminal and enter

Code: Select all

sudo apt-get install ntfs-config
Once done go to your system folder and open the NTFS configuration tool and check the partitions you want mounted and make sure to give read/write to each. This will automatically write the entries to fstab..
Please note that it's mounting just fine:
/dev/sda6 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sdb2 on /media/sdb2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb3 on /media/sdb3 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb6 on /media/sdb6 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
Besides ntfs-config just makes a mess of things.

Re: How to automount ntfs drives in Linux Mint 17 KDE?

Posted: Sun Aug 24, 2014 5:37 pm
by WharfRat
Linil,

paste back

Code: Select all

head /etc/fstab|hexdump -C
@altair4

I was wondering what would be considered the first line too :?