Hello , Its Me Again
The original author was thinking to write how-to mount windows partition but the idea gets more fat to get more than windows to be generally FSTAB
On Mandrake and some other Distributions, The System mounts Windows Partitions Automatically,
By Other Means, When You cd To /mnt/windows ... You'll Find Your Files there ...
But on Fedora Core and some other Distributions, You Must mount your Windows Partitions each Time you Boot into your System ... Now, The Question is : How To Make it mounted Automaticlly each time your System Boots UP ?!
Before Getting Into Details .. You'll Have to Know That ...
When you Boot Your System .. The Kernel Looks for a File called /etc/fstab Which Describes all the File Systems that Should Be mounted and Then mounts Them All.
This File not Only Includes Your root and swap Partitions but Also Includes any Extra Partitions you Want to mount .. Plus all Logical/Virtual File Systems like the /proc File System.
Note: fstab Stands For "File System Table"
Now, Inorder to Make The Partitions mounted Automaticlly Every Time Your System Boots UP What You Need is to Add Entries in Your /etc/fstab
Here is The Format of The Entry ..
device_name|mount_point|fstype|option|another_option|kaman_option|etc|dump_frequency|fsck_priority
Note: fsck Stands For File System Check and it is used to Check and Repair a Linux File System
/dev/hda2 / ext3 defaults 0 1 /dev/hda6 /home ext3 defaults 0 2 /dev/cdrom /mnt/cdrom iso9660 noauto,user,noexec,ro,uid=501,gid=22 0 0 /dev/cdrom1 /mnt/cdrw iso9660 noauto,user,noexec,ro,uid=501,gid=28 0 0 /dev/fd0 /mnt/floppy vfat user,sync,noauto 0 0 /dev/hda1 /mnt/win_c vfat noexec,rw,uid=501,gid=6 0 0 /dev/hda5 /mnt/win_d vfat noexec,rw,uid=501,gid=6 0 0 none /proc proc defaults 0 0 /dev/hda3 swap swap defaults 0 0 /dev/hdb2 /mnt/edge reiser4 defaults 1 1
The Entry for the CDRW Drive is Exactly the Same As for the CDROM, You Don't Need to Make it read/write Since Writing to the CDR Media is Done While the Media is unmounted.
The Benefit of having a CDROM Entry in Your fstab will be Revealed Now :
mount -t iso9660 /dev/cdrom /mnt/cdrom -o noauto,user,noexec,ro,uid=501,gid=22
mount /mnt/cdrom
mount /dev/cdrom
As you Can See you Don't Really Need to Tweak All Options .. A Line that Says
/dev/hda5 /mnt/win_d vfat
Is Enough to mount your Windows Partition.
some distributions like red-hat/fedora could not mount NTFS file system automatically like the vfat due to patent promise or ,license conflicts so the decide to remove the NTFS.
but you still need your ntfs file system .so open source people generously found the NTFS-Linux so you need to install the rpm which is provided to your kernel . then change the vfat in file system to ntfs .
As FSTAB file describes all the File Systems that Should Be mounted locally .it may be also mount network resource on boot .
hostname:/path/to/share /mount/point nfs defaults 0 0
the defaults may be changed with many other option as i remember some of them
192.168.0.10:/home/conceptor/exports /mnt/mounted nfs defaults,ro,rsize=8192,wsize=8192,soft
the most linux boxes could mount the M$ share resources automatically without any problems
the entry will looks like
//192.168.0.1/myshare-name /mount/point defaults 0 0
the options is diffrent from nfs the could be
so the entry will be something like
//hostname/files /mount/point defaults,username=diaa,password=eglug,uid=514 0 0
This Article is Originally Written by Alaa and re-organized by CVirus,and many contributers