Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #222364 > unrolled thread

binfmt-support cannot start at boot time because /var is not mounted

Started byDmitry Katsubo <dma_k@mail.ru>
First post2020-05-11 09:40 +0200
Last post2020-05-18 02:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  binfmt-support cannot start at boot time because /var is not mounted Dmitry Katsubo <dma_k@mail.ru> - 2020-05-11 09:40 +0200
    Re: binfmt-support cannot start at boot time because /var is not  mounted Reco <recoverym4n@enotuniq.net> - 2020-05-11 09:50 +0200
      Re: binfmt-support cannot start at boot time because /var is not  mounted Dmitry Katsubo <dma_k@mail.ru> - 2020-05-18 02:50 +0200

#222364 — binfmt-support cannot start at boot time because /var is not mounted

FromDmitry Katsubo <dma_k@mail.ru>
Date2020-05-11 09:40 +0200
Subjectbinfmt-support cannot start at boot time because /var is not mounted
Message-ID<A5bcC-Vj-13@gated-at.bofh.it>
Dear Debian users,

I am stuck with the following problem which I failed to debug on my Debian 10.3.

In my setup I have /var as mounted volume:

=== /etc/fatab ===
UUID=83a3cb60-3334-4d11-9fdf-70b8e8703167    /var    btrfs    noatime,nodev,nosuid,subvol=var
=== end ===

Unfortunately sometimes I notice that binfmt-support is tried to be started "before" /var is mounted. Once I login and restart the service (I don't mount and/or repair anything), it starts just fine.

=== console ===
root@debian:~ # systemctl status binfmt-support
* binfmt-support.service - Enable support for additional executable binary formats
   Loaded: loaded (/lib/systemd/system/binfmt-support.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-05-10 21:54:27 CEST; 10h ago
     Docs: man:update-binfmts(8)
  Process: 353 ExecStart=/usr/sbin/update-binfmts --enable (code=exited, status=2)
 Main PID: 353 (code=exited, status=2)

May 10 21:54:27 debian update-binfmts[353]: update-binfmts: unable to open /var/lib/binfmts: No such file or directory

root@debian:~ # ll /var/lib/binfmts
total 16
drwxr-xr-x 1 root  root  50 Mar 17 23:46 .
drwxr-xr-x 1 root  root 988 Mar  2 01:57 ..
-rw-r--r-- 1 root  root  49 Apr 14  2019 jar
-rw-r--r-- 1 root  root  59 Mar 17 23:46 python3.7

root@debian:~ # systemctl start binfmt-support
root@debian:~ # systemctl status binfmt-support
* binfmt-support.service - Enable support for additional executable binary formats
   Loaded: loaded (/lib/systemd/system/binfmt-support.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2020-05-11 09:01:04 CEST; 4s ago
     Docs: man:update-binfmts(8)
  Process: 9683 ExecStart=/usr/sbin/update-binfmts --enable (code=exited, status=0/SUCCESS)
 Main PID: 9683 (code=exited, status=0/SUCCESS)

May 11 09:01:04 debian systemd[1]: Starting Enable support for additional executable binary formats...
May 11 09:01:04 debian systemd[1]: Started Enable support for additional executable binary formats.

root@debian:~ # dpkg -l | grep -i systemd
ii  systemd   241-7~deb10u3     amd64   system and service manager
...
=== end ===

One time the system was started with even more units failed because of inaccessible /var. There is nothing special in these units, and I haven't modified any *.service files. In other words the
problem is floating, as number of failed unit varies from boot to boot.

The difficulty is that I don't know how to debug system start / systemd at such early stage of system boot.

Any help is appreciated.

-- 
With best regards,
Dmitry

[toc] | [next] | [standalone]


#222365 — Re: binfmt-support cannot start at boot time because /var is not mounted

FromReco <recoverym4n@enotuniq.net>
Date2020-05-11 09:50 +0200
SubjectRe: binfmt-support cannot start at boot time because /var is not mounted
Message-ID<A5bmi-Z2-11@gated-at.bofh.it>
In reply to#222364
	Hi.

On Mon, May 11, 2020 at 09:33:59AM +0200, Dmitry Katsubo wrote:

> root@debian:~ # systemctl status binfmt-support
> * binfmt-support.service - Enable support for additional executable binary formats
>    Loaded: loaded (/lib/systemd/system/binfmt-support.service; enabled; vendor preset: enabled)
>    Active: failed (Result: exit-code) since Sun 2020-05-10 21:54:27 CEST; 10h ago
>      Docs: man:update-binfmts(8)
>   Process: 353 ExecStart=/usr/sbin/update-binfmts --enable (code=exited, status=2)
>  Main PID: 353 (code=exited, status=2)
> 
> May 10 21:54:27 debian update-binfmts[353]: update-binfmts: unable to open /var/lib/binfmts: No such file or directory
>
> Any help is appreciated.

This should help your problem:

mkdir /etc/systemd/system/binfmt-support.service.d

cat > /etc/systemd/system/binfmt-support.service.d/override.conf << EOF
[Unit]
RequiresMountsFor=/var
EOF

Reco

[toc] | [prev] | [next] | [standalone]


#222605 — Re: binfmt-support cannot start at boot time because /var is not mounted

FromDmitry Katsubo <dma_k@mail.ru>
Date2020-05-18 02:50 +0200
SubjectRe: binfmt-support cannot start at boot time because /var is not mounted
Message-ID<A7C8F-44g-3@gated-at.bofh.it>
In reply to#222365
On 2020-05-11 20:11, Darac Marjal wrote:
> On 11/05/2020 08:40, Reco wrote:
>> 	Hi.
>>
>> On Mon, May 11, 2020 at 09:33:59AM +0200, Dmitry Katsubo wrote:
>>
>>> root@debian:~ # systemctl status binfmt-support
>>> * binfmt-support.service - Enable support for additional executable binary formats
>>>    Loaded: loaded (/lib/systemd/system/binfmt-support.service; enabled; vendor preset: enabled)
>>>    Active: failed (Result: exit-code) since Sun 2020-05-10 21:54:27 CEST; 10h ago
>>>      Docs: man:update-binfmts(8)
>>>   Process: 353 ExecStart=/usr/sbin/update-binfmts --enable (code=exited, status=2)
>>>  Main PID: 353 (code=exited, status=2)
>>>
>>> May 10 21:54:27 debian update-binfmts[353]: update-binfmts: unable to open /var/lib/binfmts: No such file or directory
>>>
>>> Any help is appreciated.
>> This should help your problem:
>>
>> mkdir /etc/systemd/system/binfmt-support.service.d
>>
>> cat > /etc/systemd/system/binfmt-support.service.d/override.conf << EOF
>> [Unit]
>> RequiresMountsFor=/var
>> EOF
> 
> As another alternative, one can run "systemctl edit
> binfmt-support.service", which will create the intervening folders and
> files for you, and reload the daemon if the editor exits with success.

Thanks for suggestion! I have tried the advise and it actually worked
(I will keep an eye on that because one reboot may not be representative).
I wonder nevertheless what is the problem with this specific unit? It has
dependency on local-fs.target which in turn should mount /var. So what
exactly went wrong?

-- 
With best regards,
Dmitry

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web