LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compiled RH7.3 to read WinXP NTFS partition, mounts in Console, but can't mount fstab (https://www.linuxquestions.org/questions/linux-newbie-8/compiled-rh7-3-to-read-winxp-ntfs-partition-mounts-in-console-but-cant-mount-fstab-26580/)

BlackDogg 07-26-2002 04:30 AM

Compiled RH7.3 to read WinXP NTFS partition, mounts in Console, but can't mount fstab
 
Hi everyone, I was wondering if y'all could help me out with my NTFS mounting troubles in RH7.3

I've recompiled RH7.3 to enable NTFS support Read/Only.
Then I was able to mount through console with this command.

mount -t ntfs /dev/hda5 /mnt

Checked the contents in /mnt folder, files were there, but....

then, I tried to get it to mount in LILO or in KwikDisk to be able to be mounted on the get go by me editing fstab, but it wouldn't work. I kept on getting this error.


Called: mount -tntfs /dev/hda1 /mnt/

mount: mount point /mnt does not exist

My fstab currently looks like this:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda7 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda5 /mnt/ ntfs


hda5 is my NTFS partiton. I left out the syntax paramters for this last edit on fstab, but i've tried so many different syntaxes in the end, I pretty much get the same darn error everytime. Am I doing something wrong?

It works in console, so it should work in fstab correct?

lynch 07-26-2002 04:49 AM

Probably you need to make a symlink for that or if that /mnt/ntfs is the symlink you could try:
/dev/hda5 /mnt/ntfs auto ro,noauto,user 0 0
lynch

BlackDogg 07-26-2002 04:57 AM

lynch, tried that exactly the way you have it typed out. I copied and pasted straight to fstab. Saved it, and still wouldn't mount, same dangit error.
I even edited by spacing out to be even with the rest, and still same problem exists.
/dev/hda5 /mnt/ntfs auto ro,noauto,user 0 0

Thanx for the the help...Any other ideas would be appreciated.

MasterC 07-26-2002 05:09 AM

Ok, I think I see what's wrong

You should have made a directory in /mnt whatever you'd like in my example we will use /mnt/windows:
Open a terminal

mkdir /mnt/windows
pico /etc/fstab
(at the bottom)
/dev/hda5 /mnt/windows ntfs ro,noauto,user 0 0
CTRL + X
Yes (to save)
mount -a -o remount

And that should be it I think

BlackDogg 07-26-2002 05:16 AM

dang Master C, that worked out. Thanx. I've been messin around with linux for like 4 days, and I'm goin gagga over it, tried it a few years back, but was so intimidated, now though things are lookin brighter. laff.

MasterC 07-26-2002 05:18 AM

Yeah me too, I love it. Your welcome, glad I could help

BlackDogg 07-26-2002 01:40 PM

Ok I got it all mounted, but I have to click on kwikdisk everytime to mount manually. I know theres a syntax to have it mount manually in boot, what was it? auto in fstab?

lynch 07-26-2002 04:45 PM

Heck,forgot you need to create that /mnt/ntfs directory.Sorry,BlackDogg.
You may be right on that,but I havent done that since I stopped dual booting.Check out the automount mini-howto.
lynch

BlackDogg 07-26-2002 05:14 PM

Coo Coo

linuxcool 07-26-2002 09:16 PM

If you used this line, that MasterC gave you, as a template:

/dev/hda5 /mnt/windows ntfs ro,noauto,user 0 0

Change the ' noauto ' to ' auto '. Like this:

/dev/hda5 /mnt/windows ntfs ro,auto,user 0 0

BlackDogg 07-26-2002 10:06 PM

Duh, should have tried that first, thanx!

linuxcool 07-26-2002 10:16 PM

You're welcome. :)

BlackDogg 07-29-2002 04:36 AM

Hello all, once again I've got mount problems and this time it's in SuSe. I tried out Suse, because everyone was telling it has NTFS support of the bat. Some said it was Suse and Mandrake. Well I tried Mandrake and NTFS was there. Now that I've installed Suse, it sees the partiton, but when I try to mount it in kwikdisk, it gives me this error:

D:\drive NTFS XP partition.
Called: mount -tntfs /dev/hde5 /windows/D -o ro,noauto,user,umask=000
mount: mount point /windows/D does not exist

and this for C:\drive

Called: mount -tntfs /dev/hde1 /windows/C -o ro,noauto,user,umask=022
mount: mount point /windows/C does not exist.

I checked in my fstab file and the lines were apparent if they weren't they wouldn't be showing in Kwikdisk. Anyways I tried to console the command and this is what I get

linux:~ # mount -t ntfs /dev/hda5 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/hda5,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)

The lines in fstab were automatically generated by suse,

but check this out, when I console this in

nt -t ntfs /dev/hde5 /mnt

then it works, what am I missing here?

I'm sure it has somthing to do with fstab, but I don't understand it if SuSe generates the line itself. Anyways I re-edited the line to this:

/dev/hda5 /mnt/windows ntfs ro,noauto,user 0 0

and it still didn't work. keep in mind that I also created a windows dir just for testing purposes. This is so wierd, I had it working fine in RH7.3 after I had made a moudle for NTFS support, but now it's in Suse, I'm sure this is not distro related. Just a minor error somewhere.

Anyone have ideas? It just seems one little type or syntax can jack everything up.

linuxcool 07-29-2002 05:59 AM

Quote:

D:\drive NTFS XP partition.
Called: mount -tntfs /dev/hde5 /windows/D -o ro,noauto,user,umask=000
mount: mount point /windows/D does not exist

and this for C:\drive

Called: mount -tntfs /dev/hde1 /windows/C -o ro,noauto,user,umask=022
mount: mount point /windows/C does not exist.
The errors are telling you that the mount points /windows/C and /windows/D don't exist. If the directories /windows, /C, and /D don't exist, you'll have to create them using mkdir.

Quote:

linux:~ # mount -t ntfs /dev/hda5 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/hda5,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)
You used hda5 instead of hde5 as you did above. That could be why it didn't work.

Quote:

The lines in fstab were automatically generated by suse,

but check this out, when I console this in

nt -t ntfs /dev/hde5 /mnt

then it works, what am I missing here?
Here you used hde5 and it worked. So, hde5 must be the correct partition.

Quote:

I'm sure it has somthing to do with fstab, but I don't understand it if SuSe generates the line itself. Anyways I re-edited the line to this:

/dev/hda5 /mnt/windows ntfs ro,noauto,user 0 0

and it still didn't work. keep in mind that I also created a windows dir just for testing purposes. This is so wierd, I had it working fine in RH7.3 after I had made a moudle for NTFS support, but now it's in Suse, I'm sure this is not distro related. Just a minor error somewhere
Try changing the hda5 to hde5.

BlackDogg 07-29-2002 01:54 PM

linux cool thanx for pointing that out. I've been up all day and night trying to figure this out....it's been a long long night.....I kept on making a directory in /mnt/windows/D, but that still didn't work. Then I realized all those other times most distros put them in /mnt/. When you pointed out my mistake i noticed in pico it's just /windows/D and /windows/C. Then I created the correct directories. SUse just puts creates the mount directories different. By the way I thought suse would create both the directories and the entry in fstab, but it only does the entries and not the directories. Is there a tool in suse 8 that does this for you, instead of manually doing the directories? I'm asking because I want to support Suse in a corporate enviroment, and it would be nice to show other people the simple way to do this one task. Oh yeah, linuxcool, I was like really out of it regarding the hda and hde, I run back and fourth on two different workstations, and the one with suse is on a highpoint interface, and I forgot, but then it was funny when i did the manual mount in console, and didn't realize I was a dumbass for not noticing.....dude what a crazy night/day. Thanx.....shoulda known better.

linuxcool 07-29-2002 08:41 PM

You're welcome. :)

I don't have suse so I don't know why it doesn't create the directories that go with the entries in the fstab file. It seeems like it should after going through the trouble of making entries in fstab. Maybe you should start another thread and see if anyone knows. Sorry I can't be of more help.

MasterC 08-01-2002 04:35 AM

I would guess it's a glitch??? The way SuSE auto does everything for you, it may have something to do with that. I put in my CD, and try to mount it, but it's already mounted, somewhere else. Usually in /media/dvd. It's fine for anyone not having to worry about where their CD is getting mounted, just clicking an icon on the desktop and accessing it via a nice gui (konqueror).

BlackDogg 08-01-2002 05:13 AM

Ahhh, i see....yeah everythings not perfect, just wondering if it was just me, or that I was nuts. Laff. I dunno, but I would like to depend less on the gui and be hardcore within commands, but that will be in time for this big time newb. Sall good tho, not intimidated that much anymore....heheheh

MasterC 08-01-2002 06:10 AM

To control things by hand in SuSE is actually harder (for me) than in other distros. The gui does a good job at hiding the command line from you, and in doing so, you will have to work harder to see what's going on behind the scenes.

lynch 08-02-2002 04:13 AM

I remember having to add my LS-120 drive by hand in SuSE 7.3,but I really like the distro.I even had to create the /etc/resolv.conf file in 7.1 and 7.2 but not in 7.3:)
lynch

BlackDogg 08-05-2002 11:15 PM

Well I reformatted and installed RH 7.3 again. but now I can't mount any NTFS partitions any more. I went by this guide which I found here:
:http://www.getlinuxonline.com/omp/di.../ompntfs2.html
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This if from that link above:
I am going to assume you have updated your Red Hat 7.3 install with all of the currently available updates. Kernel version 2.4.18-5 is the latest official kernel available for Red Hat 7.3

Installing the kernel sources.

First check and see what kernel you are running. You must use the kernel source for the same kernel you are running.

[jimh@garfield jimh]$ uname -r
2.4.18-5

Check to see if you already have the kernel source installed with:

[jimh@garfield jimh]$ rpm -q kernel-source-2.4.18-5
kernel-source-2.4.18-5

If you don't have the kernel-source installed you will see:

[jimh@garfield jimh]$ rpm -q kernel-source-2.4.18-5
package kernel-source-2.4.18-5 is not installed

If the kernel source is not installed, download the source from your favorite Red Hat mirror site. You will need to be logged in as root to install the kernel source. Install the kernel source with:

rpm -ivh kernel-source-2.4.18-5.i386.rpm

If you are registered with The Red Hat Network you can also use up2date to install the kernel. This will download and then install the kernel-source for you.

up2date kernel-source

Preparing the kernel source

Login as the root user.

Change to the /usr/src/linux-2.4.18-5 directory
[root@garfield root]# cd /usr/src/linux-2.4.18-5
uname -r
"make mrproper"
[root@garfield linux-2.4]# make mrproper

"make xconfig"
[root@garfield linux-2.4]# make xconfig

Load the default Red Hat kernel config that was used to compile the kernel you have installed.

[root@garfield linux-2.4]# rpm -q --qf '%{ARCH}\n' kernel-2.4.18-5
athlon

Click "Load Configuration from file"

Side note: Red Hat did not ship an i586 uniprocessor kernel with 7.3. If you have a uniprocessor i586 system the command above will probably return i386. Use the i386.config if it does.

You can look in /usr/src/linux-2.4.18-5/configs to see what the default kernel configs Red Hat uses to compile their kernels.

[jimh@garfield jimh]$ ll /usr/src/linux-2.4.18-5/configs
total 564
-rw-r--r-- 1 root root 39830 May 2 14:36 kernel-2.4.18-athlon.config
-rw-r--r-- 1 root root 39858 May 2 14:36 kernel-2.4.18-athlon-smp.config
-rw-r--r-- 1 root root 49146 May 2 14:36 kernel-2.4.18-i386-BOOT.config
-rw-r--r-- 1 root root 40020 May 2 14:36 kernel-2.4.18-i386.config
-rw-r--r-- 1 root root 39960 May 2 14:36 kernel-2.4.18-i386-smp.config
-rw-r--r-- 1 root root 39957 May 2 14:36 kernel-2.4.18-i586.config
-rw-r--r-- 1 root root 39897 May 2 14:36 kernel-2.4.18-i586-smp.config
-rw-r--r-- 1 root root 40021 May 2 14:36 kernel-2.4.18-i686-bigmem.config
-rw-r--r-- 1 root root 39968 May 2 14:36 kernel-2.4.18-i686.config
-rw-r--r-- 1 root root 40414 May 2 14:36 kernel-2.4.18-i686-debug.config
-rw-r--r-- 1 root root 39966 May 2 14:36 kernel-2.4.18-i686-smp.config
-rw-r--r-- 1 root root 35944 May 2 14:36 kernel-2.4.18-i686-uml.config
-rw-r--r-- 1 root root 40170 May 2 14:36 kernel-2.4.18-x86_64.config
-rw-r--r-- 1 root root 40170 May 2 14:36 kernel-2.4.18-x86_64-smp.config

In the dialog box type the full path to the config file you want to use.
Example: /usr/src/linux-2.4.18-5/configs/kernel-2.4.18-i686.config

Click "Ok" to load the config and exit the dialog box.

Click "File Systems"
Scroll down and find "NTFS filesystem support (read only)"

Click "m" to build NTFS support as a module.

Click "Main Menu"

Click "Save & Exit"

An informational dialog box will popup telling you to run "make dep"
Click "Ok"

Open the toplevel Makefile in a text editor. This would be /usr/src/linux-2.4.18-5/Makefile
Look at the first four lines in the Makefile.

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 18
EXTRAVERSION = -5custom

Remove the word "custom" from the end of the EXTRAVERSION line.
Save the changes and exit

"make dep"
[root@garfield linux-2.4]# make dep


Compile the the ntfs module.

"make modules SUBDIRS=fs/ntfs"
[root@garfield linux-2.4]# make modules SUBDIRS=fs/ntfs


Create a directory for the ntfs module

mkdir /lib/modules/2.4.18-5/kernel/fs/ntfs


Copy the ntfs.o module to the directory you just created.

cp /usr/src/linux-2.4.18-5/fs/ntfs/ntfs.o /lib/modules/2.4.18-5/kernel/fs/ntfs


Set the permissions on the ntfs.o module to make sure they are correct.

chmod 0644 /lib/modules/2.4.18-5/kernel/fs/ntfs/ntfs.o


Update your modules.dep

/sbin/depmod -a


Thats it. You are now ready to use the new ntfs.o module.

Accessing your NTFS partitions

You will have to create a mount point and add an entry to /etc/fstab for the NTFS partitions you want to access.

There are many different options you can use to mount the partition depending upon your needs.

If you have a single user system or don't need to give others access to the partition, you can use this.
Replace "xxx" on uid and gid with your userid and group id.

/dev/hdc2 /mnt/windows ntfs noauto,user,uid=xxx,gid=xxx,umask=007 0 0


You can find out what your userid and groupid is with:

$ cat /etc/passwd | grep username
username:x:500:500:realname:/home/username:/bin/bash

If you were using the above user, the /etc/fstab entry would be:

/dev/hdc2 /mnt/windows ntfs noauto,user,uid=500,gid=500,umask=007 0 0


Description of the options above.

noauto = Don't mount at boot

user = Allow an ordinary user to mount, but only the user who mounted it can unmount the drive.

uid = sets owner for the partition and the files on it.

gid = sets group for the partition and the files on it.

umask = sets the permissions on the partition.

I followed the steps exactly, but actually when I did uname -r, I got this "2.4.18-3" when on the above it's showing 2.4.18-5. To make sure I did "rpm -q kernel-source-2.4.18-5" and it showed that I did have the sources, "kernel-source-2.4.18-5". And this was after the fact I did an RH update with the latest kernel they support which would be the -5 one. To make sure I went to /usr/src/ and saw a linux-2.4, linux-2.4.18-5, and a redhat folder or directory, I checked linux-2.4 but it was actually a link to linux-2.4.18-5 directory instead. I'm like lost now, since I Iwas able to mount this way that was instructed above before, but not till the reformat did this stopped working for me. I also have tried going into control panel, and linux kernel configurator, went to file systems, and checked ntfs. After wards I think i did a make symlinks dep and also a make install, the things looked like it was compiling, but when I tried to mount in console "mount -t ntfs /dev/hda5 /mnt" that too didn't work and I am getting this error "mount: fs type ntfs not supported by kernel", do you have any ideas, on what I should do? I've heard of compiling the kernel, and I thought what I've been doing all this time was compiling and making modules, but I'm not sure, big time newb whom would like to see his XP crap. Thanx all.


All times are GMT -5. The time now is 03:41 AM.