How To: Mount NTFS partitions for win XP, 2000 in Fc4

This is for all the newcomers who wants to mount those NTFS partitions in Linux. You must begin here and download according to your kernel.

These instructions are only for users of Fedora or RedHat kernels.

Which RPM

It is important to install exactly the same version of NTFS kernel module as the kernel you have installed. Below are some simple instructions to help you find the file you need. A quick way to find the version is to use the whichrpm script. Save the file and run it.

chmod 700 whichrpm
./whichrpm


Next we need to decide which release you have. Run this command:

cat /etc/redhat-release

and you will probably see one of the following responses:

Fedora Core release 1 (Yarrow)
Fedora Core release 2 (Tettnang)
Fedora Core release 3 (Heidelberg)
Fedora Core release 4 (Stentz)
Red Hat Linux release 9 (Shrike)
Red Hat Linux release 8.0 (Psyche)

Next find out your kernel version:

uname -r

You should see a response something like one of these:

2.4.18-3
2.4.18-17.7.x
2.4.22-1.2115.nptl
2.6.8-1.521

The version might also have one of the following suffixes:

smp
bigmem
hugemem
BOOT

If the result ends with smp then you have a multi-processor computer (you probably already knew that).Next find out what sort of processor you have. This command will ask which kernel rpm was installed for you. If your version number had a suffix, then use it here, e.g. replace kernel with kernel-smp, or kernel-bigmem.

rpm -q ?queryformat ?%{ARCH}\n? kernel

Most people will have an i686 processor (a recent Pentium computer). Other options are athlon, i586 or i386.

Next download the RPM. Follow the links for

? Fedora 4 (Stentz)
? Fedora 3 (Heidelberg)
? Fedora 2 (Tettnang)
? Fedora 1 (Yarrow)
? RedHat Enterprise 4 (Nahant)
? RedHat Enterprise 3 (Taroon)
? RedHat 9 (Shrike)
? RedHat 8.0 (Psyche)
? RedHat 7.3 (Valhalla)

now Install the rpm

You must be root for the rest of the commands. The examples will continue as if you downloaded kernel-ntfs-2.4.18-14.i686.rpm. Newer NTFS RPMs have names like kernel-module-ntfs-2.6.8-1.541-2.1.17-0.fc.1.2.i586.rpm

rpm -ihv kernel-ntfs-2.4.18-14.i686.rpm

Preparing? ############################### [100%]
1:kernel-ntfs ############################### [100%]

There should be no errors, just #?s. Note: newer NTFS RPMs will also print a message telling you if install succeeded. This is the only command we actually needed, but we?ll go on and test what we have done.

Next load the kernel module

/sbin/modprobe ntfs

There should be no output..

The next command, dmesg prints the kernel logs. We search them for NTFS using grep.

dmesg | grep NTFS

NTFS driver v1.1.22 [Flags: R/O MODULE]

The Original Driver is version 1.1.*, whereas the New Driver is version 2.*.

Mounting an NTFS Volume :

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:

fdisk -l

The output might look like:

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

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

cat /proc/filesystems

nodev rootfs
nodev bdev
nodev proc
nodev sockfs
nodev tmpfs
nodev shm
nodev pipefs
ext3
ext2
nodev ramfs
nodev devpts
ntfs

Next you need to create a place to mount the NTFS Volume. Then you can mount it.

mkdir /mnt/windows
mount /dev/hda1 /mnt/windows -t ntfs -r
ls -l /mnt/windows


-r-xr?r? 1 root root 9719 Aug 24 1996 ansi.sys
-r-xr?r? 1 root root 15252 Aug 24 1996 attrib.exe
-r-xr?r? 1 root root 28096 Aug 24 1996 chkdsk.exe
-r-xr?r? 1 root root 5175 Aug 24 1996 choice.com
?

Hopefully everything is working for you now

When you have finished, you can unmount the partition with either of:

umount /mnt/windows
umount /dev/hda1


The command is called umount (only one ?n?).

Mounting an NTFS Volumes automatically:

Once you are happy with your mount command, you can teach Linux how to mount the volume automatically by adding a line to /etc/fstab (filesystem table). Below are some example mount commands and their equivalent fstab.Don’t worry about the meaning of the 0 0 on the end.

mount /dev/hda1 /mnt/windows -t ntfs -r

/dev/hda1 /mnt/windows ntfs ro 0 0

Here we’ve transformed -r into the equivalent -o ro.

mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222
/dev/hda1 /mnt/windows ntfs ro,umask=0222 0 0

mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222,uid=flatcap,gid=winuser
/dev/hda1 /mnt/windows ntfs ro,umask=0222,uid=flatcap,gid=winuser 0 0

Uninstall:

If you wish to remove the NTFS RPM, first list all the RPMs with ntfs in their name. You output might look something like this:

rpm -qa | grep -i ntfs

kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2

Then, cut and paste the name into the rpm erase command:

rpm -e kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2

Thats it ur done . njoy

6 Comments so far.

  1. asdf
    Posted 3 years, 4 months ago. Permalink

    good one

  2. Posted 3 years, 4 months ago. Permalink

    Thx

  3. Posted 3 years, 4 months ago. Permalink

    Hai,

    Great work … thanks a lot for this info…….The inof is the most complete info i have seen on the inrternet so far for a newbie to get started…….

    One COmplain:
    Please Please Please … Change the Font Color/ background color of this website.. it is so strainful to make out the text. I simply used ctrl a to select the text and highight them to read … otherwise not possible to read anything … please let not such good content rot in this way …. sorry if i have spoken bit too harshly…

    Anyway Thanks for he info ………

  4. suresh
    Posted 3 years, 4 months ago. Permalink

    my linux version is the rwdhat 9.but in that when i press “ifconfig ”
    it was saying that cmd not found .what solution can resolve this problem

  5. tflis
    Posted 3 years, 4 months ago. Permalink

    when i write mount /dev/hda1 /mnt/j -t ntfs -r
    i have something like that

    [root@linux-zen8 ~]# mount /dev/hda1 /mnt/j -t ntfs -r
    mount: special device /dev/hda1 does not exist

  6. tflis
    Posted 3 years, 4 months ago. Permalink

    it`s ok now. my mistake. sda not hda. Now it’s OK.

One Trackback

  1. By DmLog, 3 years, 4 months ago