I recently decided to test out NTFS support on Ubuntu. I'd previously read good things about the NTFS-3G project (www.ntfs-3g.org) so I figured I'd test it out. My current system has two hard drives in it, one dedicated to Linux and all my data, the other for Windows (XP at the moment) and strictly for games and the occasional Windows-only app I may need to run when I don't feel like messing with WINE (Turbo Tax for example). Anyway, in a previous post I was using a SMB/CIFS mount to perform backups to, but I've had minor issues with it not unmounting correctly and with the Simple Backup utility just not being able to write to it now and then. So, I decided I might as well make use of NTFS-3G and my second hard drive, since in the end my main objective of backing everything up is in case my hard drive dies. They surely won't both die at the same time, right? :-)
So anyway, to get started, simply install the "ntfs-3g" package and its dependencies. Then, just add a line similar to the following to your /etc/fstab file:
/dev/sdb1 /media/ntfs ntfs-3g defaults,locale=en_US.UTF-8,uid=1000,gid=1000,umask=0137,fmask=0137,dmask=0027 0 0
So, just as before, the first second is the drive/partition I want to mount (/dev/sdb1), the second part is the location I want to mount it to (/media/ntfs), which I created in advance, then I believe the next part just tells it to use the default settings when mounting the drive and also tells it to use the locale of your choice (assuming it is supported by NTFS-3G). Next is the "uid" and "gid" options if you want to force ownership to a particular user and group. If you don't utilize these, the mount point will be owned by root. However, if you also don't specify the "umask, fmask, or dmask" then it won't really matter as the default option is to make it readable, writeable, and executable by all users. In my example, I chose my own user account (I believe it has to be in numeric form according to the man page for NTFS-3G) and group to be the owner and set the file mask so that it would allow the user read/write access and read/write/execute on directories.
If you like to keep things extra simple, you can also install the "ntfs-config" package. Then all you have to do is run the application (under "Applications" --> "System Tools" after you install it) and it lets you simple check which NTFS partition(s) you want to mount and where you want to mount it to (it forces it to be somewhere under /media). Then after clicking OK it'll ask if you want to make it writable or not and bam, you're all done. Your /etc/fstab entry will look exactly like mine above but without the uid, gid, and mask settings (well that and your partition and mount point will likely differ). I believe this app even creates the directory you chose as your mount point as well.
Thursday, February 7, 2008
Subscribe to:
Posts (Atom)