Bug 75515 - boot failure if /var/run is not a symlink to /run , dbus should create its socket in /run not /var/run
Summary: boot failure if /var/run is not a symlink to /run , dbus should create its so...
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-26 01:04 UTC by Adam Williamson
Modified: 2014-02-26 04:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Adam Williamson 2014-02-26 01:04:40 UTC
After updating to systemd 210, my Fedora Rawhide desktop failed to boot. Thanks to krh, it seems this was because /var/run was not a symlink to /run: krh says systemd expects dbus' socket to be in /run , but dbus puts it in /var/run . If they are symlinks, this doesn't matter, but if they aren't, it very much does matter.

Older Fedora installations won't have the symlink setup, and we don't have a hook in fedup to turn it into a symlink at present, I don't think. It would be good to make things work with a separate /var/run at least where possible.
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-02-26 01:31:03 UTC
We hardly can start going back and moving everything things to /var/run.
This discussion happened in Fedora in https://bugzilla.redhat.com/show_bug.cgi?id=825466. dbus.socket should be fixed to point to use /run.
Comment 2 Adam Williamson 2014-02-26 01:34:32 UTC
dbus is in freedesktop.org too...

dbus devs, I think /usr/lib/systemd/system/dbus.socket needs this change:

-ListenStream=/var/run/dbus/system_bus_socket
+ListenStream=/run/dbus/system_bus_socket
Comment 3 Lennart Poettering 2014-02-26 01:43:18 UTC
Humm, no.

the dbus spec says /var/run is where the socket has to be. I see no reason to change that. That path is compiled into a myriad of programs, and there's really no point in changing that.

/var/run must be a symlink to /run, end of story. If FEdora doesn't get that right, then Fedora is broken.

Note however that actually the upgrade logic back when the /run transition happened (which is years ago) carefully made sure that /var/run was turned into a symlink. If that didn't happen for you, then there must have been a bug in that, or you didn't follow the usual upgrade procedure? (maybe bcause you updated manually with just naked rpm? but in that case, you of course get to keep both pieces...)

Anyway, I am pretty sure neither dbus nor systemd should be changed here. If anything, Fedora should be fixed.
Comment 4 Adam Williamson 2014-02-26 01:50:02 UTC
Ah, this was all part of /usr merge? If the dracut hook for that handles it, then it usually should be fine.

For historical interest: I upgrade with yum (well, these days I use fedup, but at the time I used yum because the old upgrade methods stank), and the F16->F17 upgrade notes for yum upgraders say this:

If you have /var on a separate partition, you will have to manually convert "/var/run" and "/var/lock" to a symbolic link.

# mv -f /var/run /var/run.runmove~
# ln -sfn ../run /var/run
# mv -f /var/lock /var/lock.lockmove~
# ln -sfn ../run/lock /var/lock

So, it sounds like that note is wrong: you need to do it manually even if /var is *not* a separate partition. (It's not for me).
Comment 5 Zbigniew Jedrzejewski-Szmek 2014-02-26 02:20:58 UTC
So systemd will use /var/run/dbus/system_bus_socket again everywhere.
Comment 6 Kay Sievers 2014-02-26 03:58:57 UTC
(In reply to comment #4)
> Ah, this was all part of /usr merge? If the dracut hook for that handles it,
> then it usually should be fine.
> 
> For historical interest: I upgrade with yum (well, these days I use fedup,
> but at the time I used yum because the old upgrade methods stank), and the
> F16->F17 upgrade notes for yum upgraders say this:
> 
> If you have /var on a separate partition, you will have to manually convert
> "/var/run" and "/var/lock" to a symbolic link.
> 
> # mv -f /var/run /var/run.runmove~
> # ln -sfn ../run /var/run
> # mv -f /var/lock /var/lock.lockmove~
> # ln -sfn ../run/lock /var/lock
> 
> So, it sounds like that note is wrong: you need to do it manually even if
> /var is *not* a separate partition. (It's not for me).

The dracut upgrade module did that conversion, it could only not reach the
directories to convert if /var was separate. So the text should be right.

No idea how that did not apply to your box:
  https://git.kernel.org/cgit/boot/dracut/dracut.git/tree/modules.d/30convertfs/convertfs.sh#n24
Comment 7 Adam Williamson 2014-02-26 04:40:04 UTC
Possibly I used an earlier version that didn't do that? It's a long time ago, I don't exactly recall. I may have been running Rawhide at the time.
Comment 8 Kay Sievers 2014-02-26 04:45:36 UTC
(In reply to comment #7)
> Possibly I used an earlier version that didn't do that? It's a long time
> ago, I don't exactly recall. I may have been running Rawhide at the time.

Yeah, that could be that this wasn't included in the early days before the
release. Also for a while, we had mount units in systemd which did bind-mounts
to cover for stuff that wasn't converted.


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.