How to edit fstab? [Solved]

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

How to edit fstab? [Solved]

Postby T J Tulley on Fri Sep 05, 2008 7:09 am

I understand that fstab specifies how the partitions identified there should be mounted: presumably this is contained in the options, dump and pass columns.

I have searched LinuxMint Wiki but there are no articles on fstab there. HowTo Forge also produced nothing.

Presumably there is a published specification for the accepted contents of fstab somewhere?
Last edited by T J Tulley on Tue Sep 09, 2008 12:20 pm, edited 2 times in total.
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
User avatar
T J Tulley
Level 5
Level 5
 
Posts: 581
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Linux Mint is funded by ads and donations.
 

Re: How to edit fstab?

Postby chattr on Fri Sep 05, 2008 7:24 am

T J Tulley wrote:I understand that fstab specifies how the partitions identified there should be mounted: presumably this is contained in the options, dump and pass columns.

I have searched LinuxMint Wiki but there are no articles on fstab there. HowTo Forge also produced nothing.

Presumably there is a published specification for the accepted contents of fstab somewhere?

There is a published specification: the man page for fstab ( ' man fstab ' in a terminal ).

/etc/fstab is owned by root, so to edit the file, you'll need to ' sudo gedit /etc/fstab '.
chattr
Level 2
Level 2
 
Posts: 58
Joined: Thu Jul 03, 2008 2:43 pm

Re: How to edit fstab?

Postby T J Tulley on Fri Sep 05, 2008 7:57 am

Thanks, Chattr, for a quick reply.

I had thought of trying $ man fstab but thought that method only applies to commands - I don't think fstab is a command?

Anyway, I shall now do so.
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
User avatar
T J Tulley
Level 5
Level 5
 
Posts: 581
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: How to edit fstab?

Postby chattr on Fri Sep 05, 2008 3:29 pm

T J Tulley wrote:Thanks, Chattr, for a quick reply.

I had thought of trying $ man fstab but thought that method only applies to commands - I don't think fstab is a command?

Anyway, I shall now do so.

No, fstab isn't a command.

Code: Select all
$ apropos fstab

returns a number of man page entries relating to fstab.

The ' apropos ' command (in a terminal) searches names of man pages and descriptions in the pages.
chattr
Level 2
Level 2
 
Posts: 58
Joined: Thu Jul 03, 2008 2:43 pm

Re: How to edit fstab?

Postby MALsPa on Fri Sep 05, 2008 3:40 pm

If that isn't enough info, try a Google search. Something like how to edit fstab will bring up a wealth of links to articles.
User avatar
MALsPa
Level 8
Level 8
 
Posts: 2030
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: How to edit fstab?

Postby AK Dave on Fri Sep 05, 2008 5:55 pm

Google search strings:
edit fstab ubuntu mint
edit fstab linux mint

So you feel the need to edit fstab. Any particular reason WHY you want to edit it? Or just for sh~ts and giggles?
User avatar
AK Dave
Level 6
Level 6
 
Posts: 1042
Joined: Wed May 14, 2008 3:39 pm
Location: Anchorage, AK USA

Re: How to edit fstab?

Postby T J Tulley on Fri Sep 05, 2008 6:59 pm

Thanks AK Dave: My reason for wanting to edit fstab is that in my latest installation of Elyssa, (about which I've posted in various places) my data archive belongs to root as do all the files & directories in it. I have tried to change this by /$ sudo chown theo /dev/sdb1 where sdb1 is the partition containing my data - it is in fact a non-mounting Windows partition; always previously it has mounted belonging to me, with all its contents likewise.

I have also tried /$ sudo chown theo /media/sdb1 which is where it is mounted - still no effect, although the commands are apparently accepted. I see there is a note about this behaviour in man mount, applying to one of the options I think.

However, I've just included Group in View>Visible Columns and they are all in plugdev which includes me; the permissions are all 770 so I have full access and presumably the ownership doesn't matter. I can successfully edit them, and have created new dynamic links to the desktop as the old ones were broken.

Nevertheless the change is puzzling. I shall be grateful for advice. These unwanted changes eat up a lot of time.
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
User avatar
T J Tulley
Level 5
Level 5
 
Posts: 581
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: How to edit fstab?

Postby AK Dave on Fri Sep 05, 2008 8:16 pm

T J Tulley wrote:Thanks AK Dave: My reason for wanting to edit fstab is that in my latest installation of Elyssa, (about which I've posted in various places) my data archive belongs to root as do all the files & directories in it. I have tried to change this by /$ sudo chown theo /dev/sdb1 where sdb1 is the partition containing my data - it is in fact a non-mounting Windows partition; always previously it has mounted belonging to me, with all its contents likewise.


Elyssa doesn't put ntfs partitions in fstab by default. I don't know why. You have to do this manually. Easiest is to mount the partition, open mtab, and cut-paste the appropriate line to fstab. Make sure you identify it as ntfs-3g.
User avatar
AK Dave
Level 6
Level 6
 
Posts: 1042
Joined: Wed May 14, 2008 3:39 pm
Location: Anchorage, AK USA

Re: How to edit fstab?

Postby T J Tulley on Sat Sep 06, 2008 6:08 pm

Thanks again, AKDave, for that clear advice. I've printed out the manuals for FSTAB and MOUNT - they don't mention ntfs-3g among filetypes so I've just left them as ntfs.

I mounted the 4 partitions I'm interested in using, their details appeared in /etc/mtab and I copied them into /etc/fstab where they required editing because fstab requires tabs between items and they arrived with only spaces. I also edited the option noatime to relatime.

Now I've just shut down and restarted, but only my main datastore /dev/sdb1 and /dev/sdd1 have mounted automatically. Here are the relevant lines from fstab:

LABEL=(E)DI8:H7R /media/sdb1 ntfs rw,nosuid,nodev,relatime,allow_other,blksize=4096 0 0
LABEL=Backups /media/sdc1 ntfs rw,nosuid,nodev,relatime,allow_other,blksize=4096 0 0
LABEL=PC Scheduled /media/sdc2 ntfs rw,nosuid,nodev,relatime,allow_other,blksize=4096 0 0
LABEL=D&S Scheduled /media/sdc3 ntfs rw,nosuid,nodev,relatime,allow_other,blksize=4096 0 0
/dev/sdd1 /media/disk ntfs rw,nosuid,nodev,relatime,allow_other,blksize=4096 0 0

There are tabs between the items, but they only show as spaces in the preview of this post.

The Labels survive from Windows Disk Manager - I would like to apply a label to /dev/sdd1 but the command e2label doesn't work for ntfs. There is mention of labels among the options for ntfs where it says use nls=name but I don't see how to apply that. I've just tried, unsuccessfully, using a command.

/media/sdb1 shows owner & group = root but I had reset those last time to theo; now the commands $ sudo chmod theo /dev/sdb1and
$ sudo chmod theo /media/sdb1have no effect although they appear to be accepted. The same applies to /media/disk which is where sdd1 is mounted.

Another continuing problem is that described in my post "Incorrect report during boot" in the General Questions forum, sent 4/9/08-6:30 p.m. It has just happened again! (In between, I have been using Hibernate).
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
User avatar
T J Tulley
Level 5
Level 5
 
Posts: 581
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: How to edit fstab?

Postby msuggs on Sat Sep 06, 2008 6:29 pm

T J Tulley wrote:they don't mention ntfs-3g among filetypes so I've just left them as ntfs.


Just having them as ntfs will only give you read access. They need to be ntfs-3g for read/write acess.

Also,
ntfs-config is an easy to use GUI program that will add ntfs partitions to fstab. It's in the repos.
msuggs
Level 5
Level 5
 
Posts: 882
Joined: Thu Jul 10, 2008 8:25 am
Location: non-local

Re: How to edit fstab?

Postby mmesantos1 on Sat Sep 06, 2008 7:36 pm

omns wrote:
T J Tulley wrote:they don't mention ntfs-3g among filetypes so I've just left them as ntfs.


Just having them as ntfs will only give you read access. They need to be ntfs-3g for read/write acess.

Also,
ntfs-config is an easy to use GUI program that will add ntfs partitions to fstab. It's in the repos.


I have to agree I used NTFS-CONFIG to mount my Vista HDD and I no nothing about editing FSTAB. Thats how easy it is to use. :)
Image
User avatar
mmesantos1
Level 8
Level 8
 
Posts: 2277
Joined: Tue Jan 29, 2008 9:14 pm
Location: VA. USA

Re: How to edit fstab?

Postby newW2 on Sat Sep 06, 2008 11:42 pm

To open fstab for editing in Linux Mint 5 Gnome, the command is:
Code: Select all
gksu gedit /etc/fstab

Here some information on fstab - it's a how-to / understanding fstab post.
http://ubuntuforums.org/showthread.php?t=283131
User avatar
newW2
Level 6
Level 6
 
Posts: 1081
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Re: How to edit fstab?

Postby T J Tulley on Sun Sep 07, 2008 3:47 pm

Thanks for all those references - it looks as though ntfs-3g is fairly new and will be very useful. I note that the option silent is on by default - this explains the lack of response to commands. I have now specified uid=1000 so hope it will be mine at the next mounting. I have also amended the last field in fstab to 2 for these partitions, so hope they will mount next time.

If so, I shall edit this to "Solved".

Thanks again.
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
User avatar
T J Tulley
Level 5
Level 5
 
Posts: 581
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: ColinWhite, Flemur, Jack555 and 20 guests