FSTAB-Tuning


Not a must but you get a good intro if you read the manpages:
> man fstab
> man mount



Also, there is a very good site that covers the complete NTFS-problem and - in addition - it explains thoroughly a lot of things about mounting and the fstab FAQ. Most of the information here I took from there! The complete link is given in the NTFS-Access part! For a start you may want to take a look at http://linux-ntfs.sourceforge.net/info/ntfs.html#4.9


Things to know for now:
> ln -s /new/location/of/your/disk /your/link/to/it

In any case you should provide some information about what kind of filesystem you want to mount (in order to assure that Linux loads the right modules) and about its properties and Permissions
That means applying UNIX-permissions: tell Linux


As you might know, the permissions are three binary triples.(each like 22 21 20 , the potencies representing Read, Write and Execute);
The first triple is for Owner, the second for Group and the last for Others.
They can also be displayed in decimals (thus ranging from 0 to 7: 22 +21 +20).

Manual mounting

Enter a line like this:
> mount /dev/hda7 /mnt/data -t vfat users,umask=0007,gid=users 0 0
<p>
<a href="http://validator.w3.org/check/referer"><img border="0"
src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01!" height="31" width="88"></a>
</p>

Automated mounting

In order to automate the mounting or simply to type less like just providing the mountpoint: (like > mount /mnt/data) you should store information about devices in the file /etc/fstab.


If you have provided mountpoints for your WindowsPartitions during the installation (which is not possible for NTFS-drives because RedHat does not ship any driver...) there will already be matching lines.

They have to be edited, because the default settings used by RedHat only apply to ext2- or ext3-Linux-filesystems and are NOT good for use with FAT32.

Getting to the point

The fstab is interpreted linewise. The entries are separated by spaces or (to improve readability) tabs.



/dev/hda7 /mnt/data vfat auto,users,umask=0007,gid=users 0 0
This is how I mount my Windows FAT32-partition that I need to have access to files used both with Linux and Windows.

The first entry is the device-file, the second the all important mountpoint, the third the filesystem-type, and the forth are the mount options. And that is where you can do wrong or good...




/dev/hda1 /mnt/system ntfs noauto,ro,umask=0227,gid=users 0 0
This is what I use for my NTFS-Windows-drive. Because of the noauto I have to mount it when I need it, and because of the missing users-entry I have to do that as root:
> su -
> mount /mnt/system




You can also view or download my complete fstab - but make sure you only paste entries (because ownership and permissions may not be secure/correct due to the webpublishing!) and adapt the device-files to your situation if necessary (/dev/hdax for IDE-devices or /dev/sdax for SCSI-devices)!

/etc/fstab


Legal:
Permission to copy, distribute, link, and reformat is given and desired on condition that authorship is indicated:
Daniel Mader, Freiburg i.Brsg., 2003

Last changed: 16.06.2003