How to mount windows drives in Linux

When you dual boot your system to Windows and Linux, it is important that you can view your data stored on Windows drives in Linux and vice-versa. Unfortunately Windows doesn’t recognize Linux partitions (ext2 and ext3) but it’s pretty easy to access your windows drives from Linux. But there is one thing to keep in mind… it’s pretty easy if your windows file system is FAT32. In case it is NTFS, you may have to get Linux plugin for recognizing NTFS for some distros.
First of all, how to recognize the windows drives…
Each separate disk is identified as hda, hdb, hdc, etc. in order if it is a PATA (IDE) drive (your CD drive or if you have a pretty old hard disk) and as sda, sdb, sdc, etc. if it is a SATA disk. For each disk the partitions are identified as sda1, sda2, etc. For eg. if you have a SATA disk and your Windows has three partitions, C: , D: , and E: then these will be represented in Linux as follows:

C: as /dev/sda1
D: as /dev/sda2
E: as /dev/sda3

if you have a CD drive it will be represented as /dev/hda1

Now for mounting …

Say you have a folder called /mnt/d_drive from where you want to access the contents of your D: then just give the command
# mount /dev/sda2 /mnt/d_drive
that’s it . Now open the folder /mnt/d_drive and you will be able to access everything on your d drive.
But this will mount your drive only for current session. If you want to permanently mount the drive you need to edit the text file /etc/fstab. Just open the file in a text editor and add a line like

/dev/sda2 /mnt/sda2 vfat rw,user,noauto 0 0

Make entries for as many partitions as you want to mount permanently. Save the file and restart your session.
Done.

Tagged as:

Leave a Comment