How to change pluggable device's mount point name

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
Dictador
Posts: 11
Joined: Tue Sep 05, 2023 3:44 pm

How to change pluggable device's mount point name

#1 Post by Dictador »

By default every usb drive I plug into a usb port is mounted at (toshiba external 2.5inch drive in this case):
'/media/username/TOSHIBA EXT'
The space in the path is causing a problem for me. How do I change the mount point, path name, etc?
/etc/fstab says it handled by udev, but I do not know what to do.

/etc/fstab

Code: Select all

# Pluggable devices are handled by uDev, they are not in fstab
UUID=7d09aa43-985d-42f7-8ad5-67c491c6d7a1 / ext4 discard,noatime 1 1
UUID=3826-7875 /boot/efi vfat noatime,dmask=0002,fmask=0113 0 0
UUID=270610a4-4ac4-4ad7-aa32-e83aca85d64c swap swap discard
Edit1: Disk manager allows me to change the name of the mount point but it is temporary only. I want the change to be permanent (e.g. '/media/username/TOSHIBA_EXT').
Options in disk manager:

Code: Select all

defaults,nodev,nosuid,uid=1000,gid=1000,windows_names,uhelper=udisks2
Edit2: I figured it out that "TOSHIBA EXT" is actually the disk label (ntfs) of the external drive. So renaming the disk should actually fix the problem with space in the path.
But how to avoid this problem on a system level without having to worry about the disk label I plug into usb port? I still would like to get the answer to the original question: How do I change the mount point, path name, etc? And how to avoid spaces in the mount path?

Edit3: A related question. I have partitioned my internal drive to three ext4 partitions. MX23 installed on one of them. MX23 automatically mounts one of the free ext4 partitions as '/media/username/Data2'. Where is that defined and how to customize it?
There is the third ext4 partition (nvme0n1p4) which does not get mounted automatically. Again, why and how to customize it?

Code: Select all

nvme0n1                                          238.5G 
├─nvme0n1p1 /boot/efi                EFI-SYSTEM    128M 3826-7875
├─nvme0n1p2 /                        rootMX23      127G 7d09aa43-985d-42f7-8ad5-67c491c6d7a1
├─nvme0n1p3 [SWAP]                   swapMX       15.6G 270610a4-4ac4-4ad7-aa32-e83aca85d64c
├─nvme0n1p4                                               Data1        63.5G 53d5a250-a33b-42ea-aa7a-e8476778eada
└─nvme0n1p5 /media/username/Data2       Data2        32.3G a57a5e7e-1aa0-4e9e-bfe9-aab02ea25a63

Linux MX23
Last edited by Dictador on Thu Sep 28, 2023 3:38 am, edited 5 times in total.

BitterTruth
Posts: 736
Joined: Tue Sep 22, 2020 7:36 pm

Re: How to change pluggable device's mount point name

#2 Post by BitterTruth »

Dolphin_Oracle explained it to someone on reddit a few weeks ago. You can try it:

https://www.reddit.com/r/MXLinux/commen ... e_at_boot/

I think you will need to create a folder and then use /etc/fstab to mount it to THAT FOLDER. He recommends the folder not be under your user.

User avatar
CharlesV
Administrator
Posts: 8129
Joined: Sun Jul 07, 2019 5:11 pm

Re: How to change pluggable device's mount point name

#3 Post by CharlesV »

Please post your QSI. ( MX Menu, Quick System Info, Copy for Forum, Paste here )

And yes, I believe the proper method is to create your mount point (I use what ever name in /mnt so .. /mnt/NAS or /mnt/ThumbDrive etc)

But not sure that you want to use fstab for this, I think it would be better to just setup a script to mount it and then run that script at login. I have had some seriously long pauses and a few issues with network and removable media mounting at the fstab level. ( Example: an 8tb removable drive - slowing machine reboots, and some times causing a 3 minute hang on startup. )

And bottom line for me - spaces are bad in ANY media name ;=/
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

BitterTruth
Posts: 736
Joined: Tue Sep 22, 2020 7:36 pm

Re: How to change pluggable device's mount point name

#4 Post by BitterTruth »

Good catch @CharlesV. It could also become a problem say, for example, if you forget to plug it in, fstab will keep looking for it.

User avatar
CharlesV
Administrator
Posts: 8129
Joined: Sun Jul 07, 2019 5:11 pm

Re: How to change pluggable device's mount point name

#5 Post by CharlesV »

:number1:
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

MXRobo
Posts: 1841
Joined: Thu Nov 14, 2019 12:09 pm

Re: How to change pluggable device's mount point name

#6 Post by MXRobo »

Possibly implied by others, some over my head, but /media displays in file manger, /mnt does not.
++EDIT++ Also, possibly show output of cat /etc/fstab Sorry
https://www.pathname.com/fhs/pub/fhs-2. ... MOUNTPOINT
Don't know udev.
Good Luck
Last edited by MXRobo on Thu Sep 28, 2023 9:48 am, edited 1 time in total.

User avatar
CharlesV
Administrator
Posts: 8129
Joined: Sun Jul 07, 2019 5:11 pm

Re: How to change pluggable device's mount point name

#7 Post by CharlesV »

MXRobo wrote: Wed Sep 27, 2023 3:18 pm Possibly implied by others, some over my head, but /media displays in file manger, /mnt does not.
Also, possibly show output of cat /etc/fstab
https://www.pathname.com/fhs/pub/fhs-2. ... MOUNTPOINT
Don't know udev.
Good Luck
Excellent point! mounting to /media/NAS does show the mount point in devices.

The only drawback I see to that is that the user may be misled about 'eject'. To my knowledge, Eject will not work on a mount. I will to test this to see if there are other drawbacks.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Dictador
Posts: 11
Joined: Tue Sep 05, 2023 3:44 pm

Re: How to change pluggable device's mount point name

#8 Post by Dictador »

What program mounts usb drives and where is the config file that controls its behavior?
The same about mounting internal drive partitions, where is a config file that controls this behavior?
nvme0n1p5 is mounted at /media/username/Data2 automatically by the system, but the entry is not in /etc/fstab. Where is a config file that controls this behavior?

Code: Select all

System:
  Kernel: 6.1.0-12-amd64 [6.1.52-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 clocksource: tsc
    available: acpi_pm parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-12-amd64 root=UUID=<filter> ro
    acpi_osi=linux quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23_x64 Libretto July 31  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: Dell product: Latitude 5500 v: N/A serial: <superuser required> Chassis:
    type: 10 serial: <superuser required>
  Mobo: Dell model: 0M14W7 v: A01 serial: <superuser required> UEFI: Dell v: 1.23.0
    date: 12/19/2022
Battery:
  ID-1: BAT0 charge: 50.3 Wh (100.0%) condition: 50.3/68.0 Wh (73.9%) volts: 8.3 min: 7.6
    model: LGC-LGC8.948 DELL X77XY06 type: Li-ion serial: <filter> status: full
CPU:
  Info: model: Intel Core i5-8365U bits: 64 type: MT MCP arch: Comet/Whiskey Lake note: check
    gen: core 8 level: v3 note: check built: 2018 process: Intel 14nm family: 6 model-id: 0x8E (142)
    stepping: 0xC (12) microcode: 0xF8
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 850 high: 1900 min/max: 400/4100 scaling: driver: intel_pstate
    governor: powersave cores: 1: 700 2: 700 3: 700 4: 700 5: 700 6: 1900 7: 700 8: 700
    bogomips: 30399
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling, PBRSB-eIBRS: SW
    sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620] vendor: Dell driver: i915 v: kernel
    arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: eDP-1
    empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:3ea0 class-ID: 0300
  Device-2: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 1-6:3 chip-ID: 0bda:5676 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99") s-diag: 414mm (16.31")
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x1500 built: 2018 res: 1366x768 hz: 60 dpi: 101
    gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5") ratio: 16:9 modes: 1366x768
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel UHD Graphics 620 (WHL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Cannon Point-LP High Definition Audio vendor: Dell driver: snd_hda_intel
    v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:9dc8
    class-ID: 0403
  API: ALSA v: k6.1.0-12-amd64 status: kernel-api with: aoss type: oss-emulator
    tools: alsactl,alsamixer,alsamixergui,amixer
  Server-1: PulseAudio v: 16.1 status: active tools: pacat,pactl,pavucontrol
Network:
  Device-1: Intel Ethernet I219-LM vendor: Dell driver: e1000e v: kernel port: N/A bus-ID: 00:1f.6
    chip-ID: 8086:15bd class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter vendor: Dell
    driver: ath10k_pci v: kernel modules: wl pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0
    chip-ID: 168c:003e class-ID: 0280 temp: 51.0 C
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Qualcomm Atheros driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1
    mode: 1.1 bus-ID: 1-10:4 chip-ID: 0cf3:e007 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 3 state: down bt-service: N/A rfk-block: hardware: no
    software: yes address: <filter>
  Info: acl-mtu: 1024:8 sco-mtu: 50:8 link-policy: rswitch hold sniff
    link-mode: peripheral accept
Drives:
  Local Storage: total: 2.05 TiB used: 254.6 GiB (12.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: PM991 NVMe 256GB size: 238.47 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 25311039 temp: 42.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Toshiba model: MQ04UBD200 size: 1.82 TiB block-size:
    physical: 512 B logical: 512 B type: USB rev: 3.0 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1
    tech: HDD rpm: 5400 serial: <filter> scheme: MBR
Partition:
  ID-1: / raw-size: 126.95 GiB size: 124.4 GiB (97.99%) used: 98.93 GiB (79.5%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 128 MiB size: 126 MiB (98.45%) used: 274 KiB (0.2%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: partition size: 15.62 GiB used: 304 MiB (1.9%) priority: -2
    dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 47.0 C pch: 42.0 C mobo: 38.0 C
  Fan Speeds (rpm): cpu: 0
Repos:
  Packages: pm: dpkg pkgs: 2619 libs: 1240 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian/ bookworm-updates non-free-firmware non-free contrib main
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian/ bookworm non-free-firmware non-free contrib main
    2: deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
Info:
  Processes: 297 Uptime: 3d 23h 52m wakeups: 25339 Memory: total: 16 GiB available: 15.44 GiB
  used: 4.66 GiB (30.2%) Init: SysVinit v: 3.06 runlevel: 5 default: graphical tool: systemctl
  Compilers: gcc: 12.2.0 alt: 12 Client: shell wrapper v: 5.2.15-release inxi: 3.3.29
Boot Mode: UEFI

BitterTruth
Posts: 736
Joined: Tue Sep 22, 2020 7:36 pm

Re: How to change pluggable device's mount point name

#9 Post by BitterTruth »

You can control automounting removable drives/devices through thunar.

Thunar-->Edit--->Preferences--->Advanced -------> Make sure Enable Volume Management is ticked then click on the 'configure' link under it. In the dialog box that comes up you will be able to untick automount etc.

Enable_Volume_Management.png
Removable_Drives_Media.png
You do not have the required permissions to view the files attached to this post.

Dictador
Posts: 11
Joined: Tue Sep 05, 2023 3:44 pm

Re: How to change pluggable device's mount point name

#10 Post by Dictador »

Thank you, that helps a bit.
Still, where is a config file that controls that behavior? Where do I define the mount point for automatically mounted devices?
/etc/fstab says that portable devices are handled by udev rules. There is a file /etc/udev/rules.d/90-usb-semiauto.rules but it is empty.

Post Reply

Return to “MX Help”