Difference between revisions of "Talk:Systemd"

From ArchWiki
Jump to: navigation, search
("Error: No space left on device" when trying to start/restart a service": new section)
m (Remove closed discussions.)
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== LVM2 section ==
+
== Initscripts emulation ==
The section on LVM is incorrect. There is no lvm-monitoring.service. The proper way to enable LVM2 is through systemctl enable lvm.
+
[[User:Theking2|Theking2]] ([[User talk:Theking2|talk]]) 19:15, 13 December 2012 (UTC)
+
== 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.
+
Hi, I pushed the sysvinit rc.local facility to systemd.
  
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.
+
# 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
  
--[[User:DarioP|DarioP]] ([[User talk:DarioP|talk]]) 12:42, 18 November 2012 (UTC)
+
The rc.local script displays (important) informations on the console and expects a validation with the return key.
  
- 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
+
# cat /etc/rc.local
 +
#!/bin/bash
 +
echo IMPORTANT INFORMATIONS
 +
read -s key
  
== Display manager fails to load with fast SSD ==
+
The informations are well displayed on console but the graphic manager starts before the keyboard confirmation...
  
I was having a problem with my display manager (LXDM) not loading on my laptop, which has a Sandisk Extreme SSD.
+
Note that tty1 is disabled.
Xorg.log would show errors like "No screens found."
+
# 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
  
I eventually figured out that the problem was that my computer was booting so fast that KMS didn't have enough time to kick in before X was started. I solved by adding the KMS driver (i915 in my case) to the initramfs.
+
How can I start the graphic manager after the keyboard confirmation?
  
Just a tip for SSD users, not sure if it should be added to the page or not.<br> --[[User:Steev|Steev]] ([[User talk:Steev|talk]]) 16:59, 2 September 2012 (UTC)
+
== Should the section "writing a custom .service" be expanded? ==
:This is a general problem that needs to be solved in the display manager. GDM already implements the bits for the [http://cgit.freedesktop.org/systemd/systemd/commit/?id=f1a8e221ecacea23 CanGraphical] flag.
+
:-- [[User:Falconindy|Falconindy]] ([[User talk:Falconindy|talk]]) 21:34, 2 September 2012 (UTC)
+
  
== Should we add a note about CUPS under 'Transitioning from initscripts to systemd'? ==
+
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.
Are there any more sockets that change?
+
 
+
Copied from the CUPS wiki:
+
 
+
...
+
 
+
Systemd uses a different CUPS socket file located at:
+
 
+
/usr/lib/systemd/system/cups.socket
+
 
+
The default CUPS socket file is located at:
+
 
+
/var/run/cups/cups.sock
+
 
+
Edit {{ic|/etc/cups/cupsd.conf}} and {{ic|/etc/cups/client.conf}} as root to use the systemd socket instead of the default. Make sure to restart CUPS when you are done:
+
  
# systemctl restart cups
+
Moreover, when explain how to transit from the initscript, some referrals on how to move the old custom hooks in {{ic|/etc/rc.d/functions.d}} to be executed by systemd, should be made.<br>
 +
-- [[User:DarioP|DarioP]] ([[User talk: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 ({{ic|@}}), what difference does that make? It would be very helpful to have a complete example for running a single command at boot (my example: {{ic|echo noop > /sys/block/sdb/queue/scheduler}}).
<br>
+
:-- [[User:Fa2k|Fa2k]] ([[User talk:Fa2k|talk]]) 3 February 2013
-- [[User:JKAbrams|JKAbrams]] 5 November 2012
+
:This sounds more like a {{pkg|cups}} packaging bug that should just be fixed.
+
:-- [[User:Jstjohn|Jstjohn]] ([[User talk:Jstjohn|talk]]) 01:11, 8 November 2012 (UTC)
+
::It sounds like someone who doesn't have a clue about systemd. That cups.socket file is a systemd unit file of type socket, which contains the location of the socket file for CUPS (and that is still /var/run/cups/cups.sock).
+
::[[User:Raynman|Raynman]] ([[User talk:Raynman|talk]]) 22:49, 9 November 2012 (UTC)
+
  
 
== Systemd defaults / to rshared, gotcha  ==
 
== Systemd defaults / to rshared, gotcha  ==
Line 73: Line 67:
 
:You may find [http://cgit.freedesktop.org/systemd/systemd/commit/?id=b3ac5f8cb98757416d8660023d6564a7c411f0a0 this commit] useful. --[[User:David Strauss|David Strauss]] ([[User talk:David Strauss|talk]]) 22:58, 13 December 2012 (UTC)
 
:You may find [http://cgit.freedesktop.org/systemd/systemd/commit/?id=b3ac5f8cb98757416d8660023d6564a7c411f0a0 this commit] useful. --[[User:David Strauss|David Strauss]] ([[User talk:David Strauss|talk]]) 22:58, 13 December 2012 (UTC)
  
== "Error: No space left on device" when trying to start/restart a service" ==
+
== Disputed groups section==
 +
This template/warning should be removed. If there is a genuine dispute, then there should be accompanying material, ie., arguments and evidence, on this page.
  
This troubleshooting section was removed because it was "totally irrelevant. Why is this irrelevant?
+
[[User:Jasonwryan|Jasonwryan]] ([[User talk:Jasonwryan|talk]]) 23:02, 18 March 2013 (UTC)
[[User:Skiguy0123|Skiguy0123]] ([[User talk:Skiguy0123|talk]]) 00:35, 11 February 2013 (UTC)
+

Revision as of 05:34, 20 March 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?

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)

Disputed groups section

This template/warning should be removed. If there is a genuine dispute, then there should be accompanying material, ie., arguments and evidence, on this page.

Jasonwryan (talk) 23:02, 18 March 2013 (UTC)