Results 1 to 10 of 43

Thread: HOWTO Automount in Hardy

Threaded View

  1. #1
    Join Date
    Dec 2007
    Location
    Tampa, FL
    Beans
    1,087
    Distro
    Ubuntu 12.04 Precise Pangolin

    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
    (where backup can be whatever you call it...)

    Determining what you have

    From the terminal, type
    Code:
    sudo fdisk -l
    this will list all your partitions. This is what my looks like.
    Disk /dev/sda: 80.0 GB, 80000000000 bytes
    255 heads, 63 sectors/track, 9726 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x41ab2316

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
    /dev/sda2 2551 4400 14860125 83 Linux
    /dev/sda3 4401 4462 498015 82 Linux swap / Solaris
    /dev/sda4 4463 9725 42275016 7 HPFS/NTFS
    So from this list, I know I want to mount /dev/sda1 and /dev/sda4

    What to add to fstab

    from the terminal type
    Code:
    sudo gedit /etc/fstab
    this will open your fstab.

    Alternative 1

    Let's say I wanted to mount my /dev/sda1, then I would add this to the last line:
    /dev/sda1 /media/backup ntfs defaults,umask=007,gid=46 0 0
    This will mount /dev/sda1 in the /media/backup folder (as explained above)
    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
    or
    Code:
    sudo blkid
    so your fstab file will have this line
    UUID=NUMBER_ID /media/backup ntfs defaults,umask=007,gid=46 0 0
    where NUMBER_ID is the output from vol_id for your device, i.e.:
    UUID=78980E1B980DD890 /media/backup ntfs defaults,umask=007,gid=46 0 0
    I found this to be more stable/suitable than using the /dev/sda1 option.
    Last edited by Victormd; July 2nd, 2008 at 11:52 PM.
    "There are 10 types of people: Those who read binary and those who don't"
    >>>"who is general failure and why is he reading my files"<<<
    The Ubuntu Counter Project - user number # 22367
    Howto automount NTFS - My wallpaper

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •