I am used to the old method of calling init 0 to shutdown. Bad, I know; but when I tried it on my new Arch install I get this:

# init 0
Excess Arguments

This confuses me because I thought systemd was supposed to support run levels? Looking at the man page, it mentions this:

For compatibility with SysV, if systemd is called as init and a PID that is not 1, it will execute telinit and pass all command line arguments unmodified. That means init and telinit are mostly equivalent when invoked from normal login sessions. See telinit(8) for more information.

Am I just using the wrong syntax or have I completely misunderstood systemd?

More Init/Systemd Information

# command -v init

# file /bin/init
/usr/bin/init: symbolic link to ../lib/systemd/systemd

# /lib/systemd/systemd --version
systemd 234
# command -v telinit

# file /bin/telinit
/bin/telinit: symbolic link to systemctl

# systemctl --version
systemd 234

General System Info

# uname -a
Linux arch 4.12.5-1-ARCH #1 SMP PREEMPT Fri Aug 11 12:40:21 CEST 2017 x86_64 GNU/Linux

# bash --version
GNU bash, version 4.4.12(1)-release (x86_64-unknown-linux-gnu) 
  • Note that telinit 0 (linked to systemctl) will continue to work regardless of build options; only init 0 (linked to systemd) does not. – grawity Dec 13 '17 at 15:52

For compatibility with SysV, […]
systemd 234
[…] -SYSVINIT […]

You've built systemd without the compatibility option, so the compatibility behaviour described in the manual is not going to be present.

  • Ah, that makes perfect sense. Thanks for explaining it! – Grayson Kent Aug 30 '17 at 14:39

Well as far as I can see from your symlinks this is the issue.

If your init is a symlink to systemd then you need to see what systemd can get as an argument.

systemd [OPTIONS...]

Starts up and maintains the system or user services.

  -h --help                      Show this help
     --test                      Determine startup sequence, dump it and exit
     --no-pager                  Do not pipe output into a pager
     --dump-configuration-items  Dump understood unit configuration items
     --unit=UNIT                 Set default unit
     --system                    Run a system instance, even if PID != 1
     --user                      Run a user instance
     --dump-core[=BOOL]          Dump core on crash
     --crash-vt=NR               Change to specified VT on crash
     --crash-reboot[=BOOL]       Reboot on crash
     --crash-shell[=BOOL]        Run shell on crash
     --confirm-spawn[=BOOL]      Ask for confirmation when spawning     processes
     --show-status[=BOOL]        Show status updates on the console during bootup
     --log-target=TARGET         Set log target (console, journal, kmsg, journal-or-kmsg, null)
     --log-level=LEVEL           Set log level (debug, info, notice, warning, err, crit, alert, emerg)
     --log-color[=BOOL]          Highlight important log messages
     --log-location[=BOOL]       Include code location in log messages
     --default-standard-output=  Set default standard output for services
     --default-standard-error=   Set default standard error output for services

So the thing is that you actually don't have the real init but just a linked systemd

  • Thank you for the info! I get why it errors, but I don't get it doesn't pass to a real init since the man page says that it will execute telinit with all arguments passed unmodified? – Grayson Kent Aug 30 '17 at 14:11
  • well a deeper look on your systems is the answer :) systemd can't do what you expect if you don't enable the -SYSVINIT flag on the compilation :) hope it helps – Christopher Díaz Riveros Aug 30 '17 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.