Difference between revisions of "Talk:Systemd"

From ArchWiki
Jump to: navigation, search
m (Section "Editing provided unit files": rm closed discussion)
(Duplication of content in Native configuration section: merged)
(One intermediate revision by one other user not shown)
Line 88: Line 88:
 
*<s>[[systemd#Virtual console]] and [[KEYMAP]] ([[KEYMAP]] is not yet mentioning ''localectl'' though)</s>
 
*<s>[[systemd#Virtual console]] and [[KEYMAP]] ([[KEYMAP]] is not yet mentioning ''localectl'' though)</s>
 
*<s>[[systemd#Time zone]] and [[Time#Time Zone]]</s>
 
*<s>[[systemd#Time zone]] and [[Time#Time Zone]]</s>
 +
*<s>[[systemd#Kernel modules]] and [[Kernel modules]]</s>
 
*[[systemd#Hardware clock]] and [[Time]] (this would be a good chance to update [[Time]])
 
*[[systemd#Hardware clock]] and [[Time]] (this would be a good chance to update [[Time]])
*[[systemd#Kernel modules]] and [[Kernel modules]]
 
 
*[[systemd#Automount]] and [[fstab]]
 
*[[systemd#Automount]] and [[fstab]]
 
*[[systemd#LVM]] and [[LVM]]
 
*[[systemd#LVM]] and [[LVM]]
Line 102: Line 102:
 
:::I just merged [[systemd#Virtual console]] into [[KEYMAP]].[https://wiki.archlinux.org/index.php?title=KEYMAP&diff=263832&oldid=259891] [https://wiki.archlinux.org/index.php?title=Systemd&diff=263833&oldid=263718]
 
:::I just merged [[systemd#Virtual console]] into [[KEYMAP]].[https://wiki.archlinux.org/index.php?title=KEYMAP&diff=263832&oldid=259891] [https://wiki.archlinux.org/index.php?title=Systemd&diff=263833&oldid=263718]
 
:::-- [[User:Jstjohn|Jstjohn]] ([[User talk:Jstjohn|talk]]) 12:08, 22 June 2013 (UTC)
 
:::-- [[User:Jstjohn|Jstjohn]] ([[User talk:Jstjohn|talk]]) 12:08, 22 June 2013 (UTC)
 +
 +
:::I've just merged [[systemd#Kernel modules]] into [[Kernel modules]]. Well, it was almost merged, so I finished it... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:53, 1 July 2013 (UTC)
  
 
==Section on Suspend/Resume Service Files==
 
==Section on Suspend/Resume Service Files==
 
I have the slight suspicion that the service files posted in the section [[Systemd#Suspend.2Fresume_service_files]] might not work. Has anybody tried them or is actually using them? <br>
 
I have the slight suspicion that the service files posted in the section [[Systemd#Suspend.2Fresume_service_files]] might not work. Has anybody tried them or is actually using them? <br>
 
-- [[User:Jakobh|jakobh]] [[User talk:Jakobh|✉]]  03:12, 10 May 2013 (UTC)
 
-- [[User:Jakobh|jakobh]] [[User talk:Jakobh|✉]]  03:12, 10 May 2013 (UTC)
 
== <s>systemd 204 and /bin/systemd</s> ==
 
* with {{pkg|systemd}} 204, the {{ic|/bin/systemd}} symlink is not more installed; while this is correctly documented on this wiki page and warned in post-install message, this warning can be easily missed (my xp :-/), and the received message at the following boot is very little helpful
 
* the situation can be very disturbing for a one-PC owner, and quite disruptive for newbies
 
* may I suggest this change should be more explicitly warned, maybe with a flag message on the Arch Linux home page
 
-- [[User:Kra64|Kra64]] ([[User talk:Kra64|talk]]) 09:30, 13 May 2013 (UTC)
 
:From experience, Archers tend to forget to check the front page and the info posted there goes unnoticed, thus it makes sense to use just a post-install message. Keeping your system functional boils down to doing certain things in certain order. There's no way to avoid breakage if you're not serious about updating often, reading pacman's output, dealing with .pacnew files etc.
 
:Keeping a liveCD / liveUSB on hand in case something breaks and you need to repair your system should be easy enough.
 
:-- [[User:Karol|Karol]] ([[User talk:Karol|talk]]) 09:39, 13 May 2013 (UTC)
 
 
:# If you miss a post-install message, that's your own fault.
 
:# That symlink was only used for the migration to systemd. Once you move over, you don't need it anymore.
 
:# Anyone that's installed in the last 7 months would already have {{pkg|systemd-sysvcompat}} installed, so this symlink was meaningless to them.
 
:# The Wiki has said to use {{ic|/usr/lib/systemd/systemd}} for a long time now.
 
:# What does this have to to with the systemd Wiki page? This talk page is to discuss changes to the Wiki page, not general gripes or suggestions about a package.
 
:All together, this change was very very minor and shouldn't have adversely affected anyone who was paying attention at all.
 
:--[[User:Scimmia|Scimmia]] ([[User talk:Scimmia|talk]]) 11:58, 13 May 2013 (UTC)
 
 
::See discussion above. Closing.
 
::-- [[User:Jstjohn|Jstjohn]] ([[User talk:Jstjohn|talk]]) 11:54, 22 June 2013 (UTC)
 

Revision as of 16:53, 1 July 2013

Initscripts emulation

Hi, I pushed the sysvinit rc.local facility to systemd.

# cat /etc/systemd/system/multi-user.target.wants/rc-local.service 
[Unit]
Description=/etc/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.local
[Service]
Type=oneshot
ExecStart=/usr/bin/bash /etc/rc.local
TimeoutSec=0
StandardInput=tty
RemainAfterExit=yes

The rc.local script displays (important) informations on the console and expects a validation with the return key.

# cat /etc/rc.local
#!/bin/bash
echo IMPORTANT INFORMATIONS
read -s key

The informations are well displayed on console but the graphic manager starts before the keyboard confirmation...

Note that tty1 is disabled.

# ll /etc/systemd/system/getty.target.wants/
total 0
-rw-r--r-- 1 root root  0 17 mars  12:52 getty@tty1.service
lrwxrwxrwx 1 root root 38  2 sept.  2012 getty@tty2.service -> /usr/lib/systemd/system/getty@.service
-rw-r--r-- 1 root root  0 17 mars  12:17 getty@tty4.service
-rw-r--r-- 1 root root  0 17 mars  12:17 getty@tty5.service
-rw-r--r-- 1 root root  0 17 mars  12:17 getty@tty6.service

How can I start the graphic manager after the keyboard confirmation?
-- Lacsap, 18 March 2013

Should the section "writing a custom .service" be expanded?

I think so.. as long as I got, this is necessary to run self-made scripts during the boot process, but this is not clear and the structure of the files is not well presented.

Moreover, when explain how to transit from the initscript, some referrals on how to move the old custom hooks in /etc/rc.d/functions.d to be executed by systemd, should be made.
-- DarioP (talk) 12:42, 18 November 2012 (UTC)

I think it needs to be expanded indeed. As a newbie, it is easy to grasp the concept of "put your code in rc.local", and it's not clear how to transition. Specific questions, as also mentioned by DarioP: In what directory should I place my service definition? On the examples page, there are some files named with an at-sign (@), what difference does that make? It would be very helpful to have a complete example for running a single command at boot (my example: echo noop > /sys/block/sdb/queue/scheduler).
-- Fa2k (talk) 3 February 2013

Systemd defaults / to rshared, gotcha

Still reading up on this, so I'm not 100% solid but I discovered during the systemd transition that it defaults the / mount to rshared (see Shared subtree for definitions). Excerpted from core/mount-setup.c in systemd github:
/* Mark the root directory as shared in regards to mount
 * propagation. The kernel defaults to "private", but we think
 * it makes more sense to have a default of "shared" so that
 * nspawn and the container tools work out of the box. If
 * specific setups need other settings they can reset the
 * propagation mode to private if needed. */
if (detect_container(NULL) <= 0)
        if (mount(NULL, "/", NULL, MS_REC|MS_SHARED, NULL) < 0)
                log_warning("Failed to set up the root directory for shared mount propagation: %m");

This means that all bind mounts made through fstab will default to shared behavior, not private. For those users who depend on non-recursive bind mounts, this can be a very big gotcha (as the mount propagation effectively nullifies the non-recursion). I think it should be at least noted under Filesystem Mounts, since fstab bind entries definitely may not preserve behavior across the systemd transition and there are definitely some systems that would fail to start up/operate properly due to this, perhaps even silently.

As a side note, for nested bind mounts this also results in multiplicative bloat of the mount table, depending on what kind of nesting structure is used (it's actually relatively easy to construct a nesting sequence that makes 2^n mounts out of n mount calls).

Still looking into good (and easy) configuration solutions.

Compgamer89 (talk) 07:16, 4 December 2012 (UTC)

You may find this commit useful. --David Strauss (talk) 22:58, 13 December 2012 (UTC)

systemd no longer supports initscripts

http://cgit.freedesktop.org/systemd/systemd/commit/?id=53d05b44f17db67d644069600e4b5bbca88d21e7
-- D garbage

Please add your signature next time by typing four tildes (~~~~)
Anyway, I think it may be worth considering to remove all initscripts related sections. Initscripts has been unsupported for almost half a year now, whoever still hasn't switched is screwed anyway. About time this article gets a little shorter. Other opinions?
-- 65kid (talk) 10:16, 24 March 2013 (UTC)
Considering that, on multiple occasions, I've seen people come into the #archlinux channel on IRC and state that they haven't updated their systems for almost a year, I think we should keep this info in the wiki for a couple more months at least.
-- Jstjohn (talk) 19:53, 24 March 2013 (UTC)
To clarify what I said previously, I mean that we should keep the "migrating from initscripts to systemd" information around for a while. I have no problem with removing information about initscripts that is not in the context of migrating to systemd.
-- Jstjohn (talk) 18:39, 22 April 2013 (UTC)

Duplication of content in Native configuration section

I don't remember if this topic has already been discussed here, but it seems to me that systemd#Native configuration is duplicating information that IMO better belongs to other articles:

I would suggest removing all these sections or replacing them with links to the reported articles, possibly merging any information that those articles are missing.

-- Kynikos (talk) 16:16, 13 April 2013 (UTC)

+1 for move them out. They are in a central page because at that time, initscripts is the only init supported. Now when a user want to know how to set up LVM, LVM is the natural target. Very few of them will ever go to Systemd and go to LVM section. -- Fengchao (talk) 12:52, 14 April 2013 (UTC)
Thanks, started with systemd#Hostname, any help will be appreciated of course, I think there are also other sections that can be moved out. -- Kynikos (talk) 11:15, 15 April 2013 (UTC)
I just merged systemd#Virtual console into KEYMAP.[1] [2]
-- Jstjohn (talk) 12:08, 22 June 2013 (UTC)
I've just merged systemd#Kernel modules into Kernel modules. Well, it was almost merged, so I finished it... -- Lahwaacz (talk) 16:53, 1 July 2013 (UTC)

Section on Suspend/Resume Service Files

I have the slight suspicion that the service files posted in the section Systemd#Suspend.2Fresume_service_files might not work. Has anybody tried them or is actually using them?
-- jakobh 03:12, 10 May 2013 (UTC)