Automatically mounting a media drive

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
henripablo

Automatically mounting a media drive

Post by henripablo »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
all41
Level 19
Level 19
Posts: 9518
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Automatically mounting a media drive

Post by all41 »

is this indeed an external device such as usb connected
+ Welcome to the forums.
Everything in life was difficult before it became easy.
henripablo

Re: Automatically mounting a media drive

Post by henripablo »

... no, it's one of the 2 hard drives on a dual boot laptop.
User avatar
all41
Level 19
Level 19
Posts: 9518
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Automatically mounting a media drive

Post by all41 »

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
Everything in life was difficult before it became easy.
tenfoot
Level 6
Level 6
Posts: 1254
Joined: Sun Jun 03, 2007 4:12 am

Re: Automatically mounting a media drive

Post by tenfoot »

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
"Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds darkness always got there first, and is waiting for it." Terry Pratchett (Reaper Man)
henripablo

Re: Automatically mounting a media drive

Post by henripablo »

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!
Locked

Return to “Storage”