fstab entry to manually mount ntfs partitions
What is the correct fstab entry to manually mount a Windows XP ntfs type partition? All my Linux and other partitions were auto-mounting, then I did edit the /etc/fstab file to change from "defaults", to "noauto,user" options, and changed the mount point folders from; /media/disk-1 (and so on numbers), to; /sda1, and so on for all 10 partitions. Now I can mount all the Linux partitions fine, but not any NTFS, so what is the secret?
Should I use; auto, or ntfs, or does ntfs-3g work to manually mount these type partitions ? current fstab file is here; UUID=50b5fde3-f83e-4666-a1d4-76f206f58685 / ext3 defaults 1 1 UUID=c4c807c6-563f-4f41-9c07-24d90bf7a271 /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 UUID=233f1695-1a4e-4179-bb8a-68eb1de30719 swap swap defaults 0 0 UUID=1929e259-7dfd-4c92-9b20-609c74b5c935 swap swap defaults 0 0 /dev/sdb7 /sdb7 ext3 noauto,user 0 0 /dev/sda9 /sda9 ext2 noauto,user 0 0 /dev/sda5 /sda5 ext3 noauto,user 0 0 /dev/sda8 /sda8 ext2 noauto,user 0 0 /dev/sdb2 /sdb2 ext2 noauto,user 0 0 /dev/sda2 /sda2 ext3 noauto,user 0 0 /dev/sda6 /sda6 ntfs-3g noauto,user 0 0 /dev/sdb3 /sdb3 ext3 noauto,user 0 0 /dev/sdb1 /sdb1 ntfs-3g noauto,user 0 0 /dev/sdb6 /sdb6 ext2 noauto,user 0 0 |
ntfs-3g will manually mount the partition... (did you RTFM?) use it in place of your usual mount command.
You have neglected to tell us what it is that you are having trouble with when mounting. What command are you using? Do you get any errors? In what way does the mount not procede as expected? Your mounting scheme is not a good idea - you should not have user-writable files right off root. The organisation with /media /mnt etc is done for a reason and is kept because the reasons remain valid. You will have fewer problems in the long run if you stick with it. OTOH, changing /media/disk-1 to something descriptive like /media/windows is a good idea. |
I think this should do:
/dev/sda6 /home/username/windows ntfs-3g rw,noauto,exec,dev,suid,uid=1000,gid=1000,umask=0011 0 0 (you need to create a windows folder in your home directory first) |
Will the uid and gid entries allow any user to mount, or just the first user?
This is something I missed earlier - but the user flag instead aught to do the trick. It is usual, though, just to automount the fs to allow users to access it. |
simon bridge; What is RTFM, and how is that used. I have sda6 as a NTFS storage partition, and sdb1 is windows XP formatted also as NTFS. What I do is in gnome Fedora 9, I open the "Disk Management", (the mount tool), and select a partition and click the mount button. Then for a ntfs there is no result, (it does nothing at all), and no error message either. But for any Linux it does mount and unmount just fine. I am not doing this in a terminal by command line, just by edit of the; /etc/fstab file, thanks.
jay73; What do those numbers refer to? (uid=1000,gid=1000,umask=0011),and why can we not use auto, or ntfs as the file system type,? thanks. |
uid = user ID
gid = group ID Who says ntfs cannot automount? I only used noauto because you mentioned mounting manually. There is little point in mounting anything manually if it has been mounted automatically at boot time. Here are the options I use for automounting: rw,uid=1000,gid=1000,umask=0011 (if you use, say, Fedora, you will need to use 500 instead of 1000). @Simon Bridge Frankly, I don't know. It seems to me that the gid and uid only emulate Linux file permissions and that they are unrelated to the mounting operation. EDIT: I have just tried mounting NTFS as a regular user and I get this: Unprivileged user can not mount NTFS block devices using the external FUSE library. Either mount the volume as root, or rebuild NTFS-3G with integrated FUSE support and make it setuid root. Please see more information at http://ntfs-3g.org/support.html#unprivileged |
Quote:
man man in a terminal. However, I may have misunderstood your request - you want any user to be able to mount, is this correct? Quote:
man ntfs-3g man mount for more information. info <command> also works. Try with CLI - this will provide more information |
Quote:
Code:
uid=value and gid=value Quote:
Wait! Do you mean that you set fstab to allow user mounting (need "user" option) yet this did not work? Have you tried: mount -t ntfs-3g /dev/sda1 /mnt/windows instead? Note: from mount(8) Code:
user Allow an ordinary user to mount the file system. The The line would be something like /dev/sda1 /mnt/windows ntfs-3g rw,user,umask=0000 0 0 @OP: we do not want to set the fs to ntfs because that needs the ntfs driver, which you don't have. ntfs-3g is the program which handles MSs proprietary FS for linux. Similar for setting the fs to auto. |
Quote:
From my fstab: Quote:
Quote:
|
Thanks for all the help, I think I will just allow the auto mount of all my NTFS partitions (only 2), and that is the simple and easy way. And here is a good ntfs-3g site; http://ntfs-3g.org/index.html
|
add this line to your fstab. This is mounting by force.
Quote:
|
@jay27 - that is a useful discovery - thanks. Sadly I cannot duplicate this as my own ntfs partitions have been erased long ago. But it appears that ntfs-3g does not behave just as mount does. It is inadvisable to let users have access to anything setuid root.
@james2B: that's what I did. @matrix13: isn't that line a comment? Anyway, the idea is not merely to mount the partition but to allow non-root users to mount and unmount it. |
All times are GMT -5. The time now is 07:23 AM. |