[SOLVED] How to change automatic mount point of USB devices

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] How to change automatic mount point of USB devices

Postby dreamer88 » Feb 13th, '21, 02:07

Hi, I installed Mageia 7.1 XFCE a while ago on a laptop and it generally all works fine.
I have one thing that is bugging me though: whenever I insert a USB stick it's automatically mounted under: /run/media/username/USBstickname/
This path is way too long and tedious to type every time I want to access it from a terminal.

Is there a way to change the default mount path back to /media/USBstickname/ as I was used to from other distros (including older versions of Mandriva)?
Last edited by dreamer88 on Feb 13th, '21, 10:44, edited 1 time in total.
dreamer88
 
Posts: 5
Joined: Feb 13th, '21, 02:01

Re: How to change automtic mount point of USB devices

Postby doktor5000 » Feb 13th, '21, 03:36

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to change automtic mount point of USB devices

Postby dreamer88 » Feb 13th, '21, 03:54

Many thanks, that worked!
dreamer88
 
Posts: 5
Joined: Feb 13th, '21, 02:01

Re: How to change automtic mount point of USB devices

Postby isadora » Feb 13th, '21, 09:36

Please mark the topic as solved by prefixing title in first message with [SOLVED].
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2742
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: [SOLVED] How to change automatic mount point of USB devi

Postby doktor5000 » Feb 13th, '21, 19:23

Please keep in mind that you would need to repeat this in the future for any udisks2 update. And easier workaround could be to simply create a symlink, e.g. /mnt2 which points to /run/media/username if you only want to type less.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] How to change automatic mount point of USB devi

Postby dreamer88 » Feb 14th, '21, 00:07

doktor5000 wrote:Please keep in mind that you would need to repeat this in the future for any udisks2 update.

Why do you think this would be the case?
The config file that I created according to the instructions (/etc/udev/rules.d/99-udisks2.rules) did not exist previously, so I don't think that it will be overwritten. Also shouldn't rpm create a .rpmnew file instead of just overwriting existing config files?

And easier workaround could be to simply create a symlink, e.g. /mnt2 which points to /run/media/username if you only want to type less.

I thought about that but on my other PCs (not running Mageia) I have the mount point under /media so it would be confusing having to type a different path on different PCs.
dreamer88
 
Posts: 5
Joined: Feb 13th, '21, 02:01

Re: [SOLVED] How to change automatic mount point of USB devi

Postby doktor5000 » Feb 14th, '21, 12:15

dreamer88 wrote:The config file that I created according to the instructions (/etc/udev/rules.d/99-udisks2.rules) did not exist previously, so I don't think that it will be overwritten. Also shouldn't rpm create a .rpmnew file instead of just overwriting existing config files?

My mistake, thought the change was to /usr/lib/udev/rules.d that's why I mentioned it. If you created it below /etc/udev/rules.d/ then it would overwrite the systemwide rules.
And rpm will only create .rpmnew file if something is marked as %config and I don't think those udev rules below /usr/lib/udev/rules.d are considered config files.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron