Mount partitions in a GNU/Linux system

The following tutorial will help you to learn how to mount partitions
in a GNU/Linux system.

First step is to create a mount point. A mount point can be any
directory. Usually the directory should be empty. Otherwise after
mounting you won’t be able to access the contents of that directory.
Naming of partitions in GNU/Linux

For IDE hard disk

Primary Master: hda (hda1 hda2 hda3 hda5 hda6 hda7)
Primary Slave: hdb (hdb1 hdb2 hdb3 hdb5 hdb6 hdb7)
Seconday Master: hdc (hdc1 hdc2 hdc3 hdc5 hdc6 hdc7)
Secondary Slave: hdd (hdd1 hdd2 hdd3 hdd5 hdd6 hdd7)

Note: GNU/Linux allows you to create upto four primary partitions
during installation. ie 3 primary and one extended. All Logical drives
comes under extended partition.

So first primary partition in Primary Master will be hda1 and second
primary partition in primary master will be hda2 and first logical
drive in primary master will be hda5. and So on.

If the HDD is SATA then it will be “sda” if HDD is connected to SATA
port0. Numbering will be same as explained above.

If you have a proprietary Operating System then there will be only one
primary partition. So the partitions will be as follows.

hda1 hda5 hda6 hda7 hda8 hda9 hda10 and so on

hdb1 hdb5 hdb6 hdb7 hdb8 hdb9 hdb10 and so on

hdc1 hdc5 hdc6 hdc7 hdc8 hdc9 hdc10 and so on

hdd1 hdd5 hdd6 hdd7 hdd8 hdd9 hdd10 and so on

Login as root and create a directory as follows

$su
password:

#cd /mnt

/mnt# mkdir mount_point OR /mnt# mkdir /mnt/mount_point

next is to mount the partition.

/mnt# mount /dev/hda5 mount_point OR /mnt# mount /dev/hda5 /mnt/mount_point

To make mount permanent add the some lines to the file
/etc/fstab as follows,

/dev/hda1 /mnt/mount_point vfat defaults,umask=000 0 0
/dev/sda5 /mnt/d_drive vfat defaults,umask=000 0 0
/dev/hda8 /mnt/g_drive ntfs defaults,umask=000 0 0

Note: “umask” is used to allow read/write permission to all the users in a system.

If you have installed ntfs-3g (apt-get install ntfs-3g) then you can provide “ntfs-3g” as the partition type in /etc/fstab instead of simply giving ntfs.

Hope this helped you to learn how to mount partitions in GNU/Linux.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • FriendFeed
  • FSDaily
  • Identi.ca
  • LinkedIn
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

Related posts:

  1. SquashFS Support in Linux Kernel 2.6.28
  2. Triple booting from pen drive
  3. How to enable designer in PHPMyAdmin?
  1. mahesh
    Jun 9th, 2009 at 17:22 | #1

    iam very happy to c ur wed page.
    It gave me valuable hints.

  2. വി.കെ. നിസാര്‍
    Aug 31st, 2009 at 05:51 | #2

    Sree,
    Great work.
    I learned a lot from this
    Yesterday I experienced a problem while mounting NTFS
    Thanks

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>