0

So, once again, I performed an innocent-looking action in Linux, and not I can't put it back the way it was before.

The other day, I was trying to find something in the file system. (Usually, I use Dolphin, but this guide said I could find it more easily in Nautilus/Files in gnome.) While inside the "Files" app, I clicked on "Other Locations", and one of my hard disks was listed there. After clicking on it, I was prompted to mount that partition. I did not want to mount it, as it is one of the boot partitions, and was already mounted.

enter image description here

enter image description here

But now, each time I restart the computer, the same prompt pops up on login.

I have mounted it, and unmounted it. Everything is fine, it just mounts the already exisiting "/boot" partition to "/media/$USERNAME" which is silly and unnecessary.

I have:

  • looked through Autostart
  • looked through my list of devices
  • modified "/etc/fstab" and added this particular UUID with the "noauto" option

Nothing seems to change, either good or bad.

How can I find this location and get rid of the prompt on each login?

(The removable devices panel was interesting, as it had this trouble partition all by itself under "Attached Devices", but I cannot seem to make any changes here, or mark it to NOT be automatically mounted.)

enter image description here

2
  • Try supplying the password to mount it and then click the eject button in the file manager? Commented Oct 27, 2024 at 4:10
  • A good thought, but the only option I have in Dolphin and Files is "Unmount". That is fine, until the next reboot when the prompt returns. Commented Oct 27, 2024 at 13:18

2 Answers 2

2

In the Removable Devices dialog, uncheck the Automatically mount all removable media at login and/or Automatically mount all removable media when attached checkboxes, and the list of devices below should become available for changes.

Then you should be able to select the 488.0 MiB Hard Drive line, and make sure the On Login and On Attach checkboxes for it are unchecked. You probably won't be able select Forget device for devices that are currently attached to the system.

(The logic of the dialog seems to be: as long as the checkboxes above set a standing order to mount all removable devices, they will take priority over any per-device settings.)

Adding a /etc/fstab line with a noauto option is not related to the udisks subsystem at all, and may actually be harmful if it causes a boot partition to remain unmounted while your distribution's update installation system expects it to be mounted.

6
  • In Removable Devices, unchecking the box "Automatically mount all removable devices at login" does indeed cause the prompt to not show up anymore on login. THANK YOU! This is a partial success, as changing global configuration is less preferable than changing any per-device setting... still trying to figure out what the per-device setting is located. Commented Oct 27, 2024 at 17:17
  • Marking this (tentatively) as accepted, since it does indeed solve the original problem with the prompt during each login. (Would still be interested in figuring out why this non-removable hard disk is now being recognized as a removable device.) Commented Oct 27, 2024 at 17:18
  • See man udisks: there are udev properties named UDISKS_SYSTEM and UDISKS_IGNORE which can be used as hints for udisksd to not touch a particular block device. You can find standard rules in /usr/lib/udev/rules.d/80-udisks2.rules, but those rules are not yet perfect and your system may contain partitions or other block devices you might want to add custom exclusion rules for. Commented Oct 28, 2024 at 18:49
  • The Debian 11 version says "Do not edit this file, it will be overwritten on updates". Makes sense. Commented Oct 28, 2024 at 20:37
  • Indeed you should not add your custom rules in the same file, but into e.g. /etc/udev/rules.d/80-local-udisks2.rules if you just need to add some rules specific to your system. If you need to remove rules from the standard rules file, copy it (keeping the same name) from /usr/lib/udev/rules.d/ to /etc/udev/rules.d/ and then modify the copy: any file in /etc/udev/rules.d/ will override a file with the same name in /usr/lib/udev/rules.d/. In any case, reading the standard rules file should help in understanding the syntax. Commented Oct 28, 2024 at 20:44
0

So, I will be the first to admit that I am unsure what happened recently to cause this (this desktop and disks had a clean install done three years ago, and nothing has been -- intentionally -- changed about the partitions).

The partition in question was one of several partitions on the boot drive. The one is question is not the primary boot drive, and was not being mounted during startup. During login, the unmounted partition was listed as a "removable" device, and udisks was trying to mount it, and prompting each time.

The solution was simply to have the partition mounted during startup (prior to login). This can be done by adding the partition to "/etc/fstab", or by using the "Disks" utility. Now the drive is being mounted to "/mnt/${UUID}", which I think is fine. (remaining questions: was the partition being mounted before? if so, what location was being used? and if so, what changed recently that caused the partition to not be mounted any longer? the world will never know)

This Q+A was helpful:

https://askubuntu.com/q/341642/1199345


Steps using the GUI:

  • Start the 'Disks' utility
  • Select your disk/partition
  • Click the little button for "Additional partition options"
  • Select "Edit mount options..."
  • Uncheck "User Session Defaults", which enables more choices
  • Make sure "Mount at system startup" is checked

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.