0

How do I ensure all of my other internal hard drives are mounted by default upon boot up of Ubuntu 17.10?

Every time I start my Ubuntu 17.10 computer and log in, I have to Open "Files" - then Click "+ Other Locations" to see the list of attached devices. Only once I do this am I able to look at the contents of these additional internal hard drives.

Here is my details when I edit fstab

# /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/sda5 during installation 
UUID=3b693200-e592-483d-9b74-701739be0c08 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0 
/dev/disk/by-uuid/508a6797-6705-48f9-b698-c9b7abb410e2 /mnt/508a6797-6705-48f9-b698-c9b7abb410e2 auto nosuid,nodev,nofail,x-gvfs-show 0 0 
/dev/disk/by-uuid/00aa1e3e-f053-4644-804b-e397c60551ba /mnt/00aa1e3e-f053-4644-804b-e397c60551ba auto nosuid,nodev,nofail,x-gvfs-show 0 0

I haven't edited this yet, but this is what I see. It appears as though auto is already there.

Is this a Bios setting or can it be solved by a setting in Ubuntu 17.10? Your advice or help would be appreciated. Thanks, Brett

muclux
  • 5,154

2 Answers2

0

As you can mount them by clicking on the drive in nautilus, your disks already have an entry in /etc/fstab.

Open a terminal by typing Ctrl-Alt-T. Then enter sudo nano /etc/fstab. Then look for the lines where your hard drives are mentioned and change noauto to auto. Ctrl-X will ask you whether to save the changed file and then exit the editor. Ctrl-D or exit will close the terminal window.

For further details see man fstab in a terminal (Ctrl-Alt-T).

Addition with the knowledge of /etc/fstab entries:

gvfs is intended to work just the way you describe: the filesystems are mounted only when a user klicks on them in the GUI file manager (nautilus). If you want to mount them automatically, you have to define 2 mountpoints (e.g. two empty folders data1 and data2) and edit the entries in fstab (by editor or by the disks GUI):

<your uuid1> /home/<your userID>/data1 <file system type> defaults 0 2
<your uuid2> /home/<your userID>/data2 <file system type> defaults 0 2

where "your uuid*" are the unchanged first fields in the current entries, "file system type" is probably ntfs if your disks have been used in windows before or ext3 or ext4 if they have been used in Linux before.

muclux
  • 5,154
  • Thank you, this sounds like exactly what I am trying to do. But I'm a beginner at using the terminal and although I've read the information at - man fstab in a terminal (Ctrl-Alt-T) - it doesn't make much sense to me. – BarbadosBrett Feb 03 '18 at 19:55
  • Question: When you say "Make sure that this entry does not contain noauto in the 4th field (you may replace noauto by auto or just defaults) and they should be automatically mounted at boot time.

    Am I to edit or update a file somewhere? Is there a visual app to do this same thing? "Disks"?

    If I do not get this correct could my computer not boot or give issues? Sorry, but I'm still a novice and (trying) to learn.

    – BarbadosBrett Feb 03 '18 at 19:55
  • Yes, you'll have to edit /etc/fstab. I have added further details to my answer as to how to do that. – muclux Feb 03 '18 at 20:02
  • See also: https://askubuntu.com/questions/46588/how-to-automount-ntfs-partitions & https://help.ubuntu.com/community/Fstab – oldfred Feb 03 '18 at 20:38
  • Here is my details when I edit fstab "

    /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).

    / was on /dev/sda5 during installation

    UUID=3b693200-e592-483d-9b74-701739be0c08 / ext4 errors=remount-ro 0 1

    – BarbadosBrett Feb 04 '18 at 00:27
  • /swapfile none swap sw 0 0 /dev/disk/by-uuid/508a6797-6705-48f9-b698-c9b7abb410e2 /mnt/508a6797-6705-48f9-b698-c9b7abb410e2 auto nosuid,nodev,nofail,x-gvfs-show 0 0 /dev/disk/by-uuid/00aa1e3e-f053-4644-804b-e397c60551ba /mnt/00aa1e3e-f053-4644-804b-e397c60551ba auto nosuid,nodev,nofail,x-gvfs-show 0 0

    I haven't edited this yet, but this is what I see. It appears as though auto is already there.

    – BarbadosBrett Feb 04 '18 at 00:27
  • Please, next time, edit your question to give further details. There you can copy/paste your output and then mark it with {} to keep the formatting. I've done it for you - see your question. – muclux Feb 04 '18 at 07:32
  • The 'auto' you see in your fstab is for the automatic file system type recognition, not for the automatic mount. I have yet to study what 'x-gvfs-show' means. – muclux Feb 04 '18 at 07:39
  • I have edited my answer. – muclux Feb 04 '18 at 11:13
0

If you don't want to modify your fstab file, you can use the disks gui tool instead. This should come pre-installed with Ubuntu.

Search for the disks application and launch it. You should see an interface similar to this.

Select the disk you wish to mount at boot on the left panel, then select the partition which you want to mount. In my image, I've selected the 1.0 TB Hard Drive as my disk, and the 1000 GB NTFS partition.

Once you've selected your desired disk and partition, click on the options button (the button underneath my cursor in the image above). Select Edit Mount Options.

Un-flick the Automatic Mount Options switch and enable the two checkboxes as seen in this image.

After which your disk should mount at boot.

Top Cat
  • 101
  • 1
    Ok I tried the disks app and did exactly what you suggested, rebooted and it did not work. Maybe my issue isn't "mounting", so I'll try and explain again in case my 1st description isn't my real issue. When I click the "Files" the contents open up of the "Home". – BarbadosBrett Feb 04 '18 at 00:12
  • My issue is with the Bookmarks previously saved. From previous bookmarks that I've saved for these 2 drives, it gives me an error saying "Opps! Something went wrong. Unable to find the requested file. please check the spelling and try again." This only happens when I first boot the machine. I have to add "+ Other Locations" and select the 2 drives in order to be able to browse the files and folders. Is this what it means to mount a drive? If, not, how can I fix this issue, maybe Drives, is messed up and I do need to edit the "fstab" file in terminal??!?!? – BarbadosBrett Feb 04 '18 at 00:13