need a reply

Taking care of your Linux box.
Post Reply
umair_khan_hot
Cadet
Posts: 1
Joined: Tue Sep 23, 2003 1:52 pm
Location: karachi
Contact:

need a reply

Post by umair_khan_hot »

salaamz o alaikum

Well i read all the topics regarding mounting fat partitions , the thing is that i am not able to mount ntfs partition whereas fat partitions are successfully mounted , it was written that if ur linux version doesnt supprot ntfs mounting u have to recompile it plz mention what can i do for this and tell me a way i could see that what system type mounting my version is supporting

waiting urgently for a response
:!: :roll:
umairkhan says{{{{{{{{}}}}}}}}}
slick
Naik
Posts: 56
Joined: Fri Sep 05, 2003 1:29 am
Location: CA

Post by slick »

as you said in your post, you have to recompile the kernel...and this time...in file systems...enable ntfs....its a lil bit down there in the selection box...however...if you havent recompiled a kernel before...make sure you read thoroughly about it...theres tons of informaiton available..so i wont say much about that. When you have recompiled the kernel successfully, 1. make a directory in / or /mnt.....e.g i mount my ntfs partition to /windows
2. change the directory permissions to read only...chmod a+r windows or /mnt/windows
3. mount -t ntfs -o ro /dev/hd* /windows or /mnt/windows
Some kernels have an issue if youve only havent enabled the write to ntfs in the kernel...which you probably shouldnt...then you dont need the -o switch....so it can be something like this...
mount -t ntfs /dev/hd* /windows
where the * represents your windows drive letter AND number
put this in etceteras if you want to mount windows at boot time...
Edit your /etc/fstab and put a line like this in there.....
/dev/hd* /windows ntfs defaults 0 2
you can set it up with guid and uid specified as well..but all of that you can get later.
hope this helps....
I only run as fast as my angels can fly
farhanksa
Subedar
Posts: 359
Joined: Sun Nov 03, 2002 6:40 am
Location: Lahore
Contact:

Post by farhanksa »

1.ya u need to recompile the kernel
2. or insert the module for the support of ntfs or install module by rpm.
till now ntfs has read only support.....its suggested that u make extra fat32 partition even small to swap data btween linux and other fs
as mostly ppl r running linux on single processor systems but for the ppl who using linux on dual or quad processor server they need SMP(symetric multi processor)modules accordingly matching their kernel version

steps to perform b4 downlaod :arrow:
u can see kernel version my cmd uname -a

also check wether u r using 386 ,586,686 or athlon by
rpm -q --queryformat "%{ARCH}\n" kernel

then downlaod rpm or module from
http://linux-ntfs.sourceforge.net/info/redhat.html
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Post by Faraz.Fazil »

You have two options:
========================
1.Use the ntfs kernel module .o file
or

2.Recompile your kernel using sources downloaded from kernel.org or install an upgrade ntfs enabled rpm version

========================

1. In case you decide to use the module:

Download and use the module available on:

http://linux-ntfs.sourceforge.net/info/redhat.html

2. In case you decide to upgrade/recompile the kernel:

(a). First of all, u need to download the latest kernel

Now, u can download the kernel either in .tar.gz source format released officially by kernel.org or u could download it in .rpm format.

It is always recommended that u download and use the .tar.gz source one if u are a techie like me.

But if u are a newbie , than rpm is recommended, though it is not that effieient,

Why, i explain the reasons.

The latest version is always readily available in sources (.tar.gz form from the official site kernel.org ),whereas the rpm versions are released some time later and are not official.Also if u use kernel rpms,there can be many compatibility and arch level incompatibilities with the version you are downloading and your system spec, and you will have to issue a series of commands to first check which version is appropriate for you.Many times it happens, people download the wrong rpm version.

This is not the case with .tar.gz versions, which are a universal all in one version and contain all the kernel stuff.So u can use it on single processor or smp both.Also you put the configuration by yourself according to your own needs which is not the case in rpms.Hence if u recompile using .tar.gz source, you will have an optimized kernel.

Also installing from sources (tar.gz) is much better and effecient.

When you upgrade by using RPMs you are NOT compiling the kernel
The rpm packages are pre-compiled and the srpm packages are source code together with spec-files for the system to know how to compile.

Hence use the kernel downloaded in .tar.gz format from kernel.org if u do have a good expertise level...or use the rpm version if you are a newbie.

A1. IN case you decide to upgrade kernel using rpms:

The one on that website:

http://linux-ntfs.sourceforge.net/info/redhat.html

has ntfs support pre compiled.So u just need to install the rpm after downloading using rpm -Uvh or rpm -ivh command

A2. In case you decide to recompile the kernel using .tar.gz official sources.

======================

1.Download latest kernel in .tar.gz source format from www.kernel.org
Its is in the form a single .tar.gz file like linux-2.4.22.tar.gz or .tar.bz2

at this moment the latest kernel is 2.4.22 stable.

2.Copy it to /usr/src by the command:

cp filename.tar.gz /usr/src

3.cd to the /usr/src directory

4.tar -xzf linux-2.4.22.tar.gz

It will extract the kernel sources to the /usr/src directory

Dor instance the directory for 2.4.22 would be:

/usr/src/linux-2.4.22

5.Create a symbolic link /usr/src/linux to point to /usr/src/linux-2.4.22
using the ln -s command

cd /usr/src
ln -s linux-2.4.22 /usr/src/linux

6.cd to /usr/src/linux

7.make xconfig

this will start a gui based configuration tool...where u will select the kernel options.Make sure you set fat, vfat and ntfs support.

Note: that at the moment only stable ntfs read only support is available.
Write support is available but highly experimental....and make cause all your data to be lost...so make sure u only enable read only support

8.make dep

9.make clean

10.make modules

11. make modules_install

12.make bzImage

This will create a compressed kernel image in the /usr/src/linux/arch/i386/boot dir with the name bzImage
(path can slightly be different)

12. Donot issue a make install yet ,which makes the new kernel the default
Instead edit /etc/grub.conf or /etc/lilo.conf to add a new tab image with the name like Linux New kernel testing and add a proper reference to the new kernel.YOu may do that easily by copying an existing reference of an old kernel and paste the text in new lines...and in those new lines, add the new reference.

if u use grub, u may need to create a initrd image.to do that:

mkinitrd 2.4.22 /boot/newkernelinitrd.img

if you are unsure how to do the bootloader part, then just give another make bzlilo command...it will configure your lilo for you.
13.Boot using the new kernel.

14.Once everything is well, you can make the new kernel the default one using the make install command after cd to /usr/src/linux directory

15.Enjoy the new kernel!

NOte:

ReCompiling a new kernel does require some detailed explanation.I have tried to make it as simple and to the point as possible.Make sure u select the correct kernel options during the make xconfig part

===========================



MOunting the ntfs drive, once u have enabled ntfs support

Once you have enabled ntfs support, mount the ntfs partition using the mount command, as explained earlier i.e

mount -t ntfs -o ro /dev/hd# /mnt/winntfs

This will mount the ntfs drive in read only format to /mnt/winntfs.

(after creating a dir called winntfs in /mnt)

where, hd# is the hda number of the drive u want to access.It can be obtained using fdisk -l command.Also u can use any mount point of your choice if u dont like /mnt/winntfs

Note: that at the moment only stable ntfs read only support is available.
Write support is available but highly experimental....and make cause all your data to be lost...so make sure u only enable read only support using the ro switch


My advice:

It would be much better if u created a small fat32 partition....for data transfer between windows and linux.VFAT (FAT, FAT32) have read write support both

SO my advice would be to use a seperate small fat32 partition for the data transfer since ntfs support is only read only.
Last edited by Faraz.Fazil on Wed Sep 24, 2003 3:16 am, edited 3 times in total.
slick
Naik
Posts: 56
Joined: Fri Sep 05, 2003 1:29 am
Location: CA

Post by slick »

Yeah, Faraz's reply explains everything..
id like to add a bit to it...if youre not sure about making changes to the bootloader....you can user...make bzlilo after the recompile..which will configure your lilo for you.
I only run as fast as my angels can fly
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Post by Faraz.Fazil »

Yeah, i forgot to mention it.
Have included it now, and have also updated the post with a lot of new info, all step by step.
slick wrote:Yeah, Faraz's reply explains everything..
id like to add a bit to it...if youre not sure about making changes to the bootloader....you can user...make bzlilo after the recompile..which will configure your lilo for you.
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Post by Faraz.Fazil »

So, you guyz notice that a hardcore linux geek like me always chooses the hard but effecient method and uses the method that involves recompiling the kernel from official .tar.gz source from kernel.org..hehe just joking.

Just recompiled my kernel to the latest 2.4.22 about 1-2 weeks back using the sources i downloaded from kernel.org and using the make method i explained before in the earlier post.

Since i did all the configuration by myself in the make xconfig part, So I have an optimized kernel....unlike those installing from rpms which are basically precompiled kernels.
Last edited by Faraz.Fazil on Fri Sep 26, 2003 1:18 pm, edited 1 time in total.
Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe

Re:

Post by Faraz.Fazil »

Ok.
This has been added to the list of my articles which i will be posting at the wiki soon.
LinuxFreaK wrote:Dear All PLUCian's
Salam,

Faraz.Fazil bahi you have told him alot as he mention that he read all the post related to mounting fat partions i would like to advice ya that you can put this topic at hot ranking Topic so that or mearge it with mounting fat partion.

Best Regards.
Post Reply