Peeyush Maurya
Joined: 17 Nov 2004 Posts: 92 Location: Noida
|
Posted: Wed Nov 17, 2004 9:13 pm Post subject: How to mount NTFS filesystem in Linux |
|
|
There are two ways to mount NTFS filesystem in linux
a) Compile kernel with NTFS Support
b) Install NTFS RPM.
We will discuss NTFS RPM which can be downloaded from
http://linux-ntfs.sourceforge.net/rpm/index.html
Which partition should I use?
In Linux disks are named hda, hdb for the first two disk on the first IDE controller and hdc, hdd for the third and fourth disks. SCSI disks are named sda, sdb, etc, in the order they are discovered.
A simple way to look for NTFS Volumes is using:
The output might look like:
| Code: | Disk /dev/hda: 64 heads, 63 sectors, 4465 cylinders
Units = cylinders of 4032 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 2125 4283968+ 07 NTFS/HPFS
/dev/hda2 2126 19851 35735616 0f Win95 Ext'd (LBA)
/dev/hda5 * 2126 4209 4201312+ 83 Linux
/dev/hda6 4210 4465 516064+ 82 Linux swap |
How do I mount an NTFS Volume?
First of all, it might be an idea to check that your kernel understands NTFS. The command below will give a list of all the filesystems that Linux understands. If you see ntfs, then you are OK. Also it might be a good idea to read the mount manual, man 8 mount.
| Code: | | cat /proc/filesystems |
Next you need to create a place to mount the NTFS Volume. Then you can mount it.
| Code: | mkdir /mnt/windows
mount /dev/hda1 /mnt/windows -t ntfs -r |
When you have finished, you can unmount the partition with either of:
| Code: | umount /mnt/windows
umount /dev/hda1 |
The command is called umount (only one 'n').
Use 'mount' command to view all mounted partitions |
|