![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Hardware & Laptops Problems with hardware & laptops not being detected or supported during or after install. |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||||
|
Dark Roasted Ubuntu
![]() |
HOW TO Automount NTFS in Hardy
Though the title says NTFS, this can be used for any file system.
I see a lot of people complaining about Hardy not automatically mounting the non-native partitions (i.e., NTFS, FAT) so I thought I'd put together this HOW TO. Here I show two ways of identifying the device and automatically mounting your partition without the need to install additional packages. NOTE: NTFS-3G is native to Hardy and does not need to be installed for this to work. Furthermore, any instance of NTFS as a file system defined in fstab can be replaced with NTFS-3G. Common grounds When you boot into ubuntu (hardy), even though you don't have your ntfs partitions on the desktop, they should be listed in the menu "Places". To mount the HD, simply click on the appropriate name and an icon will show up on your desktop. Determining the mount point If you want to leave the same mount point as the ubuntu default, go to "Places" and manually mount the HD, then browse to your media folder (or in the terminal type cd /media then ls) and look at the mountpoint given to your ntfs partition (i.e. folder called backup - in my case). If your HD doesn't show up under "Places" then you will need to create the mount point in the /media folder Code:
mkdir /media/backup Determining what you have From the terminal, type Code:
sudo fdisk -l Quote:
What to add to fstab from the terminal type Code:
sudo gedit /etc/fstab Alternative 1 Let's say I wanted to mount my /dev/sda1, then I would add this to the last line: Quote:
simply keep adding lines as you need more partitions. Save your fstab and reboot. You should now get the partitions automatically mounted and the respective icons on your desktop. Alternative 2 An alternative is to add a line to the end of fstab using the UUID option instead of /dev/sda1. You can determine the UUID by using (i.e., for sda1) Code:
sudo vol_id -u /dev/sda1 Code:
sudo blkid Quote:
Quote:
__________________
"There are 10 types of people: Those who read binary and those who don't"
>>>Karmic beta 64bits+Phenom X4 9950+2xGeForce8800GT-512MB+8GB RAM<<< The Ubuntu Counter Project - user number # 22367 Howto automount NTFS - My wallpaper Last edited by Victormd; July 2nd, 2008 at 06:52 PM.. |
||||
|
|
|
|
|
#2 |
|
Dark Roasted Ubuntu
![]() |
Re: HOW TO Automount NTFS in Hardy
Mounting a file system other than NTFS:
If you would like to automount a different file system, other than NTFS, replace the NTFS terms with the corresponding system: auto - used to automatically detect the file system; vfat - used for FAT partitions; ext2, ext3, jfs, reiserfs, etc; udf,iso9660 - for CD/DVD; swap.
__________________
"There are 10 types of people: Those who read binary and those who don't"
>>>Karmic beta 64bits+Phenom X4 9950+2xGeForce8800GT-512MB+8GB RAM<<< The Ubuntu Counter Project - user number # 22367 Howto automount NTFS - My wallpaper Last edited by Victormd; July 2nd, 2008 at 06:54 PM.. |
|
|
|
|
|
#3 |
|
Dipped in Ubuntu
![]() Join Date: May 2007
Location: Netherlands
Beans: 542
Ubuntu 9.04 Jaunty Jackalope
|
Re: HOWTO Automount in Hardy
How do you know which is the right Umask and gid?
what are they anyway?
__________________
Approach life & cooking with reckless abandon. |
|
|
|
|
|
#4 |
|
Dark Roasted Ubuntu
![]() |
Re: HOWTO Automount in Hardy
The umask is a permission setting, i.e., umask=0000 means everybody and anybody can do everything with the files on the disk while umask=0007 gives the Owner and the Groupmembers all permissions and denies them to everybody else as for example to a nobody-user who accesses the disk via your SAMBA-server. If you want to give those guest accounts at least Read-Access, then choose umask=0003, which corresponds to a 774-file-permission.
gid = group ID, and can be represented as a numerical ID for the group (i.e., gid=46 or can also be gid=root, gid=vboxusers, etc). gid=46 is usually the root user group by default in ubuntu (someone, please correct me if this is wrong - I've never read that it's the default, but have always seen gid=46, even on previous versions of ubuntu so I assume that it is).
__________________
"There are 10 types of people: Those who read binary and those who don't"
>>>Karmic beta 64bits+Phenom X4 9950+2xGeForce8800GT-512MB+8GB RAM<<< The Ubuntu Counter Project - user number # 22367 Howto automount NTFS - My wallpaper |
|
|
|
|
|
#5 |
|
Way Too Much Ubuntu
![]() Join Date: Jul 2007
Beans: 263
|
Re: HOWTO Automount in Hardy
To automount in Hardy.
open terminal 1. sudo blkid (list of all of your hardrives) make directory for every unmounted harddrive on the list 2. sudo mkdir /media/<any name> (ex. sudo mkdir /media/TRIP) open second terminal 3. sudo nano /etc/fstab (save with ctrl-O, exit with ctrl-X) add for every unmounted harddrive in the list: " /dev/<device> /media/<any name> <vfat/ext3/ntfs/...> nosuid,nodev,uhelper=hal,utf8,shortname=winnt,uid= 1000 0 0 " (ex: /dev/sdb5 /media/TRIP vfat nosuid,nodev,uhelper=hal,utf8,shortname=winnt,uid= 1000 0 0) 4. sudo swapon -s (if list is empty then repeat point 3 and correct uuid with /dev/sd?? for swap) (ex: /dev/sda5 partition 498004 0 -1) |
|
|
|
|
|
#6 |
|
A Carafe of Ubuntu
![]() |
Re: HOW TO Automount NTFS in Hardy
what is the advantage of using the uuid method?
|
|
|
|
|
|
#7 |
|
A Carafe of Ubuntu
![]() Join Date: Nov 2007
Beans: 96
|
Re: HOWTO Automount in Hardy
Another option instead of using the path or UUID is the label method. In order to use this method you first have to assign labels to your partitions. I did this with the latest gParted live CD (Hardy's gParted version does not support labeling), but you can also do it in the terminal.
Here is an example of the fstab line for my storage drive. Code:
LABEL=Storage /media/Storage ext3 relatime 0 2
__________________
Hardware: Asus M2N-SLI Deluxe, AMD Athlon 64 6400+, 4 gigs DDR2, nVidia 9600GT, 1.5 TB HD storage Software: Linux Mint 7 x64, Kernel 2.6.31 |
|
|
|
|
|
#8 | |
|
Dark Roasted Ubuntu
![]() |
Re: HOW TO Automount NTFS in Hardy
For me, when using the device name (i.e, /dev/sda1), and automounting more than 1 partition resulted in partial mounting (only one partition -the first in fstab - would mount), but changing to UUID, allowed me to mount as many as I wanted. Furthermore, if you have a usb drive each drive will have a unique UUID and you can include them in fstab and that will force them to automatically mount without any conflict.
Quote:
__________________
"There are 10 types of people: Those who read binary and those who don't"
>>>Karmic beta 64bits+Phenom X4 9950+2xGeForce8800GT-512MB+8GB RAM<<< The Ubuntu Counter Project - user number # 22367 Howto automount NTFS - My wallpaper |
|
|
|
|
|
|
#9 | |
|
A Carafe of Ubuntu
![]() Join Date: Nov 2007
Beans: 96
|
Re: HOW TO Automount NTFS in Hardy
Quote:
Personally I prefer labels because UUIDs can change. If you resize or move a partition the UUID changes. Then you have to go back into fstab and make corrections.
__________________
Hardware: Asus M2N-SLI Deluxe, AMD Athlon 64 6400+, 4 gigs DDR2, nVidia 9600GT, 1.5 TB HD storage Software: Linux Mint 7 x64, Kernel 2.6.31 |
|
|
|
|
|
|
#10 |
|
Twilight Master Bumper
![]() Join Date: May 2007
Location: New Jersey
Beans: 6,281
Ubuntu Development Release
|
Re: HOW TO Automount NTFS in Hardy
Just three little FYI's:
1) you should use gksudo instead of sudo for graphical programs 2) you should be using ntfs-3g as the filesystem driver in fstab instead of just ntfs. ntfs-3g uses the stable FUSE driver with read/write capabilities. 3) for the very last column where you have a 1, you should have 0 since fsck can't/shouldn't check NTFS partitions. Your root filesystem is the only fstab entry that should have a 1, other ext2/3 partitions can have a 2. There are also some community wiki pages: community/Fstab community/MountingWindowsPartitions community/MoveMountpointHowto and even community/RenameUSBDrive may be useful. Cheers.
__________________
Beginners Guide to Filing Bug Reports | Ubuntu Security | Grub2 Troubleshooting Suspend/Resume: Remotely Backtrace X The Bump Thread - as pointless as it sounds. |
|
|
|
| Bookmarks |
| Tags |
| automount, fstab mount automatically, hard drive, hardy, ntfs |
| Thread Tools | |
| Display Modes | |
|
|