How do I disable the auto-mounting of internal drives in Ubuntu or Kubuntu 18.04
I'm aware that there are other questions regarding this issue. However, none of them apply specifically to Kubuntu 18.04, and the solutions they offer have not worked. Please look at what I have tried before marking this as a duplicate
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 automount
setting to false. I've done this using bothgsettings
from the command line as well as thedconf
gui 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 Devices
settings 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
fstab
along with anoauto
option. 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.
mount kubuntu automount
add a comment |
I'm aware that there are other questions regarding this issue. However, none of them apply specifically to Kubuntu 18.04, and the solutions they offer have not worked. Please look at what I have tried before marking this as a duplicate
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 automount
setting to false. I've done this using bothgsettings
from the command line as well as thedconf
gui 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 Devices
settings 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
fstab
along with anoauto
option. 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.
mount kubuntu automount
1
See unix.stackexchange.com/questions/170549/…
– Panther
Aug 6 '18 at 0:43
@Panther thanks, that worked. As the question/solution is for an older version of Linux, and specifically marked for openSUSE, do you want to write up your comment as an answer? Based on other questions, I think that this is a fairly common request, especially for Kubuntu.
– BrianHVB
Aug 7 '18 at 2:29
@BrianHVP go ahead , give credit as to the source
– Panther
Aug 7 '18 at 6:45
add a comment |
I'm aware that there are other questions regarding this issue. However, none of them apply specifically to Kubuntu 18.04, and the solutions they offer have not worked. Please look at what I have tried before marking this as a duplicate
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 automount
setting to false. I've done this using bothgsettings
from the command line as well as thedconf
gui 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 Devices
settings 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
fstab
along with anoauto
option. 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.
mount kubuntu automount
I'm aware that there are other questions regarding this issue. However, none of them apply specifically to Kubuntu 18.04, and the solutions they offer have not worked. Please look at what I have tried before marking this as a duplicate
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 automount
setting to false. I've done this using bothgsettings
from the command line as well as thedconf
gui 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 Devices
settings 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
fstab
along with anoauto
option. 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.
mount kubuntu automount
mount kubuntu automount
edited Jan 28 at 6:20
BrianHVB
asked Aug 6 '18 at 0:24
BrianHVBBrianHVB
1364
1364
1
See unix.stackexchange.com/questions/170549/…
– Panther
Aug 6 '18 at 0:43
@Panther thanks, that worked. As the question/solution is for an older version of Linux, and specifically marked for openSUSE, do you want to write up your comment as an answer? Based on other questions, I think that this is a fairly common request, especially for Kubuntu.
– BrianHVB
Aug 7 '18 at 2:29
@BrianHVP go ahead , give credit as to the source
– Panther
Aug 7 '18 at 6:45
add a comment |
1
See unix.stackexchange.com/questions/170549/…
– Panther
Aug 6 '18 at 0:43
@Panther thanks, that worked. As the question/solution is for an older version of Linux, and specifically marked for openSUSE, do you want to write up your comment as an answer? Based on other questions, I think that this is a fairly common request, especially for Kubuntu.
– BrianHVB
Aug 7 '18 at 2:29
@BrianHVP go ahead , give credit as to the source
– Panther
Aug 7 '18 at 6:45
1
1
See unix.stackexchange.com/questions/170549/…
– Panther
Aug 6 '18 at 0:43
See unix.stackexchange.com/questions/170549/…
– Panther
Aug 6 '18 at 0:43
@Panther thanks, that worked. As the question/solution is for an older version of Linux, and specifically marked for openSUSE, do you want to write up your comment as an answer? Based on other questions, I think that this is a fairly common request, especially for Kubuntu.
– BrianHVB
Aug 7 '18 at 2:29
@Panther thanks, that worked. As the question/solution is for an older version of Linux, and specifically marked for openSUSE, do you want to write up your comment as an answer? Based on other questions, I think that this is a fairly common request, especially for Kubuntu.
– BrianHVB
Aug 7 '18 at 2:29
@BrianHVP go ahead , give credit as to the source
– Panther
Aug 7 '18 at 6:45
@BrianHVP go ahead , give credit as to the source
– Panther
Aug 7 '18 at 6:45
add a comment |
1 Answer
1
active
oldest
votes
The Auto-mounting of disks in Debian-based Linux distros (and perhaps others) comes from a service called udisks2.
Disabling this service will prevent any disk from automatically being mounted, while still allowing manual mounting.
Disable the service - No automatic or manual starts
systemctl mask udisks2
Unmask the service - Will need to either manually run it or restart the computer
systemctl unmask udisks2
systemctl unmask udisk2.service
Stop the service temporarily - This will not persist across restarts
systemctl stop udisks2.service
Get the status
systemctl status udisk2
Credit to @maxschlepzig for answering a similar question about OpenSUSE.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1062719%2fhow-do-i-disable-the-auto-mounting-of-internal-drives-in-ubuntu-or-kubuntu-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The Auto-mounting of disks in Debian-based Linux distros (and perhaps others) comes from a service called udisks2.
Disabling this service will prevent any disk from automatically being mounted, while still allowing manual mounting.
Disable the service - No automatic or manual starts
systemctl mask udisks2
Unmask the service - Will need to either manually run it or restart the computer
systemctl unmask udisks2
systemctl unmask udisk2.service
Stop the service temporarily - This will not persist across restarts
systemctl stop udisks2.service
Get the status
systemctl status udisk2
Credit to @maxschlepzig for answering a similar question about OpenSUSE.
add a comment |
The Auto-mounting of disks in Debian-based Linux distros (and perhaps others) comes from a service called udisks2.
Disabling this service will prevent any disk from automatically being mounted, while still allowing manual mounting.
Disable the service - No automatic or manual starts
systemctl mask udisks2
Unmask the service - Will need to either manually run it or restart the computer
systemctl unmask udisks2
systemctl unmask udisk2.service
Stop the service temporarily - This will not persist across restarts
systemctl stop udisks2.service
Get the status
systemctl status udisk2
Credit to @maxschlepzig for answering a similar question about OpenSUSE.
add a comment |
The Auto-mounting of disks in Debian-based Linux distros (and perhaps others) comes from a service called udisks2.
Disabling this service will prevent any disk from automatically being mounted, while still allowing manual mounting.
Disable the service - No automatic or manual starts
systemctl mask udisks2
Unmask the service - Will need to either manually run it or restart the computer
systemctl unmask udisks2
systemctl unmask udisk2.service
Stop the service temporarily - This will not persist across restarts
systemctl stop udisks2.service
Get the status
systemctl status udisk2
Credit to @maxschlepzig for answering a similar question about OpenSUSE.
The Auto-mounting of disks in Debian-based Linux distros (and perhaps others) comes from a service called udisks2.
Disabling this service will prevent any disk from automatically being mounted, while still allowing manual mounting.
Disable the service - No automatic or manual starts
systemctl mask udisks2
Unmask the service - Will need to either manually run it or restart the computer
systemctl unmask udisks2
systemctl unmask udisk2.service
Stop the service temporarily - This will not persist across restarts
systemctl stop udisks2.service
Get the status
systemctl status udisk2
Credit to @maxschlepzig for answering a similar question about OpenSUSE.
answered Jan 28 at 6:19
BrianHVBBrianHVB
1364
1364
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1062719%2fhow-do-i-disable-the-auto-mounting-of-internal-drives-in-ubuntu-or-kubuntu-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
See unix.stackexchange.com/questions/170549/…
– Panther
Aug 6 '18 at 0:43
@Panther thanks, that worked. As the question/solution is for an older version of Linux, and specifically marked for openSUSE, do you want to write up your comment as an answer? Based on other questions, I think that this is a fairly common request, especially for Kubuntu.
– BrianHVB
Aug 7 '18 at 2:29
@BrianHVP go ahead , give credit as to the source
– Panther
Aug 7 '18 at 6:45