How to edit fstab? [Solved]

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
T J Tulley
Level 5
Level 5
Posts: 558
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

How to edit fstab? [Solved]

Post by T J Tulley »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.
chattr

Re: How to edit fstab?

Post by chattr »

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 '.
User avatar
T J Tulley
Level 5
Level 5
Posts: 558
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: How to edit fstab?

Post by T J Tulley »

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.
chattr

Re: How to edit fstab?

Post by chattr »

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.
User avatar
MALsPa
Level 8
Level 8
Posts: 2040
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: How to edit fstab?

Post by MALsPa »

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.
AK Dave

Re: How to edit fstab?

Post by AK Dave »

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
T J Tulley
Level 5
Level 5
Posts: 558
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: How to edit fstab?

Post by T J Tulley »

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.
AK Dave

Re: How to edit fstab?

Post by AK Dave »

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
T J Tulley
Level 5
Level 5
Posts: 558
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: How to edit fstab?

Post by T J Tulley »

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.
msuggs

Re: How to edit fstab?

Post by msuggs »

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.
mmesantos1

Re: How to edit fstab?

Post by mmesantos1 »

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. :)
User avatar
newW2
Level 5
Level 5
Posts: 821
Joined: Fri Apr 06, 2007 10:24 am
Location: USA

Re: How to edit fstab?

Post by newW2 »

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
T J Tulley
Level 5
Level 5
Posts: 558
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: How to edit fstab?

Post by T J Tulley »

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.
Locked

Return to “Installation & Boot”