Page 11 of 21 FirstFirst ... 910111213 ... LastLast
Results 101 to 110 of 205

Thread: How to fstab

  1. #101
    Join Date
    Sep 2008
    Location
    North Carolina
    Beans
    219
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: How to fstab

    Nice write-up! Clears up a few things for me.

    Hope you don't mind me pointing out a couple of typos in the document while I'm here:

    For the ntfslabel command, the syntax is actually ntfslabel <device> <label>.

    In the section on ntfsprogs, the command to install it has ntfsprogs spelled ntfsporgs

  2. #102
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: How to fstab

    Quote Originally Posted by itismike View Post
    Just a little typo: "ntfsporgs" doesn't exist.
    -mike
    Quote Originally Posted by akelsall View Post
    Nice write-up! Clears up a few things for me.

    Hope you don't mind me pointing out a couple of typos in the document while I'm here:

    For the ntfslabel command, the syntax is actually ntfslabel <device> <label>.

    In the section on ntfsprogs, the command to install it has ntfsprogs spelled ntfsporgs
    Thank you both, should be fixed now
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #103
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,554
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to fstab

    I wanted to thank you on the original post however there wasnt a link to do so. Thanks for the great tutorial.

  4. #104
    Join Date
    Apr 2008
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    mount ntfs-3g using labels?

    Thanks for the really helpful thread. I'm trying to mount NTFS partitions with ntfs-3g in fstab using labels instead of /dev/sdx, due to device IDs changing with USB keys.

    LABEL=SEA_DISC /mnt/seagate ntfs-3g rw,umask=0000,defaults 0 0

    This does not work, though it works fine using the standard device path. The man pages for ntfs-3g don't mention alternative device IDs. I've searched all over but only find examples of people using /dev/sdx.

    Am I missing something here?

    [root@localhost by-uuid]# mount -L SEA_DISC /mnt/seagate ntfs-3g rw,umask=0000,defaults 0 0
    mount: no such partition found
    [root@localhost by-uuid]# ls /dev/disk/by-label -l
    total 0
    lrwxrwxrwx 1 root root 10 Oct 21 12:45 SEA_DISC -> ../../sde1

  5. #105
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to fstab

    According to the fstab man page:
    Code:
           Instead  of  giving  the  device  explicitly, one may indicate the (ext2 or xfs)
           filesystem that is to be mounted by its UUID or volume label (cf.  e2label(8) or
           xfs_admin(8)),  writing  LABEL=<label>  or  UUID=<uuid>,  e.g.,  ‘LABEL=Boot’ or
           ‘UUID=3e6be9de-8139-11d1-9106-a43f08d823a6’.
    It appears using LABELs in fstab is only supported for ext2 or xfs filesystems, not ntfs.

  6. #106
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: mount ntfs-3g using labels?

    Quote Originally Posted by keenmonkey View Post
    Thanks for the really helpful thread. I'm trying to mount NTFS partitions with ntfs-3g in fstab using labels instead of /dev/sdx, due to device IDs changing with USB keys.

    LABEL=SEA_DISC /mnt/seagate ntfs-3g rw,umask=0000,defaults 0 0

    This does not work, though it works fine using the standard device path. The man pages for ntfs-3g don't mention alternative device IDs. I've searched all over but only find examples of people using /dev/sdx.

    Am I missing something here?

    [root@localhost by-uuid]# mount -L SEA_DISC /mnt/seagate ntfs-3g rw,umask=0000,defaults 0 0
    mount: no such partition found
    [root@localhost by-uuid]# ls /dev/disk/by-label -l
    total 0
    lrwxrwxrwx 1 root root 10 Oct 21 12:45 SEA_DISC -> ../../sde1
    I think your mount command is a wee bit off. You need the -o flag before you specify options.

    Code:
    mount -L SEA_DISC /mnt/seagate -t ntfs-3g -o umask=000
    You do not need to specify "0 0" in the mount command, and you do not need to specify multiple options (rw may conflict with umask and no need to specify "defaults").
    Last edited by bodhi.zazen; October 22nd, 2008 at 01:16 AM.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  7. #107
    Join Date
    Apr 2008
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: mount ntfs-3g using labels?

    @unutbu: this is apparently unsupported
    @bodhi: thanks for the clarification; I had hastily cut and pasted to post. Since you bring it up: does the 'rw' replace specifying the uid and gid values? or does omitting rw and specifying umask simply assume full rw to start?

    In any case, after searching high and low and finding nothing I came upon this genious, simple solution over at
    http://forum.ntfs-3g.org/viewtopic.p...highlight=uuid

    I just ntfs-3g mount by label/uuid in the following way:
    ntfs-3g /dev/by-label/My_Label /mnt/ntfs_disk
    replace "by-label" with "by-uuid" to use that instead.


    Regards,
    Mike

  8. #108
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to fstab

    keenmonkey, that's really cool! Thanks for the tip.

    Edit: I found http://forum.ntfs-3g.org/viewtopic.p...highlight=uuid a little confusing, so please correct me if I have this wrong:

    To mount an NTFS partition by label, you can do this:
    Code:
    sudo apt-get install ntfsprogs
    sudo ntfslabel /dev/sdb1 My_Label
    sudo mkdir /media/My_Label
    Then edit /etc/fstab by adding a line like this:
    Code:
    /dev/disk/by-label/My_Label /media/My_Label ntfs defaults,uid=1000,gid=1000,dmask=027,fmask=137 0 2
    Now unplug the unmounted NTFS partition and re-plug it.
    This time, udev (or HAL?) will detect the Label of the NTFS partition and add an entry to /dev/disk/by-label.

    You can now mount the NTFS partition with
    Code:
    sudo mount /media/My_Label
    Last edited by unutbu; October 23rd, 2008 at 09:09 PM.

  9. #109
    Join Date
    Dec 2005
    Beans
    383

    Re: How to fstab

    If mtab has all currently mounted partitions, can I:
    auto-mount a partition
    copy the corresponding record from mtab to fstab

    so that the partition will auto-mount at boot from now on?
    Knowledge exists to be imparted.
    -Ralph Waldo Emerson

  10. #110
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    Re: How to fstab

    Quote Originally Posted by ericesque View Post
    If mtab has all currently mounted partitions, can I:
    auto-mount a partition
    copy the corresponding record from mtab to fstab

    so that the partition will auto-mount at boot from now on?
    That'll probably work. However, if you're dealing with a removable device, you'll need to find another way to identify it. mtab lists the actual device name, and sometimes those can change. With the device mounted, look in /dev/disk/by-* for ideas.

Page 11 of 21 FirstFirst ... 910111213 ... LastLast

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
  •