Page 1 of 1

Data Mounting

Posted: Fri Nov 22, 2002 8:08 pm
by Imran.Plus
Dear Sir,
I am new user of linex and I want to auto mount my data from my FAT partion tell me plz.

Posted: Sat Nov 23, 2002 1:08 am
by fawad
Ok, I'm assuming you wanna mount your FAT partition. Here's a couple of steps.

    The FAT partition is the first on the first hard drive (/dev/hda1)
    You want to mount it to /mnt/c
    Load the vfat module:

    Code: Select all

    modprobe vfat

    Make a mount point:

    Code: Select all

    mkdir /mnt/c

    Mount the partition temporarily:

    Code: Select all

    mount /dev/hda1 /mnt/c -t vfat

    Check whether the mount worked properly:

    Code: Select all

    ls -l /mnt/c

    If everything went Ok, make the changes persistant: Append following line to /etc/fstab:

    Code: Select all

    /dev/hda1 /mnt/c  vfat    defaults,umask=007,gid=dos 0 0

    Make the dos group:

    Code: Select all

    groupadd dos
    and add users to it.
    Check if the fstab entry is good:

    Code: Select all

    umount /mnt/c;mount /mnt/c;ls -l /mnt/c


Posted: Sun Nov 24, 2002 12:53 pm
by Imran.Plus
Dear FAWAD Bhai,
Thank you very much I will check this command then tell u either its working or not

i have mounted all data but

Posted: Wed Nov 27, 2002 1:36 am
by zaib
i have mounted data but my h.d.d of 20 gb
only "f:" i did ext3 where i it has space of 5.5 gb
it only mounted data of c =2.6gb
and data of d=3.1gb
but never suppot data of e drive
please refere the problems solution

Posted: Thu Nov 28, 2002 1:16 pm
by AsadR
zaib, it would be easier for everyone (including yourself) to understand what's going on if you realized that drive letters (C:, D:, etc..) are of very little importance in The Real World. These drive letters are (in some cases completely randomly) assigned by Microsoft Windows to the partitions on the harddisks you have installed on your computer.

Your computer motherboard has 2 IDE buses (called IDE-0 and IDE-1). Each of these buses can have 2 IDE devices installed on it (called master and slave -- defined by a jumper setting at the back of the harddisk).
Each harddisk can have mutliple partitions. On an intel based system you are limited to 4 primary partitions. Any of these partitions can be an "extended partition", which contains a potentially unlimted number of logical partitions.
In Linux, you can access any partition on any drive you want. The name of the MASTER IDE device on the FIRST IDE port (IDE-0) is called:


The SLAVE ide device on the FIRST IDE port is called


Similarily, the master and slave of the second ide port is called

/dev/hdc and /dev/hdd respectively.

Each primary partition is referenced by a number from 1-4
So the first primary partition on the master device on the first ide port will be:


Logical partitions are similarily labelled from 5 onwards.

The first step to understanding your partitions is to see where your harddisk is installed. You can use this using "dmesg | less" on your command prompt. If you scroll through, you'll find a listing of the IDE devices installed on your PC and the partitions detected on them.

You can then use cfdisk or a similar tool to browse through the partition table to see the sizes of the various partitions (and if you are infact using your entire harddisk).

Once you recognize the partitions you want to access from Linux, you simply create an empty directory (called a mount point) which you will use to access that partition.

Supposing your harddisk is the master device on the first ide bus, and the third partition is the mysteriously labelled "e" drive.
This would make the path to E: drive:


To mount this, you would make the mountpoint:

mkdir /drive_e

Then to mount it you'd type:

mount /dev/hda3 /drive_e

Should work fine as long as you have appropriate kernel drivers for the partition format (ie: FAT32/NTFS) installed.


wow, that was a long post. please excuse any errors.