Bug 66784

Summary: systemd runs fsck for root filesystem twice
Product: systemd Reporter: Maxim Mikityanskiy <maxtram95>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: maxtram95
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: journalctl log
kernel config

Description Maxim Mikityanskiy 2013-07-10 16:41:01 UTC
Created attachment 82284 [details]
journalctl log

I'm on Gentoo with systemd 201 (the bug also reproduces with systemd 205). My hardware is Lenovo Ideapad Z570. I've made minimalistic installation of Gentoo with systemd, NetworkManager and bluez. If bluetooth.service is not enabled, startup runs flawlessly, but after enabling bluetooth.service I can see on console that fsck for root filesystem runs two times. I attach journalctl log with systemd debug turned on.

It seems that bluetooth.service pulls sysinit.target as dependency, when sysinit.target is not reached yet, but systemd-fsck-root.service is already done, so job for systemd-fsck-root.service is enqueued again.

I don't use initramfs. Also I attach my kernel config.
Comment 1 Maxim Mikityanskiy 2013-07-10 16:41:30 UTC
Created attachment 82285 [details]
kernel config
Comment 2 Zbigniew Jedrzejewski-Szmek 2013-08-05 03:10:58 UTC
Is the problem fixed if you add

/etc/systemd/system/systemd-fsck-root.service.d/remain.conf

containing 

RemainAfterExit=yes

?
Comment 3 Maxim Mikityanskiy 2013-08-08 22:27:32 UTC
(In reply to comment #2)
> Is the problem fixed if you add
> 
> /etc/systemd/system/systemd-fsck-root.service.d/remain.conf
> 
> containing 
> 
> RemainAfterExit=yes
> 
> ?

The problem is fixed if that file contains:

[Service]
RemainAfterExit=yes
Comment 4 Zbigniew Jedrzejewski-Szmek 2013-08-15 19:40:15 UTC
Fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=7b0a8fa.
Comment 5 Zbigniew Jedrzejewski-Szmek 2013-08-15 19:43:23 UTC
... actually http://cgit.freedesktop.org/systemd/systemd/commit/?id=d0a2d72.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.