WARNING!: How do I Automount an Hard dRive in my Computer in Ubuntu?

Ralf Mardorf silver.bullet at zoho.com
Sat Nov 28 05:30:45 UTC 2015


On Fri, 27 Nov 2015 15:37:11 -0800, Keith wrote:
>I have used the program 'gnome-disks' to setup auto mounting for my
>second HDD. I didn't have to worry about hand editing a file and
>getting it wrong.

Warning!

Consider this thread as not solved. Don't do the same, unless you
understand what you're doing.

Are you sure you did the right thing? What do you think why all of us
mentioned fstab? Why do you think did I explain that copying mtab
entries to fstab is risky?

If it's too much of a hassle for you, to read and understand the very
short instruction how to use fstab, then Linux is not the right
operating system for you.

If you are not willing to learn fundamental basics, then Linux is not
more secure than e.g. Windows, if so, then it's quite the contrary, a
operating system such as Windows is much more secure then Linux.

Linux is only better than operating systems such as Windows, if a
user behaves responsible.

I'll give you a few hints, to make you aware that just doing something
without understanding it, could be risky.

What kind of drive is it? Is it e.g. an internal drive or an external
green drive?

How often do you shutdown and start, or restart the computer,
IOW auto-mount the drive at startup?

Is data security important?

Assumed it should be an external green drive, is the lifespan of the
drive important?

Using fstab you can chose that fsck is handled correctly. Does
gnome-disks (seemingly based on udisks and gvfs) it too?

I don't use this script:
https://wiki.ubuntu.com/AutoFsck
I don't know it this is only valid for the above script and when
mounting by fstab or if gnome-disk cares about it too:
http://askubuntu.com/questions/26141/how-do-i-find-out-if-there-will-be-a-fsck-during-the-next-boot

Assumed it's an external green drive it's much more complicated. If
it's an external green drive, then what to do depends on how you want
to use it. In no case follow any broad-brush advices regarding green
drives.

In a nutshell:

- The correct way to auto-mount an internal or external non-green drive
  always at startup is to do it by fstab. Assumed gnome-disks should
  not handle fsck, then data integrity isn't secure.

- The correct way to use an external green drive is to only connected
  it very seldom to the computer and to keep it connected as short
  as possible.
  It's possible to turn of that the drive goes to sleep or to remove
  everything that wakes up a sleeping drive, but this requires much
  knowledge to decide what is the best way to go.
  If you connect an external green drive permanently without disabling
  that the drive goes to sleep or without removing software that wakes
  up sleeping drives, such as gvfs, smartd and several other software
  or setting up software correctly using udisks2 and similar,
  then the drive will bite the dust very soon.

Disclaimer:

Speaking for non-green non-external drives only, I do not know if
gnome-disks is as secure as fstab or not. For this kind of drives using
fstab is secure and it's the regular way to auto-mount those drives at
startup, even if gnome-disks should be secure too, it's not the regular
way to use it for this purpose, so it at least is insecure regarding
attention by the community and by distro-maintainers. fstab is a core
component of every distro, so there's much attention by the community
and by distro-maintainers.

Regards,
Ralf






More information about the ubuntu-users mailing list