Use Systemd to Mount devices: "What=" setting missing

Hello,

Thanks to @Mirdarthos for some initial help. New post here as requested.

I did this a while back for and external HDD. It worked and still is, but while doing the same thing for an SSD partition, I get errors about the “What=” setting missing, so I haven’t got to the .automount file yet:

systemctl status automounts-lutrisdisc.mount
○ automounts-lutrisdisc.mount - /automounts/lutrisdisc
     Loaded: bad-setting (Reason: Unit automounts-lutrisdisc.mount has a bad unit file setting.)
     Active: inactive (dead)
      Where: /automounts/lutrisdisc

Sep 26 19:19:09 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:1: Unknown section 'unit'. Ignoring.
Sep 26 19:19:09 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:5: Unknown section 'mount'. Ignoring.
Sep 26 19:19:09 leebut-Manjaro systemd[1]: automounts-lutrisdisc.mount: What= setting is missing. Refusing.
Sep 26 19:19:09 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:1: Unknown section 'unit'. Ignoring.
Sep 26 19:19:09 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:5: Unknown section 'mount'. Ignoring.
Sep 26 19:35:55 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:1: Unknown section 'unit'. Ignoring.
Sep 26 19:35:55 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:5: Unknown section 'mount'. Ignoring.
Sep 26 19:35:55 leebut-Manjaro systemd[1]: automounts-lutrisdisc.mount: What= setting is missing. Refusing.
Sep 26 19:35:55 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:1: Unknown section 'unit'. Ignoring.
Sep 26 19:35:55 leebut-Manjaro systemd[1]: /etc/systemd/system/automounts-lutrisdisc.mount:5: Unknown section 'mount'. Ignoring.

lsblk -no UUID /dev/sdc6 returned:
4822c45a-e7ff-4743-aebb-622dfab02b6f

Here’s the automounts-lutrisdisc.mount file:

[Unit]

Description = Mount Lutris Disc (/automounts/lutrisdisc)

[Mount]
What = /dev/disk/by-uuid/4822c45a-e7ff-4743-aebb-622dfab02b6f
Where = /automounts/lutrisdisc
type = ext4
options = defaults,rw,noatime

I thought I just needed to replicate what I did before. Perhaps something has changed.

I have the directory tree. webdev is working fine. That’s on a HDD. I did make the lutrisdisc directory manually.
/
├── automounts
│ ├── lutrisdisc
│ └── webdev

Yes, I have done that a few times.

1 Like

I see lots of spaces. Don’t do this.

1 Like
1 Like

Thanks @xabbu, I did originally have the lines without spaces between ‘=’; same result.

The solution was @linux-aarhus’s post regarding the capitalisation and the [Install] WantedBy=multi-user.target.

It is strange though because I copied an existing file that has been working for a long time, and just changed the disc details.

Thanks all for your help with this.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.