Page 1 of 1

How to stop automounting hd partitions

Posted: Fri Feb 16, 2024 2:56 am
by bidral
Hello, I have installed MX Linux 23.2 KDE. Everything is going as expected for now. I hope it will continue well in the future.
The first thing I want to draw your attention to is that I don't want to automatically mount the extra partitions on my hard disk. How is this possible? I would be glad to know that. Thank you all

Re: How to stop automounting hd partitions

Posted: Fri Feb 16, 2024 3:36 am
by m_pav
Open Xfce Settings, look for Removeable Drives and Media, turn off the options you want to stop.
It's on my list of things to put right straight after a fresh installation.

Re: How to stop automounting hd partitions

Posted: Fri Feb 16, 2024 6:55 am
by dolphin_oracle
The user is using kde. But i presume there is a similar setting in dolphin.

To be clear just because extra partitions are listed doesn’t mean they are mounted. For internal devices you usually have to do something to mount them.

Re: How to stop automounting hd partitions

Posted: Fri Feb 16, 2024 8:22 am
by bidral
Thanks, but I can't find any option to disable partition mounting.

Re: How to stop automounting hd partitions

Posted: Fri Feb 16, 2024 8:23 am
by dolphin_oracle
I mean, the partitions shouldn't be automounting unless they are defined in your /etc/fstab.

otherwise they are just listed in dolphin, but not actually mounted.

there are some options under SystemSettings->Removable Storage. I'm not sure they apply to internal partitions, but they might. there is a "All Known Devices" option.

Re: How to stop automounting hd partitions

Posted: Fri Feb 16, 2024 9:27 am
by siamhie
@bidral Partitions in KDE (as well as XFCE, fluxbox) won't be automatically mounted at boot time unless you have edited your fstab to do so.

Here I'm booted into KDE (on a triple boot system) and only my root partition is mounted. The other four partitions are not mounted (orange icons next to them).

You can also hide partitions from the device section if you want. (right click on the device and select hide)

Code: Select all

$ blkid
/dev/nvme0n1p1: LABEL_FATBOOT="EFI-SYSTEM" LABEL="EFI-SYSTEM" UUID="D18B-2141" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="boot" PARTUUID="917d581a-0070-477e-8aea-3c3a30ddf25f"
/dev/nvme0n1p2: LABEL="root" UUID="2ddf2dad-ce02-49c0-bd7f-2c1df275b242" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="067de7a7-2442-468c-a309-f309b790f4a1"
/dev/sdb2: LABEL="swap" UUID="cff60e0f-9504-4506-897b-e1d32c646cc4" TYPE="swap" PARTLABEL="swap" PARTUUID="4665e3c7-2cdb-4e2c-a906-af074b10735c"
/dev/sdb1: LABEL="Stream" UUID="3a983c2f-21bf-4ec1-aa81-ca5f36570ba5" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="stream" PARTUUID="030a1960-13ae-4d07-8362-6f0e1fe447ff"
/dev/nvme1n1p2: LABEL="root" UUID="a00fe0ea-b5ac-4571-8ca3-5a5371578480" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="bae10767-ccc5-47ac-bae9-134a07da6f16"
/dev/nvme1n1p1: LABEL="root" UUID="74a0b2d6-f1c1-4d7c-8fb2-bfd21eeaefab" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="2c87e55f-c577-4c4e-8714-f428a03dab8c"
/dev/sda1: LABEL="Data" UUID="73184b5c-2cb1-48e2-9eb6-b38b2d2e0022" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="data" PARTUUID="ee705cc0-212b-48b4-99ef-31781d66422a"

Code: Select all

$ cat /etc/fstab
# Pluggable devices are handled by uDev, they are not in fstab
UUID=a00fe0ea-b5ac-4571-8ca3-5a5371578480 / ext4 discard,noatime 1 1
UUID=D18B-2141 /boot/efi vfat noatime,dmask=0002,fmask=0113 0 0
UUID=cff60e0f-9504-4506-897b-e1d32c646cc4 SWAP swap discard
dolphin.jpg

Re: How to stop automounting hd partitions  [Solved]

Posted: Fri Feb 16, 2024 9:42 am
by oops
... an easy way is via a GUI like: disk-manager

Re: How to stop automounting hd partitions

Posted: Sat Feb 17, 2024 4:54 pm
by pbear
@bidral, you can easily confirm what everyone is telling you. Open Konsole; run lsblk -f (that's an F). The last column will show which partitions are mounted.
Notice also in Dolphin the little x-in-an-orange-circle siamhe mentions, which correspond to the partitions shown by lsblk as not mounted.

Re: How to stop automounting hd partitions

Posted: Thu Feb 22, 2024 11:09 am
by bidral
Thanks,
I ran this command and got the following output.
$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sr0 iso9660 Joliet Extension HiSuite 2018-03-07-15-25-02-00
nvme0n1
├─nvme0n1p1 vfat FAT32 CD48-5D66 283.1M 5% /boot/efi
├─nvme0n1p2 ext4 1.0 rootMX23 25ff091c-cf73-4b4c-87d8-6c1a73570 34G 23% /
├─nvme0n1p3 ext4 1.0 homeMX 23fe1303-974b-4496-ac13-ac64705a0 134.6G 23% /home
├─nvme0n1p4 ext4 1.0 fdcadc00-c878-4208-a594-9b36cb899 73.6G 63% /media/nvme0n1p4
└─nvme0n1p5 swap 1 a840d296-6416-4b3e-8d85-7af1fca03 [SWAP]
I noticed that root permission is required to write anything to the extra partition of the hard disk. It's ok. But wanted the extra backup partition to remain unmounted until clicked it's name on file browser's sidebar. It is the default in LinuxMint mate.

Re: How to stop automounting hd partitions

Posted: Thu Feb 22, 2024 11:20 am
by bidral
Look at the screenshot. Does the 233.4 GB internal drive is not mounted?

Re: How to stop automounting hd partitions

Posted: Thu Feb 22, 2024 11:45 am
by Charlie Brown
bidral wrote: Thu Feb 22, 2024 11:09 am... wanted the extra backup partition to remain unmounted until clicked it's name on file browser's sidebar...
As already mentioned above: Either "Disk Manager" from menu, or manually:

Code: Select all

sudo nano /etc/fstab
Put a # at the beginning of the relevant line (generally begins with UUID=...), save (Ctrl+S), close (Ctrl+X).


(Or you can post the contents here)

Re: How to stop automounting hd partitions

Posted: Sun Feb 25, 2024 11:10 pm
by bidral
Output of that command is-

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

#Entry for /dev/nvme0n1p2 :
UUID=25ff091c-cf73-4b4c-87d8-6c1a95c73570 / ext4 discard,noatime 1 1
#Entry for /dev/nvme0n1p1 :
UUID=CD48-5D66 /boot/efi vfat noatime,dmask=0002,fmask=0113 0 0
#Entry for /dev/nvme0n1p3 :
UUID=23fe1303-974b-4496-ac13-ac6d584705a0 /home ext4 discard,noatime 1 2
#Entry for /dev/nvme0n1p5 :
UUID=a840d296-6416-4b3e-8d85-7af1fa39ca03 SWAP swap discard 0 0

Re: How to stop automounting hd partitions

Posted: Mon Feb 26, 2024 4:01 am
by Charlie Brown
So, your fstab is ok, there are no additional partitions to be auto-mounted there, just: ESP, home, root, swap

So, it seems you talk about this one:

nvme0n1p4 ext4 fdcadc00-c878-4208-a594-9b36cb899 73.6G 63% /media/nvme0n1p4

This (or any others) will not be mounted by themselves unless you click to open on left pane in file manager.


(Other settings in Thunar are related to "removable media" (like usb sticks etc.) to be auto-mounted or not, the moment they're plugged in.)

Re: How to stop automounting hd partitions [Solved]

Posted: Thu Feb 29, 2024 11:57 pm
by bidral
Thank you friends, My hope has been fulfilled.

I went to Disk Manager and unchecked the corresponding drive name. This has stopped automounting the extra partition in Dolphin. Thanks again to all my friends.

Although this is not a problem, I wrote the '[Solved]' in the title of this post.

The matter can be easily understood by looking at the attached pictures.

Re: How to stop automounting hd partitions

Posted: Fri Mar 01, 2024 1:45 am
by Eadwine Rose
For next time.. you can click the check mark in the top right of the post that has the solution. That will make it solved.