LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2012, 04:37 AM   #1
Bob Fletcher
Member
 
Registered: Nov 2008
Location: Hinckley UK
Distribution: Arch Linux
Posts: 97

Rep: Reputation: 1
fstab syntax


The more I read on the internet the more confused I become. Would someone be so good as to tell me how I would write this mount, (it works fine) into my /etc/fstab
Code:
mount /dev/sdb1 /media/EHD/ -t ntfs -o nls=utf8,umask=0222
I got it from a post on the Internet but nothing about fstab other mounts don't work and what I have put into fstab I get a 'bad line 16'

Thanks
Robert...
 
Old 07-11-2012, 04:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
/dev/sdb1 /media/EHD/ ntfs nls=utf8,umask=0222 0 0
 
Old 07-11-2012, 04:47 AM   #3
rosehosting.com
Member
 
Registered: Jun 2012
Posts: 222

Rep: Reputation: 62
Quote:
Originally Posted by Bob Fletcher View Post
The more I read on the internet the more confused I become. Would someone be so good as to tell me how I would write this mount, (it works fine) into my /etc/fstab
Code:
mount /dev/sdb1 /media/EHD/ -t ntfs -o nls=utf8,umask=0222
I got it from a post on the Internet but nothing about fstab other mounts don't work and what I have put into fstab I get a 'bad line 16'

Thanks
Robert...
It should be something like:

Code:
/dev/sdb1  /mnt/EHD  ntfs-3g   umask=0222, nls=utf8   0       0
EDIT: ah, beaten by @acid_kewpie ...

Last edited by rosehosting.com; 07-11-2012 at 04:48 AM.
 
Old 07-11-2012, 04:51 AM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Is your system using UUID? Take a look at your /etc/fstab.
I hope this helps
http://www.cyberciti.biz/faq/linux-f...-update-fstab/

Last edited by EDDY1; 07-11-2012 at 04:53 AM.
 
Old 07-11-2012, 06:12 AM   #5
Bob Fletcher
Member
 
Registered: Nov 2008
Location: Hinckley UK
Distribution: Arch Linux
Posts: 97

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by rosehosting.com View Post
It should be something like:

Code:
/dev/sdb1  /mnt/EHD  ntfs-3g   umask=0222, nls=utf8   0       0
EDIT: ah, beaten by @acid_kewpie ...
Thanks unfortunately it is rejected as a bad line. This is what I find so frustrating about Linux in my case I have the correct mount doing it manually but trying to write it in fstab is another thing. In the last 3 weeks you would not believe the hours I have spent trying to get a simple server operational.

The article on UUID does not seem to apply in my case as I am not using ext3 on my external drive.

Robert..
 
Old 07-11-2012, 06:15 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
that space between the umask and nls will break it. try the one I gave you.
 
Old 07-11-2012, 06:33 AM   #7
Bob Fletcher
Member
 
Registered: Nov 2008
Location: Hinckley UK
Distribution: Arch Linux
Posts: 97

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
that space between the umask and nls will break it. try the one I gave you.
Thats what I did here it is
Code:
/dev/sdb1  /mnt/EHD  ntfs-3g   umask=0222, nls=utf8   0       0
I just cut and past what you gave me.

Robert..
 
Old 07-11-2012, 06:35 AM   #8
rosehosting.com
Member
 
Registered: Jun 2012
Posts: 222

Rep: Reputation: 62
Quote:
Originally Posted by Bob Fletcher View Post
Thats what I did here it is
Code:
/dev/sdb1  /mnt/EHD  ntfs-3g   umask=0222, nls=utf8   0       0
I just cut and past what you gave me.

Robert..
@acid_kewpie is saying to try with this one

Code:
/dev/sdb1 /media/EHD/ ntfs nls=utf8,umask=0222 0 0
and was speaking for the space after the ',' in 'umask=0222, nls=utf8'
 
Old 07-11-2012, 06:57 AM   #9
Bob Fletcher
Member
 
Registered: Nov 2008
Location: Hinckley UK
Distribution: Arch Linux
Posts: 97

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by rosehosting.com View Post
@acid_kewpie is saying to try with this one

Code:
/dev/sdb1 /media/EHD/ ntfs nls=utf8,umask=0222 0 0
and was speaking for the space after the ',' in 'umask=0222, nls=utf8'
YES that worked thank you so much. I still don't understand it. Also do you think that will work for any external HDD?

Robert
 
Old 07-11-2012, 07:07 AM   #10
rosehosting.com
Member
 
Registered: Jun 2012
Posts: 222

Rep: Reputation: 62
Code:
/dev/sdb1 /media/EHD/ ntfs nls=utf8,umask=0222 0 0
- /dev/sdb1 => the device which you want to mount
- /media/EHD/ => the destination where you want your device mounted
- ntfs => the filesystem type of the device you are mounting
- nls=utf8,umask=0222 => option(s) for the filesystem you are mounting


also, this line will work for your other external drives as long as their fs type is 'ntfs'.
 
1 members found this post helpful.
Old 07-11-2012, 07:22 AM   #11
Bob Fletcher
Member
 
Registered: Nov 2008
Location: Hinckley UK
Distribution: Arch Linux
Posts: 97

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by rosehosting.com View Post
Code:
/dev/sdb1 /media/EHD/ ntfs nls=utf8,umask=0222 0 0
- /dev/sdb1 => the device which you want to mount
- /media/EHD/ => the destination where you want your device mounted
- ntfs => the filesystem type of the device you are mounting
- nls=utf8,umask=0222 => option(s) for the filesystem you are mounting


also, this line will work for your other external drives as long as their fs type is 'ntfs'.
Thanks that has helped me. Any chance you could recommend a good Linux book for newbies as books can be as confusing as Internet resources?

Robert...
 
Old 07-11-2012, 08:12 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
This is a good tutorial http://rute.2038bug.com/index.html.gz
For a large list of stuff www.tldp.org (aka The Linux Doc Proj) - written by Linux people
Loads of free to read books/manuals etc www.linuxtopia.org - published official stuff
Home networking etc HOWTOs http://www.linuxhomenetworking.com/
 
Old 07-12-2012, 02:40 AM   #13
Bob Fletcher
Member
 
Registered: Nov 2008
Location: Hinckley UK
Distribution: Arch Linux
Posts: 97

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by chrism01 View Post
This is a good tutorial http://rute.2038bug.com/index.html.gz
For a large list of stuff www.tldp.org (aka The Linux Doc Proj) - written by Linux people
Loads of free to read books/manuals etc www.linuxtopia.org - published official stuff
Home networking etc HOWTOs http://www.linuxhomenetworking.com/
Thanks for the resources.

Robert...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[python] syntax Error : invalid syntax Python_user Programming 2 09-06-2009 01:52 PM
Correct syntax for mounting a windows share in the /etc/fstab file kaplan71 Linux - Software 3 08-17-2009 05:48 PM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 07:15 AM
fstab syntax Panci Slackware 3 11-16-2005 05:40 PM


All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration