Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-10-2020, 10:14 AM
|
#1
|
Member
Registered: Jun 2019
Posts: 34
Rep: 
|
Permanent USB drive with Ubuntu desktop
I have added the proper magic to my /etc/fstab to mount my USB drive on boot and as root. But when I login to my desktop, it tries to mount the USB drive again as my user id in /media/$USERNAME. Is this is a bug or a configuration issue? I don't think its related but I am using samba, smbd to export this drive.
OS: Ubuntu 20.04
Desktop manager: default Gnome
fstab: UUID=719b83b1-8f0d-42f8-b9c6-c796832e8371 /media/backup ext4 errors=remount-ro 0 2
I think this is the right forum, but don't hesitate to correct me.
Thanks
|
|
|
12-10-2020, 10:26 AM
|
#2
|
Senior Member
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
|
Quote:
Originally Posted by RickPoleshuck
I have added the proper magic to my /etc/fstab to mount my USB drive on boot and as root. But when I login to my desktop, it tries to mount the USB drive again as my user id in /media/$USERNAME. Is this is a bug or a configuration issue? I don't think its related but I am using samba, smbd to export this drive.
OS: Ubuntu 20.04
Desktop manager: default Gnome
fstab: UUID=719b83b1-8f0d-42f8-b9c6-c796832e8371 /media/backup ext4 errors=remount-ro 0 2
I think this is the right forum, but don't hesitate to correct me.
Thanks
|
Check the "automounter" settings in the desktop/graphical environment you're using - it's a configuration issue with that.
|
|
|
12-10-2020, 11:04 AM
|
#3
|
Member
Registered: Jun 2019
Posts: 34
Original Poster
Rep: 
|
Quote:
Originally Posted by jsbjsb001
Check the "automounter" settings in the desktop/graphical environment you're using - it's a configuration issue with that.
|
Thanks for your reply.
Unfortunately, I did not fully specify my problem. My apologies.
Using dconf-editor I can turn off automount easily by browsing to org.gnome.desktop.media, but that turns off ALL automounts which is not what I want.
|
|
|
12-10-2020, 01:39 PM
|
#4
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by RickPoleshuck
Unfortunately, I did not fully specify my problem. My apologies.
Using dconf-editor I can turn off automount easily by browsing to org.gnome.desktop.media, but that turns off ALL automounts which is not what I want.
|
If you want to disable automounting only for one specific device, but not all others, a udev rule might help.
Hint: this is much harder to achieve.
|
|
|
12-10-2020, 10:46 PM
|
#5
|
Senior Member
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
|
Quote:
Originally Posted by RickPoleshuck
Thanks for your reply.
Unfortunately, I did not fully specify my problem. My apologies.
Using dconf-editor I can turn off automount easily by browsing to org.gnome.desktop.media, but that turns off ALL automounts which is not what I want.
|
Are you sure you can't go into System > Preferences > Removable Drives and Media and set an option to not automount just your USB drive? Because reading this seems to suggest you can, under the heading "Preferences".
I'm pretty sure there is in fact an option to selectively automount removable drives in KDE. GNOME is one of the reasons I don't use Ubuntu myself, and I don't seem to have an ISO image of it to look at it for you in a VM either.
I would check in Ubuntu's Removable Drives and Media settings for an option to not automount your USB drive, without disabling automounting completely. Or you'll have to setup a udev rule as suggested to stop your USB drive being automounted.
|
|
|
12-11-2020, 10:18 AM
|
#6
|
Member
Registered: Jun 2019
Posts: 34
Original Poster
Rep: 
|
If the option to specify a particular drive exists in Ubuntu 20.04 Gnome, it is hidden well. :-)
After more research, I believe this is a bug. When I plugin my USB drive while logged in I do not see this problem. It only occurs after a reboot. Although I am careful to lock my screen when I walk away, I almost never log out so I hadn't been aware of this before.
I think I am pointed in the right direction. For others, this looks like a good very beginner tutorial to udev: https://opensource.com/article/18/11/udev
Thanks to all.
Quote:
Originally Posted by jsbjsb001
Are you sure you can't go into System > Preferences > Removable Drives and Media and set an option to not automount just your USB drive? Because reading this seems to suggest you can, under the heading "Preferences".
I'm pretty sure there is in fact an option to selectively automount removable drives in KDE. GNOME is one of the reasons I don't use Ubuntu myself, and I don't seem to have an ISO image of it to look at it for you in a VM either.
I would check in Ubuntu's Removable Drives and Media settings for an option to not automount your USB drive, without disabling automounting completely. Or you'll have to setup a udev rule as suggested to stop your USB drive being automounted.
|
|
|
|
12-11-2020, 04:11 PM
|
#7
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by RickPoleshuck
It only occurs after a reboot.
|
Show us the output of please.
(just a wild guess)
|
|
|
12-11-2020, 07:11 PM
|
#8
|
Member
Registered: Jun 2019
Posts: 34
Original Poster
Rep: 
|
Quote:
Originally Posted by ondoho
Show us the output of please.
(just a wild guess)
|
My original post had the relevant line from my fstab, but here is the whole thing:
Code:
# /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=130b39ea-b957-422b-8cb7-7d760169c5b9 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
UUID=719b83b1-8f0d-42f8-b9c6-c796832e8371 /media/backup ext4 errors=remount-ro 0 2
|
|
|
12-12-2020, 02:59 AM
|
#9
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
^ aw crud, you posted that in your OP. Sorry.
But it made me realise what the problem is.
In fstab, you can add an option to that drive that tells your DE to basically ignore it.
I kknow this exists but I cannot find it.
I currently have
Code:
...,comment=x-gvfs-show,...
on one internal drive, but that does the exact opposite. So maybe "x-gvfs-hide"?
|
|
|
All times are GMT -5. The time now is 03:01 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|