5

I have had this on problem on different machines using Ubuntu 19.04 after recent updates, and I became intensly curious after my DVD and USB drives started having trouble mounting.

During the apt processing I see:

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

This message comes-up at different times. I am concerned that it has something to do with a failure for removable media to automount recently. For example:

 $ sudo apt update
 Hit:1 http://au.archive.ubuntu.com/ubuntu disco InRelease
 Get:2 http://au.archive.ubuntu.com/ubuntu disco-updates InRelease [97.5 kB]                                                              
 Get:3 http://au.archive.ubuntu.com/ubuntu disco-backports InRelease [88.8 kB]                                                            
 Hit:4 https://dl.yarnpkg.com/debian stable InRelease                                                                                     
 Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease                                                                             
 Get:6 http://security.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]                                                               
 Hit:7 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu disco InRelease                                              
 Hit:8 http://dl.google.com/linux/chrome/deb stable Release                                                                               
 Hit:10 https://packages.microsoft.com/repos/vscode stable InRelease                                                                      
 Hit:11 http://ppa.launchpad.net/teejee2008/ppa/ubuntu disco InRelease                                      
 Fetched 284 kB in 2s (168 kB/s)                           
 Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount is masked.
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 All packages are up to date.

After issuing a ...

 $ sudo apt upgrade 

... command this morning, none of my USB drives auto-mount when they are plugged-in to my laptop. I had this on my desktop yesterday (again following recent apt upgrade-ing). And I'm smelling something fishy.

Another issue that may be related is that (read-only) DVD-s can't be read correctly. First they won't mount unless I use Disks (GUI) to mount them and then VLC and dvd-backup don't seem to find the titles, etc.

Everything comes back to: "Unit -.mount is masked." (see later).

My understanding of things in the systemd world is that "-.mount" is root(/). I am looking for information to help me find a better solution that unmask-ing root.

Is there a way to put things right again?

related questions:

investigations:

I'm documenting troubleshooting I've looked at so far for this problem first before just re-enabling things before checking first?

I've done some digging because it was a surprise to me that I had things "UnitMasked" at all ... What is "masked"? From the man page --

$ man systemctrl 

  :
mask UNIT...
       Mask one or more units, as specified on the command line. This will link these unit files to /dev/null, making it
       impossible to start them. This is a stronger version of disable, since it prohibits all kinds of activation of the unit,
       including enablement and manual activation. Use this option with care. 
 : 

Which package or thing is giving me bother?

That's not a straightforward question to answer -- As I understand it the message I saw on the console was:

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

Which begs the question, what is: '-.mount' in this context?

Mu review of the information so far in my inquirey is/was that a 'Unit' used by a SystemD 'package' has trouble with something called "-.mount". The first thing I thought to consider was to determine what package was having issues and that is definitely something that was surprisingly less simple to do with the tools I have to hand (or that I know about). Please suggest better tools for managing and troubleshooting systemd sfuff you have some recommendations.

For me I decided to look through all the active services and see which one(s) are generating that problem. I would up making a short bash script that xargs can invoke to poke the service {} status and add some formatting:

 #!/bin/bash
 #   file: tmp.bash
 ################################

 svice="${1}"

 echo "------[${svice}]-----"
 service "${svice}"  status
 echo "        ======"
 echo

And call this for each active service from systemd ...

 service  --status-all | fgrep "[ + ]" | awk -e '{ print $4 }' | xargs -i  ./tmp/tmp.bash "{}"  \; | less

I needed to add less to the end to avoid 22 of the automatic paging-s that the status command gives by default.

The outcome of scanning this output for "-.mount" was:

 ------[dbus]-----
 ● dbus.service - D-Bus System Message Bus
    Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
    Active: active (running) since Wed 2019-09-11 17:32:39 AEST; 1 weeks 1 days ago
      Docs: man:dbus-daemon(1)
  Main PID: 1011 (dbus-daemon)
     Tasks: 1 (limit: 4915)
    Memory: 5.7M
    CGroup: /system.slice/dbus.service
            └─1011 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

 Sep 20 10:32:50 4TELLT70 dbus-daemon[1011]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.6013' (uid=0 pid=23179 comm="/usr/bin/gdbus call --system --dest org.freedeskto" label="kernel")
 Sep 20 10:32:50 4TELLT70 dbus-daemon[1011]: [system] Activation via systemd failed for unit 'packagekit.service': Unit -.mount is masked.
 Sep 20 10:32:53 4TELLT70 dbus-daemon[1011]: [system] Activating via systemd: service name='org.freedesktop.fwupd' unit='fwupd.service' requested by ':1.367' (uid=1000 pid=9453 comm="/usr/bin/gnome-software --gapplication-service " label="kernel")
 Sep 20 10:32:53 4TELLT70 dbus-daemon[1011]: [system] Activation via systemd failed for unit 'fwupd.service': Unit -.mount is masked.
 Sep 20 10:36:08 4TELLT70 dbus-daemon[1011]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.6057' (uid=0 pid=24456 comm="/usr/bin/gdbus call --system --dest org.freedeskto" label="kernel")
 Sep 20 10:36:08 4TELLT70 dbus-daemon[1011]: [system] Activation via systemd failed for unit 'packagekit.service': Unit -.mount is masked.
 Sep 20 10:36:08 4TELLT70 dbus-daemon[1011]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.6057' (uid=0 pid=24456 comm="/usr/bin/gdbus call --system --dest org.freedeskto" label="kernel")
 Sep 20 10:36:08 4TELLT70 dbus-daemon[1011]: [system] Activation via systemd failed for unit 'packagekit.service': Unit -.mount is masked.
 Sep 20 10:36:14 4TELLT70 dbus-daemon[1011]: [system] Activating via systemd: service name='org.freedesktop.fwupd' unit='fwupd.service' requested by ':1.367' (uid=1000 pid=9453 comm="/usr/bin/gnome-software --gapplication-service " label="kernel")
 Sep 20 10:36:14 4TELLT70 dbus-daemon[1011]: [system] Activation via systemd failed for unit 'fwupd.service': Unit -.mount is masked.
         ======

Which can be summarised as the following packages:

  • packagekit.service
  • fwupd.service

Following that-up I found this natty little command:

 systemctl list-unit-files

Which gives a HUGE list of units and status. Looking for unmasked unit-s seemed a fair question...

 $ systemctl list-unit-files | fgrep "masked"
 -.mount                                    masked-runtime 
 boot-efi.mount                             masked-runtime 
 boot.mount                                 masked-runtime 
       :
     56 results
       :
 umountroot.service                         masked         
 x11-common.service                         masked   

 $ systemctl list-unit-files | fgrep masked | fgrep fwupd
 $ systemctl list-unit-files | fgrep masked | fgrep package

And this give me 56 units to scan. None are: packagekit nor fwupd.

The unit syntax: -.mount threw me until I saw this: "with slashes changed to dashes" under .mount in the article[1] linked below:

  • .mount: This unit defines a mountpoint on the system to be managed by systemd. These are named after the mount path, with slashes changed to dashes. Entries within /etc/fstab can have units created automatically.
  • .automount: An .automount unit configures a mountpoint that will be automatically mounted. These must be named after the mount point they refer to and must have a matching .mount unit to define the specifics of the mount.

A key thing for me is that the dash("-") is said to represent the slash(/) in the path -- making this root.

As I understand this, then: "-.mount" is: "/" (root). Is that not so?

With this knowledge in hand I attempted the unmask and restart activity

  $ sudo systemctl unmask packagekit.service
  $ sudo service packagekit restart
 Failed to restart packagekit.service: Unit -.mount is masked.
  $ sudo systemctl restart packagekit.service
 Failed to restart packagekit.service: Unit -.mount is masked.

Update one

There was an Ubuntu update today. The problem persists. I have previously found that the DVD issue was to do with codec and that's resolved.

Also I am showing the listing requested

  • lsblk -f
  • cat /etc/fstab

Toward the end of the upgrade there was again an error relating to umount issues.

$ sudo apt upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
bluez bluez-cups bluez-obexd e2fsprogs libbluetooth3 libcom-err2 libext2fs2 libsdl2-2.0-0 libss2 libssl1.1 netplan.io openssl
qemu-block-extra qemu-kvm qemu-system-common qemu-system-data qemu-system-gui qemu-system-x86 qemu-utils tzdata yarn
21 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
Need to get 13.2 MB of archives.
After this operation, 66.6 kB of additional disk space will be used.
Get:1 http://au.archive.ubuntu.com/ubuntu disco-updates/main amd64 libext2fs2 amd64 1.44.6-1ubuntu0.1 [160 kB]
Get:2 https://dl.yarnpkg.com/debian stable/main amd64 yarn all 1.19.0-1 [890 kB]  

Current default time zone: 'Australia/Sydney'
Local time is now:      Fri  4 Oct 00:04:06 AEST 2019.
Universal Time is now:  Thu Oct  3 14:04:06 UTC 2019.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up bluez (5.50-0ubuntu2.1) ...
Failed to restart bluetooth.service: Unit -.mount is masked.
invoke-rc.d: initscript bluetooth, action "restart" failed.
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-09-19 08:26:47 AEST; 2 weeks 0 days ago
    Docs: man:bluetoothd(8)
Main PID: 1451 (bluetoothd)
Status: "Running"
    Tasks: 1 (limit: 4915)
Memory: 2.8M
CGroup: /system.slice/bluetooth.service
        └─1451 /usr/lib/bluetooth/bluetoothd

Oct 03 07:29:21 woodypear bluetoothd[1451]: Endpoint unregistered: sender=:1.15593 path=/MediaEndpoint/A2DPSource
Oct 03 07:29:21 woodypear bluetoothd[1451]: Endpoint unregistered: sender=:1.15593 path=/MediaEndpoint/A2DPSink
Oct 03 07:29:25 woodypear bluetoothd[1451]: Loading LTKs timed out for hci0
Oct 03 07:29:25 woodypear bluetoothd[1451]: Endpoint registered: sender=:1.15593 path=/MediaEndpoint/A2DPSource
Oct 03 07:29:25 woodypear bluetoothd[1451]: Endpoint registered: sender=:1.15593 path=/MediaEndpoint/A2DPSink
Oct 03 20:36:54 woodypear bluetoothd[1451]: Endpoint unregistered: sender=:1.15593 path=/MediaEndpoint/A2DPSource
Oct 03 20:36:54 woodypear bluetoothd[1451]: Endpoint unregistered: sender=:1.15593 path=/MediaEndpoint/A2DPSink
Oct 03 20:36:58 woodypear bluetoothd[1451]: Loading LTKs timed out for hci0
Oct 03 20:36:58 woodypear bluetoothd[1451]: Endpoint registered: sender=:1.15593 path=/MediaEndpoint/A2DPSource
Oct 03 20:36:58 woodypear bluetoothd[1451]: Endpoint registered: sender=:1.15593 path=/MediaEndpoint/A2DPSink
dpkg: error processing package bluez (--configure):
installed bluez package post-installation script subprocess returned error exit status 1
Setting up libss2:amd64 (1.44.6-1ubuntu0.1) ...
Setting up qemu-system-data (1:3.1+dfsg-2ubuntu3.5) ...
Setting up bluez-cups (5.50-0ubuntu2.1) ...
Setting up libbluetooth3:amd64 (5.50-0ubuntu2.1) ...
Setting up yarn (1.19.0-1) ...
Setting up libsdl2-2.0-0:amd64 (2.0.9+dfsg1-1ubuntu1.19.04.1) ...
Setting up openssl (1.1.1b-1ubuntu2.4) ...
Setting up qemu-block-extra:amd64 (1:3.1+dfsg-2ubuntu3.5) ...
Setting up qemu-system-common (1:3.1+dfsg-2ubuntu3.5) ...
Failed to restart qemu-kvm.service: Unit -.mount is masked.
Failed to try-restart qemu-kvm.service: Unit -.mount is masked.
Setting up qemu-system-x86 (1:3.1+dfsg-2ubuntu3.5) ...
Setting up e2fsprogs (1.44.6-1ubuntu0.1) ...
update-initramfs: deferring update (trigger activated)
Setting up qemu-utils (1:3.1+dfsg-2ubuntu3.5) ...
Setting up qemu-kvm (1:3.1+dfsg-2ubuntu3.5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for dbus (1.12.12-1ubuntu1.1) ...
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Processing triggers for systemd (240-6ubuntu5.7) ...
Processing triggers for initramfs-tools (0.131ubuntu19.1) ...
update-initramfs: Generating /boot/initrd.img-5.2.9-050209-generic
Errors were encountered while processing:
bluez
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount is masked.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Block devices / lsblk -f:

I would have excised the snap related mounts except that this may actually be related. I have not been able to use lxd and the only install available seems to be the snap.

 $ sudo lsblk -f
NAME        FSTYPE   LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0       squashfs                                                     0   100% /snap/lxd/11985
loop1       squashfs                                                     0   100% /snap/core/7396
loop2       squashfs                                                     0   100% /snap/fwupd/880
loop3       squashfs                                                     0   100% /snap/gnome-system-monitor/100
loop5       squashfs                                                     0   100% /snap/core18/1098
loop6       squashfs                                                     0   100% /snap/gnome-characters/296
loop7       squashfs                                                     0   100% /snap/gnome-3-26-1604/92
loop8       squashfs                                                     0   100% /snap/gnome-logs/73
loop9       squashfs                                                     0   100% /snap/gnome-3-28-1804/67
loop10      squashfs                                                     0   100% /snap/gnome-characters/317
loop11      squashfs                                                     0   100% /snap/gnome-calculator/406
loop12      squashfs                                                     0   100% /snap/gtk-common-themes/1313
loop13      squashfs                                                     0   100% /snap/gtk-common-themes/1198
loop15      squashfs                                                     0   100% /snap/gnome-3-26-1604/90
loop16      squashfs                                                     0   100% /snap/core/7713
loop17      squashfs                                                              
loop18      squashfs                                                     0   100% /snap/gnome-system-monitor/95
loop19      squashfs                                                     0   100% /snap/core18/1144
loop20      squashfs                                                     0   100% /snap/gnome-3-28-1804/71
loop21      squashfs                                                     0   100% /snap/gnome-calculator/501
loop22      btrfs    default  ea3db848-1e70-4c8a-b602-66f3efXXXX                
loop23      squashfs                                                     0   100% /snap/fwupd/1023
loop24      squashfs                                                     0   100% /snap/lxd/11964
loop25      squashfs                                                     0   100% /snap/gnome-logs/81
sda                                                                               
├─sda1      vfat              5888-2C75                            1013.2M     1% /boot/efi
├─sda2      ext4              fa69a588-5a3c-4f5d-beff-d5c5f7XXXX     30.5G    46% /
├─sda3      ext4     Backup   81b6a1e3-0674-4c8c-b5ff-80010fXXXX    104.8G    46% /Backup
└─sda5      ext4     Moort    c88ac1c9-9c80-4d56-9faf-5a3210XXXX    115.6G    87% /Moort
sdb                                                                               
└─sdb1      btrfs    zpanda   353f4608-a9be-464e-b9e5-6e53771XXX    779.3G    79% /mnt/Zpanda
sdc                                                                               
└─sdc1      ntfs     Xpanda   7CF02B31F02AXXX                        1.5T    17% /mnt/Xpanda
sdd                                                                               
└─sdd1      vfat     ALEX-06  38BF-XXX                               8.2G    86% /media/username/AAAAA
sde                                                                               
└─sde1      exfat    GGGGGG    C3EC-XXX                             117.2G     2% /media/username/GGGGGG
sr0                                                                               

The USB labeled "GGGGGG" didn't auto-mount. It is inconsistient in this way. Sometimes it automounts, others not. It was formatted with the Ubutnu supplied exfat that come with the drives utility.

Mounts / cat /etc/fstab:

I believe the mount error refers to systemd modules not drives (however it is OK with me to discover I'm not on the right track).

 $ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#   <file system>                        <mount point>        <type>    <options>           <dump>  <pass>
#
#   / was on /dev/sda2 during installation
#
    UUID=fa69a588-5a3c-4f5d-beff-d5c5f70XXXX    /               ext4    errors=remount-ro   0       1

##
#   /boot/efi was on /dev/sda1 during installation
#
    UUID=5888-XXXX                              /boot/efi       vfat    umask=0077          0       1

##
#   /Moort partition
#
    UUID=c88ac1c9-9c80-4d56-9faf-5a3210XXXX     /Moort          ext4    defaults            0       1
    /Moort/work                                 /work           none    bind

##
#   /Backup partition
#
    UUID=81b6a1e3-0674-4c8c-b5ff-80010XXXX      /Backup         ext4    defaults            0       2

##
#   /mnt/Xpanda partition
#
    UUID=7CF02B31F0XXXX                         /mnt/Xpanda     ntfs   umask=007,fmask=137,dmask=027,uid=XXXX,gid=XXXXX,nls=utf8,utf8      0       2

##
#   /mnt/Zpanda partition
#
    UUID=353f4608-a9be-464e-b9e5-6e53771XXXX    /mnt/Zpanda     btrfs   defaults            0       1

##
#
    /swapfile                                   none            swap    sw                  0       0

references:

2
  • 1
    A short update. The DVD troubles were due to a missing or corrupted libdvdcss install. It is unlikely to be related. One of those conicidences I guess.
    – will
    Sep 26, 2019 at 12:59
  • sudo lsblk -f and cat /etc/fstab please.
    – nobody
    Sep 28, 2019 at 7:27

0

You must log in to answer this question.

Browse other questions tagged .