Results 1 to 6 of 6

Thread: Having to manually mount an External HDD

  1. #1
    Join Date
    Jan 2012
    Beans
    250

    Having to manually mount an External HDD

    Hello all

    When I plug in my Seagate External HDD Linux tells me "you can't mount /dev/sdg1 only root can do that." So I open xterm and type in:
    Code:
    sudo mount -t ext4 /dev/sdg1 /media/Seagate
    and it mounts fine. Similarly, when I want to remove the drive I type:
    Code:
    glenn@design:~$ sudo umount /dev/sdg1
    Although it takes 2 or three tries in 'Computer' to "safely remove drive" before the drive powers down and the power light goes out.

    Is there any way I can get around having to manually mount the drive when I plug it in? Its already in fstab:
    Code:
    # Seagate External HDD
    UUID=d4964716-bc5b-43b2-bfa3-379daf0a068d /media/Seagate ext4 noatime,relatime 0 0
    Glenn.

  2. #2
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Having to manually mount an External HDD

    What happens if you comment out the line for this partition in fstab. It should automount without you needing to add the line to fstab. As far as needing root to mount the drive; you can add user as an option and the regular users will be able to mount it -- but that's not automount now is it?
    Last edited by bab1; June 6th, 2013 at 08:05 PM.
    -BAB1

  3. #3
    Rebelli0us is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Feb 2008
    Beans
    722

    Re: Having to manually mount an External HDD

    It should mount if you double-click it in file manger. Likewise you should be able to right-click and select "unmount". Perhaps there's something wrong in the fstab line, I'd comment it out temporarily, reboot and see what happens.

  4. #4
    Join Date
    Jul 2005
    Location
    England
    Beans
    Hidden!

    Re: Having to manually mount an External HDD

    For ease of use, particularly if you want to be able to write to the drive, I suggest you make sure the partition on it is labeled with some descriptive name, eg, Seagate with command
    Code:
    sudo tune2fs -L Seagate /dev/sdg1
    assuming sdg1 is still the device name when attached. This means that when attached by USB the drive will always automount at /media/Seagate. Now with the disk attached and mounted run
    Code:
    sudo chown glenn:glenn /media/Seagate
    That should mean you can now write to the partition on the disk as user without any difficulties.
    Last edited by ajgreeny; June 6th, 2013 at 08:02 PM.
    DISTRO: Xubuntu 16.04-64bit --- Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo --- Wireless-Info

  5. #5
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Having to manually mount an External HDD

    Quote Originally Posted by Rebelli0us View Post
    It should mount if you double-click it in file manger. Likewise you should be able to right-click and select "unmount". Perhaps there's something wrong in the fstab line, I'd comment it out temporarily, reboot and see what happens.
    If the partition is mounted via the fstab file, by default, only root can mount and dismount it. On the other hand USB connected media wil be auto mounted unless the the partition (drive) is defined in fstab. You can use the option (in the 4th field) of user to allow mortal users to mount and dismount fstab defined mounts. See the fstab man page
    Code:
     user   allow a user to mount
    -BAB1

  6. #6
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Having to manually mount an External HDD

    Quote Originally Posted by bab1 View Post
    What happens if you comment out the line for this partition in fstab. It should automount without you needing to add the line to fstab. As far as needing root to mount the drive; you can add user as an option and the regular users will be able to mount it -- but that's not automount now is it?
    Exactly. No fstab entry, and any usb drive is mounted automatically when inserted.

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
  •