Why is mounting a USB disk in a usable manner so difficult?

J dreadpiratejeff at gmail.com
Mon Dec 16 20:19:14 UTC 2013


On Mon, Dec 16, 2013 at 3:04 PM, Liam Proven <lproven at gmail.com> wrote:
> On 16 December 2013 18:45, J <dreadpiratejeff at gmail.com> wrote:
>>
>> How the heck do I fix this so that my external hard drives are mounted
>> in a way that I can actually use them?
>>
>> Why do we make it so bloody difficult to actually plug a drive in and use it?
>
> It *is* difficult, I agree. Sadly, the flipside of Unix' better
> security than Windows is that sometimes it gets in the way.
>
> To mount my drives permanently, I recently discovered a handy file
> called /etc/mtab
>
> It's a counterpart to /etc/fstab which is the one that describes where
> stuff *should be* mounted. The mtab file describes where it *is
> currently* mounted.
>
> I have spent ages trying to write /etc/fstab lines that will allow me
> to mount my own drives and have RW access to them without using
> superuser powers -- the way they're mounted if I connect them when the
> system is already running. I never got it right.
>
> But what I found that I could do was:
>
> * insert the drive
> * make a note of where Ubuntu mounted it
> * copy the line from /etc/mtab describing that mount
> * paste it into /etc/fstab
> * unmount / eject the drive
> * manually create the mount point
>
> Shut down, connect drive, reboot, & the drive was then automatically
> mounted in the right place, with the right permissions.
>
> *Far* easier than trying to work out the right parameters and switches
> for fstab, which I have been fighting since about 1989.
>
> Also, note that the drive might end up belonging to the user who
> formatted it. Try formatting it from the Disks program, or right from
> the Launcher, and then you should be the owner.

Yep... you can do it a couple ways, actually.  If you have the UUID or
disklabel you can add that to fstab using uuid= or label= like so:
UUID=e7eedf5d-5aad-4230-b123-47162b1acea6 /media/disk1
ext4    errors=remount-ro 0       0
LABEL=mydrive  /data   ext4  noauto 0 0

or you can set it somewhere in udev rules, but tweaking udev rules is
not necessarily trivial.

Still doesn't get around the point that the behaviour is different for
the same device.  Leaving the whole setting executable permissions
aside, why does the drive mount as my user when formatted in NTFS but
root only when formatted in EXT4?

Sigh...  Oh well.
>
> --
> Liam Proven • Profile: http://lproven.livejournal.com/profile
> Email: lproven at cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
> MSN: lproven at hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
> Tel: +44 20-8685-0498 • Cell: +44 7939-087884
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




More information about the ubuntu-users mailing list