LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-23-2006, 06:05 PM   #1
The Godfather
Member
 
Registered: Jul 2005
Location: England
Distribution: 2.6.15-1.2054_FC5
Posts: 35

Rep: Reputation: 15
Learning /etc/fstab


Hello,

Yet again I have another linux problem :'( which I was hoping some kind person out there could help me out with.

Well, I want to mount my NTFS partition in linux, which I think i've done correctly using /etc/fstab:

/dev/hda1 /mnt/windows ntfs auto,exec,rw,sync,uid=xyz,gid=xyz 0 0

I did a ls -o in the /mnt/windows directory to see if it worked:

drwx------ 1 xyz 4096 Nov 19 01:01 folder1
drwx------ 1 xyz 4096 Sep 4 10:39 folder2
drwx------ 1 xyz 4096 Oct 11 17:42 folder3
-rw------- 1 xyz 62464 Nov 7 18:11 file1

And it seemed to work; even the file permissions. However, I tried to create a new folder to test it, but for some reason it failed:

mkdir: cannot create directory `test': Operation not permitted

and I'm not sure why. I thought that the user xyz had permission and could therefore do whatever they wanted. Obviously something is not right but I don't know what. Do you?

Thanks, in advance, for any advice anyone has,
The Godfather.
 
Old 11-23-2006, 06:14 PM   #2
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
I would strongly advise you against performing write operations on your ntfs partition from Linux. ntfs write support is not very reliable yet and you could very easily trash your ntfs file system. It's just a really bad idea.

If you want to share files between the two, create a fat32 partition and use that for shared files.
 
Old 11-23-2006, 06:27 PM   #3
vtel57
Member
 
Registered: Jul 2006
Location: Tampa, FL, USA
Distribution: Slackware64
Posts: 912

Rep: Reputation: 103Reputation: 103
Masonm's advice is excellent. I would avoid mounting an NTFS partition with write permissions. It's just asking for trouble. I have a partition on my drive that is vfat. On that partition I have a "win_lin" directory, which I use for common data for both operating systems. The directory is accessible from Windows or any of my distros. This is the safest method at this time, according to all my research.

Luck!
 
Old 11-23-2006, 08:49 PM   #4
johngreenwood
Member
 
Registered: Nov 2006
Location: Lancashire, United Kingdom
Distribution: Slackware 13
Posts: 243

Rep: Reputation: 31
I do not disagree with the advice already given here, but my personal preference is to have my Windows installation on a FAT32 partition and I have never had any problems. But then again, I hardly ever use Windows now. I'm in love with Linux now.
 
Old 11-23-2006, 11:01 PM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
There are currently two ways you can have safe write access to an ntfs drive:

Captive-ntfs
A wrapper for the Windows ntfs driver.

ntfs-3g
A beta-level driver that runs in userspace (I believe).

But the easiest choice may still be to use a shared Fat32 drive, as suggested above.

Last edited by David the H.; 11-23-2006 at 11:04 PM.
 
Old 11-23-2006, 11:04 PM   #6
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
Quote:
Originally Posted by johngreenwood
I do not disagree with the advice already given here, but my personal preference is to have my Windows installation on a FAT32 partition and I have never had any problems. But then again, I hardly ever use Windows now. I'm in love with Linux now.
If his Windows is already installed on a ntfs partition, that's hardly an option at this point.
 
Old 11-24-2006, 05:37 PM   #7
The Godfather
Member
 
Registered: Jul 2005
Location: England
Distribution: 2.6.15-1.2054_FC5
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks very much for all your advice. It seems unanimous that I should not write to my NTFS partition in linux; so I wont!

I have deciced to steal a piece of space from one of my NTFS partitions and create a new partition in the FAT32 format, and then mount it using the linux VFAT option.

However, I would still like to know why it won't let me write to the partition. All the permissions are ok, aren't they?

Anyway, I downloaded an NTFS driver from: http://www.linux-ntfs.org/; which I thought would allow me write to my NTFS partition. If this is not the case, then what is the point of the thing I just downloaded and installed?

And is David the H.'s adivce any good? You all seem to disagree with him; but from what he's saying, that is exaclty what I want to be able to do.

Thanks,
The Godfather
 
Old 11-24-2006, 05:43 PM   #8
vtel57
Member
 
Registered: Jul 2006
Location: Tampa, FL, USA
Distribution: Slackware64
Posts: 912

Rep: Reputation: 103Reputation: 103
How are you mounting the vfat partition? I use /media/<partition name>. I create a directory within the /media directory named for my vfat partition, then chown the directory with my username (which is the same in all distros) and grant rwx permissions for all users/groups. All my distros automount this partition in the same way. No matter which distro I'm in (including Windows), I can rw or x with no problems.

Luck!

~Eric
 
Old 11-25-2006, 06:47 AM   #9
igu
Member
 
Registered: Jan 2003
Distribution: Fedora, Gentoo, SUSE, Mandriva
Posts: 127

Rep: Reputation: 15
Quote:
Originally Posted by The Godfather
And is David the H.'s adivce any good? You all seem to disagree with him; but from what he's saying, that is exaclty what I want to be able to do.
Ntfs-3g is a new NTFS driver. It's safe and used by many people. Many distro already include it or replaced their old NTFS driver because ntfs-3g works so perfectly. Debian, Gentoo, Ubuntu, Fedora, etc. See the web page: http://www.ntfs-3g.org

I'm using it for several months and it works great! :-)
 
Old 11-28-2006, 04:13 AM   #10
The Godfather
Member
 
Registered: Jul 2005
Location: England
Distribution: 2.6.15-1.2054_FC5
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by igu
Ntfs-3g is a new NTFS driver. It's safe and used by many people. Many distro already include it or replaced their old NTFS driver because ntfs-3g works so perfectly. Debian, Gentoo, Ubuntu, Fedora, etc. See the web page: http://www.ntfs-3g.org

I'm using it for several months and it works great! :-)
Thanks very much for your adivce iqu. I've tried NTFS-3G. I downloaded it and installed it. The first time I tried to install it, it wouldn't work because it said I needed FUSE. So I downloaded and insalled that, then installed NTFS-3G again; this time it worked, I think.

But when I wanted to use it, it wouldn't work:

[root@Desktop]# ntfs-3g /dev/hda1 /mnt/windows
fusermount: mount failed: No such device
Failed to create FUSE mount point.
Retry to create FUSE mount point ...
fusermount: mount failed: No such device
Failed to create FUSE mount point.
Unmounting /dev/hda1 (Windows)

Do you know why? It looks like its something to do with FUSE.

I haven't installed much software, but usually, when noting is printed out onto the screen, it means it has worked successfully. But when I used make and make install for both FUSE and NTFS-3G, there was loads of stuff printed out - a load of if statements, plus some other stuff that I didn't understand. Is this supposed to happen? That might be the reason that it doesn't work.

Thanks for your help.
 
Old 11-28-2006, 08:55 PM   #11
Hitboxx
Senior Member
 
Registered: Mar 2006
Location: India
Distribution: Fedora
Posts: 1,562
Blog Entries: 3

Rep: Reputation: 61
1) Please don't work directly as the root user, use 'su' to temporarily switch to root and 'exit' when its done.

2) When you compiled with make and make install, did you get any errors? For eg., it should say 'make : leaving directory so and so...' if all went well. Can you post it?
 
Old 11-28-2006, 08:58 PM   #12
Hitboxx
Senior Member
 
Registered: Mar 2006
Location: India
Distribution: Fedora
Posts: 1,562
Blog Entries: 3

Rep: Reputation: 61
And 3) May i advise you to upgrade your kernel, 2054 was slightly unstable with SELinux and stuff.
 
Old 11-29-2006, 04:41 AM   #13
The Godfather
Member
 
Registered: Jul 2005
Location: England
Distribution: 2.6.15-1.2054_FC5
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by shrikant.odugoudar
1) Please don't work directly as the root user, use 'su' to temporarily switch to root and 'exit' when its done.
Yes, I use/used su.

Quote:
Originally Posted by shrikant.odugoudar
2) When you compiled with make and make install, did you get any errors? For eg., it should say 'make : leaving directory so and so...' if all went well. Can you post it?
When installing FUSE:

When I type ./configure for Fuse I get a load of checks; e.g. checking for dlfcn.h... yes

The last thing that gets printed out is this:

configure:
NOTE: Detected that FUSE is already present in the kernel, so
NOTE: building of kernel module is disabled. To force building
NOTE: of kernel module use the '--enable-kernel-module' option.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged

Don't know if these NOTEs are significant or not.

Then I type make:

Making all in kernel
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/kernel'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/kernel'
Making all in include
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/include'
make all-am
make[2]: Entering directory `/home/mark/downloads/fuse-2.6.0/include'
make[2]: Leaving directory `/home/mark/downloads/fuse-2.6.0/include'
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/include'
Making all in lib
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/lib'
Making all in util
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/util'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/util'
Making all in example
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/example'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/example'
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0'

but this is the second time i've run this.

then make install:

Making install in kernel
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/kernel'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/kernel'
Making install in include
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/include'
make[2]: Entering directory `/home/mark/downloads/fuse-2.6.0/include'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/include/fuse" || mkdir -p -- "/usr/local/include/fuse"
/usr/bin/install -c -m 644 'fuse.h' '/usr/local/include/fuse/fuse.h'
/usr/bin/install -c -m 644 'fuse_compat.h' '/usr/local/include/fuse/fuse_compat.h'
/usr/bin/install -c -m 644 'fuse_common.h' '/usr/local/include/fuse/fuse_common.h'
/usr/bin/install -c -m 644 'fuse_common_compat.h' '/usr/local/include/fuse/fuse_common_compat.h'
/usr/bin/install -c -m 644 'fuse_lowlevel.h' '/usr/local/include/fuse/fuse_lowlevel.h'
/usr/bin/install -c -m 644 'fuse_lowlevel_compat.h' '/usr/local/include/fuse/fuse_lowlevel_compat.h'
/usr/bin/install -c -m 644 'fuse_opt.h' '/usr/local/include/fuse/fuse_opt.h'
test -z "/usr/local/include" || mkdir -p -- "/usr/local/include"
/usr/bin/install -c -m 644 'old/fuse.h' '/usr/local/include/fuse.h'
/usr/bin/install -c -m 644 'ulockmgr.h' '/usr/local/include/ulockmgr.h'
make[2]: Leaving directory `/home/mark/downloads/fuse-2.6.0/include'
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/include'
Making install in lib
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/lib'
make[2]: Entering directory `/home/mark/downloads/fuse-2.6.0/lib'
test -z "/usr/local/lib" || mkdir -p -- "/usr/local/lib"
/bin/sh ../libtool --mode=install /usr/bin/install -c 'libfuse.la' '/usr/local/lib/libfuse.la'
libtool: install: /usr/bin/install -c .libs/libfuse.so.2.6.0 /usr/local/lib/libfuse.so.2.6.0
libtool: install: (cd /usr/local/lib && { ln -s -f libfuse.so.2.6.0 libfuse.so.2 || { rm -f libfuse.so.2 && ln -s libfuse.so.2.6.0 libfuse.so.2; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libfuse.so.2.6.0 libfuse.so || { rm -f libfuse.so && ln -s libfuse.so.2.6.0 libfuse.so; }; })
libtool: install: /usr/bin/install -c .libs/libfuse.lai /usr/local/lib/libfuse.la
libtool: install: /usr/bin/install -c .libs/libfuse.a /usr/local/lib/libfuse.a
libtool: install: chmod 644 /usr/local/lib/libfuse.a
libtool: install: ranlib /usr/local/lib/libfuse.a
libtool: finish: PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/mark/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/bin/sh ../libtool --mode=install /usr/bin/install -c 'libulockmgr.la' '/usr/local/lib/libulockmgr.la'
libtool: install: /usr/bin/install -c .libs/libulockmgr.so.1.0.0 /usr/local/lib/libulockmgr.so.1.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libulockmgr.so.1.0.0 libulockmgr.so.1 || { rm -f libulockmgr.so.1 && ln -s libulockmgr.so.1.0.0 libulockmgr.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libulockmgr.so.1.0.0 libulockmgr.so || { rm -f libulockmgr.so && ln -s libulockmgr.so.1.0.0 libulockmgr.so; }; })
libtool: install: /usr/bin/install -c .libs/libulockmgr.lai /usr/local/lib/libulockmgr.la
libtool: install: /usr/bin/install -c .libs/libulockmgr.a /usr/local/lib/libulockmgr.a
libtool: install: chmod 644 /usr/local/lib/libulockmgr.a
libtool: install: ranlib /usr/local/lib/libulockmgr.a
libtool: finish: PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/mark/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/mark/downloads/fuse-2.6.0/lib'
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/lib'
Making install in util
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/util'
make[2]: Entering directory `/home/mark/downloads/fuse-2.6.0/util'
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
/bin/sh ../libtool --mode=install /usr/bin/install -c 'fusermount' '/usr/local/bin/fusermount'
libtool: install: /usr/bin/install -c fusermount /usr/local/bin/fusermount
/bin/sh ../libtool --mode=install /usr/bin/install -c 'ulockmgr_server' '/usr/local/bin/ulockmgr_server'
libtool: install: /usr/bin/install -c ulockmgr_server /usr/local/bin/ulockmgr_server
mkdir -p -- /sbin
/usr/bin/install -c ./mount.fuse /sbin/mount.fuse
mkdir -p -- /etc/init.d
/usr/bin/install -c ./init_script /etc/init.d/fuse
make install-exec-hook
make[3]: Entering directory `/home/mark/downloads/fuse-2.6.0/util'
chown root /usr/local/bin/fusermount
chmod u+s /usr/local/bin/fusermount
make[3]: Leaving directory `/home/mark/downloads/fuse-2.6.0/util'
mkdir -p -- /etc/udev/rules.d
/usr/bin/install -c -m 644 ./udev.rules /etc/udev/rules.d/99-fuse.rules
make[2]: Leaving directory `/home/mark/downloads/fuse-2.6.0/util'
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/util'
Making install in example
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0/example'
make[2]: Entering directory `/home/mark/downloads/fuse-2.6.0/example'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/mark/downloads/fuse-2.6.0/example'
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0/example'
make[1]: Entering directory `/home/mark/downloads/fuse-2.6.0'
make[2]: Entering directory `/home/mark/downloads/fuse-2.6.0'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/pkgconfig" || mkdir -p -- "/usr/local/lib/pkgconfig"
/usr/bin/install -c -m 644 'fuse.pc' '/usr/local/lib/pkgconfig/fuse.pc'
make[2]: Leaving directory `/home/mark/downloads/fuse-2.6.0'
make[1]: Leaving directory `/home/mark/downloads/fuse-2.6.0'

again, 2nd time I've run that.

These two outputs are different to what I got originally

Is this what you wanted, when you asked for me to re-post?

Quote:
Originally Posted by shrikant.odugoudar
And 3) May i advise you to upgrade your kernel, 2054 was slightly unstable with SELinux and stuff.
Will do. thanks.

Thanks very much.
 
Old 12-01-2006, 07:50 PM   #14
igu
Member
 
Registered: Jan 2003
Distribution: Fedora, Gentoo, SUSE, Mandriva
Posts: 127

Rep: Reputation: 15
Quote:
Originally Posted by The Godfather
[root@Desktop]# ntfs-3g /dev/hda1 /mnt/windows
fusermount: mount failed: No such device
Failed to create FUSE mount point.

Do you know why? It looks like its something to do with FUSE.
You are right. The solution is here: http://www.ntfs-3g.org/support.html#fuse26
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 07:15 AM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 06:54 AM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 06:55 PM
Learning C/C++ Debian-Gnu-B Linux - Software 12 01-28-2004 04:20 PM
learning how much mb? nakkaya Linux - General 4 02-27-2003 11:04 AM


All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration