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. |
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. |
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! |
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.
|
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. |
Quote:
|
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 |
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 |
Quote:
I'm using it for several months and it works great! :-) |
Quote:
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. |
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? |
And 3) May i advise you to upgrade your kernel, 2054 was slightly unstable with SELinux and stuff.
|
Quote:
Quote:
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.:confused: 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 :confused: Is this what you wanted, when you asked for me to re-post? Quote:
Thanks very much. |
Quote:
|
All times are GMT -5. The time now is 03:05 AM. |