Automatically mounting a media drive

Forum rules
Before you post please read this
Post Reply
henripablo
Level 1
Level 1
Posts: 5
Joined: Wed Feb 01, 2017 12:25 pm

Automatically mounting a media drive

Post by henripablo » Sat Dec 23, 2017 10:19 pm

Greetings,
I'm having trouble automatically mounting media drive at startup.

When I run blkid, i see this entry which is the drive I need mounted at startup:
/dev/sda2: LABEL="DATA" UUID="7ECC570DCC56BED9" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="eeaf4b48-ea2b-4b3d-a851-f0b1fefe4f79"

I tried this entry in the /etc/fstab:
UUID=7ECC570DCC56BED9 /media/external ntfs rw,nosuid,nodev,default_permissions 0 0

I also tried this in the startup applications:
udisks --mount /dev/disk/by-uuid/7ECC570DCC56BED9

no joy in either case, i have to click the drive in window managers for it to mount. At startup time the DATA drive shows up as a 'device' and I have to click it. Any ideas? Thanks in advance.
drive-not-mounted-Screenshot from 2017-12-23 21-00-26.png

User avatar
all41
Level 12
Level 12
Posts: 4486
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Automatically mounting a media drive

Post by all41 » Sat Dec 23, 2017 10:46 pm

is this indeed an external device such as usb connected
+ Welcome to the forums.
Proud to be a supporter and monthly contributor to Mint.

henripablo
Level 1
Level 1
Posts: 5
Joined: Wed Feb 01, 2017 12:25 pm

Re: Automatically mounting a media drive

Post by henripablo » Sat Dec 23, 2017 11:00 pm

... no, it's one of the 2 hard drives on a dual boot laptop.

User avatar
all41
Level 12
Level 12
Posts: 4486
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Automatically mounting a media drive

Post by all41 » Sun Dec 24, 2017 12:28 am

here is an example of mounting a hard drive at boot from my /etc/fstab
#mount archival at startup
#UUID=9f665aa7-1724-42f5-8209-15011de9080e /media/uno/archival ext4 defaults,noatime 0 2
these are commented out in this example with the #
Check where your drive is being mounted. Mine are mounted in /media/username/name of drive
Proud to be a supporter and monthly contributor to Mint.

User avatar
tenfoot
Level 5
Level 5
Posts: 881
Joined: Sun Jun 03, 2007 4:12 am
Location: Waipapa, Bay of Islands, New Zealand

Re: Automatically mounting a media drive

Post by tenfoot » Sun Dec 24, 2017 4:03 am

henripablo wrote:... no, it's one of the 2 hard drives on a dual boot laptop.
I have two drives mounted upon boot. One is an externall USB-HDD and the other a 500GB internal HDD, formatted ntfs as a Data drive.

Opening a terminal and typing blkid gives me the following output

Code: Select all

user@user-System-Product-Name ~ $ blkid
/dev/sda1: UUID="f80983e7-c913-4ca3-a013-45c25fce87da" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="000649f4-01"
/dev/sda2: UUID="a1c23af4-b08e-40b8-92f3-463529def5bf" TYPE="swap" PARTUUID="000649f4-02"
/dev/sda3: UUID="d88c5f58-39e9-4cb4-bc01-f79a75e903f6" TYPE="ext4" PARTUUID="000649f4-03"
/dev/sdb1: LABEL="Data" UUID="70783429-bd9d-467f-ad32-682fd3768c93" TYPE="ext4" PARTUUID="0000ba78-01"
/dev/sdc1: LABEL="USB-HDD" UUID="6092D5E95F8A15E5" TYPE="ntfs" PARTUUID="0018ad04-01"
and from that I constructed my fstab by going to /etc and opening fstab as administrator. See below.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=f80983e7-c913-4ca3-a013-45c25fce87da /               ext3    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=a1c23af4-b08e-40b8-92f3-463529def5bf none            swap    sw              0       0
# Data was on /dev/sdb1 during installation
UUID="70783429-bd9d-467f-ad32-682fd3768c93" media/zed/Data ext4 defaults 0 2
# USB-HDD was on /dev/sdc1 during installation
UUID="6092D5E95F8A15E5" TYPE="ntfs" PARTUUID="0018ad04-01" ntf" 
and then clicking on Save.

Before you choose as Open as administrator to make an alteration to fstab, it would be prudent to save a copy to your desktop.
tenfoot
Procrastination is the art of keeping up with yesterday.

henripablo
Level 1
Level 1
Posts: 5
Joined: Wed Feb 01, 2017 12:25 pm

Re: Automatically mounting a media drive

Post by henripablo » Sun Dec 24, 2017 9:50 am

SOLVED:
... mount works per the last two answers provided. I think I had it working even before I posted the question - I just didn't know it.
So last night I went through all the steps again and I still saw my folders unavailable, but this time I checked the path /media/external and everything was there :-)
I removed the old aliases/bookmarks (see screenshot in the original post), added the new ones and all is well.
I was hung up on the visual - seeing those folders unavailable.

Now apache can reach my sites root directory I moved to the data drive :-) LOL

Thank you so much for all the help!

Post Reply

Return to “Mounting Partitions”