8

(Dist: Debian 10)

I have a reoccurring error message that mainly pops up when using systemctl (also when installing a package, and occasionally in a few other places that escape me),

Unit -.mount is masked.

Sometimes (depending on what command called the error message) it is more verbose, such as

Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount is masked.

This error doesn't impede installing packages or any systemd services which are enabled already (and as such are loaded at boot), but using systemctl or service to restart, start or stop a service fails. This means I have to reboot the whole server to restart a service, which can be a little annoying.

Trying to unmask the root mount with systemctl unmask -- -.mount appears to work (nothing is returned), but systemctl status -- -.mount still outputs the following after:

● -.mount - Root Mount
   Loaded: masked (Reason: Unit -.mount is masked.)
   Active: active (mounted) since Mon 2019-08-05 15:03:38 AEST; 4h 8min ago
    Where: /
     What: /dev/sde1
    Tasks: 0 (limit: 4915)
   Memory: 0B
   CGroup: /system.slice/-.mount

Any ideas? I'm don't want to start from a fresh install for this server, so either I find a fix or just deal with having to restart if I need to reload a service.

3

I was getting the same while performing step 6 in this answer: https://askubuntu.com/a/1028709/1003629.

By trial and error I found this was no longer an issue if I closed GParted.

Edit after I got three upvotes: it would appear gparted locks something, perhaps access to the partition table or a file that holds it, it would be great if someone can edit my answer to clarify this.

0

Had the same problem. I added sudo like this:

sudo systemctl unmask  -- -.mount

But the changes were not visible to me until I refreshed systemctl:

sudo systemctl daemon-reload

But still the changes were not visible when running systemctl unmask -- -.mount:

● -.mount - Root Mount
   Loaded: masked (Reason: Unit -.mount is masked.)
   Active: active (mounted) since Thu 2019-02-14 04:11:58 CST; 6 months 14 days ago
    Where: /
     What: /dev/mmcblk0p2
    Tasks: 0 (limit: 2077)
   Memory: 0B
   CGroup: /system.slice/-.mount

I had to reboot the system before systemctl unmask -- -.mount displayed anything different:

● -.mount - /
   Loaded: loaded (/etc/fstab; generated)
   Active: active (mounted) since Thu 2019-02-14 04:11:58 CST; 6 months 14 days 
    Where: /
     What: /dev/mmcblk0p2
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  • From what you describe that worked OK after a reboot. However, the action: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount is masked -- I unmasking your ROOT directory: "/". Check man systemd first, if you want to do this. – will Oct 5 at 15:23
0

You could try removing the -.mount

sudo rm /run/systemd/system/-.mount

and then reloading systemd

sudo systemctl daemon-reload

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.