Link to home
Start Free TrialLog in
Avatar of abed_abuamer
abed_abuamer

asked on

Reading NTFS partitions under Linux RedHat 7.2

Hello all:


I have a Hard Disk which has Win98, win2000Pro, and Linux RedHat 7.2 Partitions.

The Win2000Pro Patition is NTFS partition.

I want to access this NTFS partition from the Linux Os.???

I did access FAT before, but want to acess NTFS now!

Any body know How to do it????


Abed
ASKER CERTIFIED SOLUTION
Avatar of majorwoo
majorwoo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I thought that you would need to recompile the kernel to enable support for NTFS (static / module)
Avatar of mglxxx
mglxxx

majorwoo did the modules part of the kernel
compile and then some slightly unconventional
copying of modules.

Since redhat kernels don't check the module version,
this works.
right, i doubt you wanted to recompile your kernel, so i showed you a simple way
Avatar of abed_abuamer

ASKER

majorwoo :

I do the following:

I press the "main menu", go to "KDE menues", then to the "Control Center", the window of KDE CONTROL CENTER is opened.
I go to the system, then Linux Kernel Configurator, I press it. Then I press the "Load From Button"....choose /usr/src/linux-2.4/configs. Here I see the following:

Kernel-2.4.7-athlon.config
Kernel-2.4.7-athlon-smp.config
Kernel-2.4.7-i386-BOOT.config
Kernel-2.4.7-i386.config
Kernel-2.4.7-i386-smp.config
Kernel-2.4.7-i586.config
Kernel-2.4.7-i586-smp.config
Kernel-2.4.7-i686.config
Kernel-2.4.7-i686-debug.config
Kernel-2.4.7-i686-enterprise.config
Kernel-2.4.7-i686-smp.config


I type "uname -a", and I see the following:

" Linux mylin 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown "

I choose  "Kernel-2.4.7-i686.config"...Is that right????

Any way when I pree OK, a Window pop up " The KDE crach Handler ".....
"Short Description:
The Application KDE Control Center (kcontrol) crashed and caused the signal 11 (SIGSEVG) "....

I press the close button and the Control Center Window disappear.


What does this mean????
And what should I do in this case????


Abed
oh ohw very nice, this means KDE has crashed - if you go back in there did it keep the box checked for you?

and yes, you selected the correct kernel
what box??

Any way, I did the following instaed:

# cd /usr/src/linux2.4
# make xconfig

A window is opened, I choosed the File systems, then y for "NTFS file system support (read only", save and exit. Then
#make dep
#make modules
#make modules_install

After that I went to /lib/modules, and dir, I found the following:

2.4.7-10
2.4.7-10custom
2.4.7-10debug

There wasn't 2.4.7-10smp....!!

When restarting computer, it gives "faild" on mounting other partitions: NTFS partition

Any HELP???

Abed
 
the smp is for multiprocessor systems, you will not need that

check for the ntfs module, you should be able to do

insmod ntfs

and then

mount -a

if you get no glitches then your compiled the module ok
Ok, when I cd /lib/modules/2.4.7-10custom/kernel/fs/ntfs,
I see ntfs.o file

when I write #insmod ntfs
the following appears:
insmod: ntfs : no module by that name found

What should I do in this case!???

Abed
AFAIK insmod uses the module path to locate a
module. Try to do the following:

mkdir /lib/modules/2.4.7-10/kernel/fs/ntfs
cp /lib/modules/2.4.7-10custom/kernel/fs/ntfs/ntfs.o /lib/modules/2.4.7-10/kernel/fs/ntfs

Then try the 'insmod ntfs' again.
ok, are you booting the custom kernel? - i think you are booting just the 2.4.7-10 -- try copying the file to the 2.4.7-10 folder

cp -a /lib/modules/2.4.7-10custom/kernel/fs/ntfs /lib/modules/2.4.7-10/kernel/fs/ntfs

(all one line, will copy the entire ntfs directory to the kernel i think you are booting - you can check this by looking at /etc/lilo.conf or /etc/grub.conf and looking for the kernel it boots)

then try it again (the insmod ntfs)
(it's the same thing, just i used one line, to copy the entire directory, instead of 2(one to make it, and one to copy it))
there is no ntfs directory in "/lib/modules/2.4.7-10custom/kernel/fs/"

abed
IT really worked At last. U were right majorwoo....thx v.much. I must have copied that line!!!!

Any way this is what I did to make this work:

1) goto http://www.redhat.com/advice/ask_shadowman_dec02.html :

Make sure the following packages are installed:

kernel-headers     glibc          binutils
kernel-source     kgcc          gcc
dev86          cpp
make          ncurses-devel

You are changing the kernel, and may want the numbering to reflect that. So edit /usr/src/linux/Makefile and change your EXTRAVERSION (e.g. Change -18 to -18ntfs).
cd /usr/src/linux

cp -p configs/kernel-*-i686.config arch/i386/defconfig
(change i686 to the appropriate processor)

make mrproper
make oldconfig
make xconfig (config or menuconfig if not in X)

And enable ntfs support under file systems.
make dep bzImage
(this should create System.map and arch/i386/boot/bzImage)

make modules

cp -p arch/i386/bzImage /boot/vmlinuz[version]
cp -p System.map /boot/System.map-[version]
make modules_install

If you have scsi, don't forget to create a new initial ramdisk:
mkinitrd /boot/initrd-[version]

Edit lilo.conf to reflect the new kernel addition (leave the other stanzas in tact until you are sure it boots) and run lilo, or add the line to grub.conf in the syntax of the other lines.

This will enable "read" support for your ntfs volumes. Write has never, and likely will never work well enough to be safe at any speed. You may have to have a vfat partion as a way station for interim writes.


2) Finally, what majorwoo said:

cp -a /lib/modules/2.4.7-10custom/kernel/fs/ntfs /lib/modules/2.4.7-10/kernel/fs/ntfs

3)Restart copmuter



Abed
I stll have 2 more quetsions majorwoo:

1) First:
When I restaart my computer , and then I  choose the Linux Os from the menu, the following happens:

Loading Linux.........
Uncompressing Linux...

ran out of input data


--System halted



Why this happened.
To solve this problem I have to boot from the LILO disk I did when i installed Linux for the first time.

But I don't want to use the disk every time i want to log into linux os.

What should I do????

I noticed that when i SHUTDOWN the linux, it sayes:

error in line 10 in /etc/fstab
This line is:
/dev/hda4 /mnt/win2k ntfs defaults,ro,gid=10,umask=002 1 2

Is it related to the "--System halted" issue????????

But when booting, there is no failed error related to mounting other partitions!!!



Plz help.


2) Seconed:
How to fix the kde control center error that appered before...remeber!!


Abed

1)go ahead and boot from your disk (well work in the system halted with LILO in a sec) and then before you shutdown, unmount the ntfs filesystem - i believe this needs to be done for a clean shutdown.

umount /dev/hda4

then do a reboot, if you don't get the nasty shutdwon message then we can fix lilo, although i would recomend doing grub - its much easier, and very simple to install.


2)There is not alot to do, KDE still has some bugs, if you do it again and ir crashes it should ask you to submit a bug report - follow the instructions to do that, tell them what you were doing - and they will try to fix it for the next version.  (Dont worry, your whole KDE will not crash, just doing certain things are not so good yet, and ntfs is pretty unstable still to so it doesn't help)
hello majorwoo :

No, it's still there.

I did unmount the disk, and then deleted it from /etc/fstab.


But again, when booting the Linux, the system appears.

Any suggestions

Abed
but when you unmounted it you no longer got this mesage

error in line 10 in /etc/fstab
This line is:
/dev/hda4 /mnt/win2k ntfs defaults,ro,gid=10,umask=002 1 2

right?  Ok then, now to fix lLILO

use your boot disk to startup, then login as root, and run

lilo  (lowercase)

if it gives you any errors send them here, if not reboot and try not using the boot disk, it should be fixed.
Ur the greatest MAJORWOO.

See u in other quetions!!


Abed