Mounting Your Partitions



Mounting means the ability to see a file system, read from it and write to it.
Linux can mount almost all types of File Systems including ex2 (Linux native file system), FAT, FAT32, and NTFS (read only) among others.
Note: You need root privilege to mount a partition

To mount a partition temporary use 'mount' command in the form:
mount [-t File_System_Type] Device_name Mount_Directory.
ex: mount /dev/hda2 /mnt/c

1. Usually you can ignore the optional [-t File_System_Type] part for most file systems

2. Device_name defines the partition you will mount. Device names look like /dev/hda1

hda means the first IDE hard disk drive (the second one will be hdb).
the number 1 refers to the order of the partition on your hard disk.
Primary partitions have numbers from 1 to 4 while logical partitions start from hda5.

3. Mount_Directory is where you will see the files of the mounted partition. It is usually called the mount point.
Make sure to create these directories before you actually run mount. You make a new directory using mkdir command in the form mkdir dir_path.
ex: mkdir /mnt/c


To mount a partition permanently you have to edit /etc/fstab file using any text editor
Sample /etc/fstab file:

LABEL=//ex2 defaults11
/dev/cdrom/mnt/cdromiso9660 noauto,owner,ro00
/dev/fd0/mnt/floppyauto noauto,owner00
None/procproc defaults00
None/dev.ptsdevpts gid=5,mode=62000
/dev/hda6swapswap defaults00
/dev/hda2/mnt/cvfat defaults11
/dev/hda5/mnt/dvfat defaults11
I added the last two lines to mount my C,D FAT partitions
You can add a Line Like them
Ex: /dev/hda5 /mnt/c vfat defaults 1 1

This line mounts device /dev/hda2 of type vfat on directory /mnt/c using default settings
always use vfat for FAT partitions to be able to display long file names


For More Detailed Information type man mount in your console
Hosted by www.Geocities.ws

1