I am running Kubuntu 18.04 w/ KDE Plasma 5.12.6 off of a USB drive. This is a full install, not a Live version. The drive serves as a portable system that I can use with most physical computers.
To prevent any damage to the host computer's data. I do not want to automount any internal disk drives on boot. Even better, I'd like to completely disable those drives, so that even a normal
sudo mount /dev/sdx wouldn't work, but I'll settle for disabaling auto-mounting to start.
What I've tried
- The most commonly cited answer is to change the
org.gnome.desktop.media-handling automountsetting to false. I've done this using both
gsettingsfrom the command line as well as the
dconfgui editor. Both automount and automount-open are set to false
- Removing my account (and all accounts) from the plugdev group.
- Confirming that the "Enable automatic mounting of removable media" setting in the Kubuntu
Removeable Devicessettings module is unchcked.
After trying all of these and rebooting, Kubuntu still mounts all discovered partitions, both those on the flash drive and any found on internal drives.
Solutions that won't work
- The other oft-mentioned solution is to disable the auto-mounting of specific devices by adding the device
fstabalong with a
noautooption. This solution does not help in my scenario, as I do not know what devices will be present when the system starts up. I would need to somehow configure fstab to default with a noauto for all devices.