Mounting Windows partitions under Linux

  • by

Multi-boot systems with Linux and Windows are quite common. With the following steps, it is easy to access Windows partitions under Linux.

1. Examine the disk partitions. For example,

sudo fdisk -l

gives the output,

Disk /dev/sda: 160.0 GB, 160041885696 bytes  
255 heads, 63 sectors/track, 19457 cylinders  
Units = cylinders of 16065 * 512 = 8225280 bytes  
Disk identifier: 0x093fba08  

Device Boot      Start         End      Blocks   Id  System  
/dev/sda1   *           1        9311    74790576    7  HPFS/NTFS  
/dev/sda2           18456       19457     8048565    7  HPFS/NTFS  
/dev/sda3            9312       11622    18563107+  bf  Solaris  
/dev/sda4           11623       18455    54886072+   5  Extended  
/dev/sda5           11623       11747     1004031   82  Linux swap / Solaris  
/dev/sda6           11748       12356     4891761   83  Linux  
/dev/sda7           12357       16004    29302528+  83  Linux  
/dev/sda8           16005       18455    19687626   83  Linux

/dev/sda1 and /dev/sda2, here, refer to the Windows' C and D drives respectively.

2. Create directories for local mount under /media

sudo mkdir /media/C 
sudo mkdir /media/D

3. Update the /etc/fstab file

Add the following line to /etc/fstab

<disk_partition>  <local_mount_point> ntfs rw,nls=utf8,umask=022 0 0

In the above example, the following two lines are added to /etc/fstab,

/dev/sda1  /media/C  ntfs  rw,nls=utf8,umask=022 0 0 
/dev/sda2  /media/D  ntfs  rw,nls=utf8,umask=022 0 0

4. Reboot the system.

Now the C and D drives should be accessible as /media/C and /media/D respectively.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments

You may like these, also

  • POSIX message queues in Linux 1.0 POSIX Message queues POSIX interprocess comunication (IPC) was introduced in the POSIX.1b standard (IEEE Std 1003.1b-1993) for real time…
  • POSIX Shared Memory in Linux 1.0 Shared Memory Shared memory is the fastest method of interprocess communication (IPC) under Linux and other Unix-like systems. The…
  • POSIX Semaphores in Linux 1.0 Semaphores Semaphores are used for process and thread synchronization. Semaphores are clubbed with message queues and shared memory under…
  • fork and exec system calls in Linux 1.0 fork and exec system calls Suppose we wish to write a "shell program" which would execute another program. Now,…
  • Connecting two computers with Ethernet LAN cable Quite often, we wish to connect two computers back to back using an Ethernet LAN cable. It may be because…
  • D-Bus Tutorial 1.0 D-Bus D-Bus is a mechanism for interprocess communication under Linux and other Unix-like systems. D-Bus has a layered architecture.…
  • Socket programming using the select system call 1.0 Client-Server Paradigm The Client-Server paradigm divides the software architecture of a system in two parts, the server and its…
  • System V message queues in Linux 1.0 Message queues Message queues are one of the interprocess communication mechanisms available under Linux. Message queues, shared memory and…
  • POSIX Threads Synchronization in C 1.0 POSIX Threads Synchronization POSIX Threads provide multiple flows of execution within a process. The threads have their own stacks…
  • System V Shared Memory in Linux 1.0 Shared Memory Shared memory is one of the three interprocess communication (IPC) mechanisms available under Linux and other Unix-like…