Mount a Windows partition to Linux
Posted: Thu Sep 03, 2009 5:01 pm
In general most of the all modern distribution of Linuxes automatically connect the Windows partition to Linux.
When installing the Linux version, if there any windows partition Linux automatically enter an entry to the location /etc/fstab or /etc/mtab
Lets think if connect a new Windows hard disk physically to a Linux machine,
Initially you can list down the partition by typing
Out put may like this, this may differ from your output
OR
You can type
you may see a output like this
In previous output you can distinguish the Windows partitons
Then you can mount it to a location, first you have to create a mount point in location such as /media/windows
This creates a directory in location /media/windows . The parameter -p stand for, if there is a folder with the same name 'don;t ceate it'. mount mounts /dev/sda5 to /media/windows which is having a NTFS file format.
When installing the Linux version, if there any windows partition Linux automatically enter an entry to the location /etc/fstab or /etc/mtab
Lets think if connect a new Windows hard disk physically to a Linux machine,
Initially you can list down the partition by typing
Code: Select all
# fdisk -l
Device Boot | Start | End | Blocks | Id | System |
/dev/sda1 | 1 | 653 | 5245191 | 12 | Compaq diagnostics |
/dev/sda2 * | 654 | 7028 | 51207187+ | 7 | HPFS/NTFS |
/dev/sda3 | 7041 | 14593 | 60669472+ | f | W95 Ext'd (LBA) |
/dev/sda4 | 7029 | 7040 | 96390 | 83 | Linux |
/dev/sda5 | 9592 | 14593 | 40178533+ | 7 | HPFS/NTFS |
/dev/sda6 | 7041 | 7283 | 1951834+ | 82 | Linux swap / Solaris |
/dev/sda7 | 7284 | 9591 | 18538978+ | 83 | Linux |
You can type
Code: Select all
mount
Code: Select all
.....
....
/dev/sda5 on /media/disk type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
Then you can mount it to a location, first you have to create a mount point in location such as /media/windows
Code: Select all
# mkdir -p /media/windows
# mount -t ntfs-3g /dev/sda5 /media/windows