Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Error when try to shutdown system -/run/initctl

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
2bbionic
Apprentice
Apprentice
Posts: 152
Joined: Thu Mar 24, 2005 1:12 pm

Error when try to shutdown system -/run/initctl

  • Quote

Post by 2bbionic » Thu Mar 18, 2021 8:46 am

Hello,

I accidentally switched over to systemd and tried to roll back to the openrc procedure a couple of days ago. Unfortunately something went wrong and I don't know what so maybe you can help here.
The system is a XEN guest and I uninstalled systemd already and installed openrc again (with udev). I also did a emerge -avND @world which didn't complain (after adding systemd to my USE)
emerge --info shows:

Code: Select all

 emerge --info
Portage 3.0.13 (python 3.9.2-final-0, default/linux/amd64/17.1, gcc-10.2.0, glibc-2.32-r7, 5.4.97-gentoo x86_64)
=================================================================
System uname: Linux-5.4.97-gentoo-x86_64-Intel-R-_Core-TM-_i5-2300_CPU_@_2.80GHz-with-glibc2.32
KiB Mem:     2541288 total,   1720324 free
KiB Swap:    2047996 total,   2047996 free
Timestamp of repository gentoo: Thu, 18 Mar 2021 04:00:01 +0000
Head commit of repository gentoo: 33fe5dab349592699974f73413bb5422b60bd4af
sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.7.10::gentoo, 3.8.8::gentoo, 3.9.2::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo
sys-devel/gcc-config:     2.3.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="de_DE@euro"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j1"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bzip2 cli crypt dri fortran gdbm gnome iconv libglvnd libtirpc mmx multilib ncurses nls nptl ntplonly openmp openrc pae pam pcre readline seccomp snmp split-usr sse sse2 ssl symlink tcpd unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_7 python3_8 python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPT
Any suggestions? I don't like to kill the machine when I want to reboot...

Kind regards,

2bbionic
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Thu Mar 18, 2021 10:49 am

Hi

What is the error output?

Please try

Code: Select all

emerge -1av sys-apps/sysvinit
Try this also

Code: Select all

openrc-shutdown --poweroff ###Or 
openrc-shutdown --reboot
What is the output of

Code: Select all

ls -l $(which poweroff)
?
:)
Top
2bbionic
Apprentice
Apprentice
Posts: 152
Joined: Thu Mar 24, 2005 1:12 pm

  • Quote

Post by 2bbionic » Thu Mar 18, 2021 12:35 pm

Code: Select all

 openrc-shutdown  --reboot now
was OK, after re-emerging sys-apps/sysvinit

But when I try "reboot" I got this:

Code: Select all

 reboot
WARNING: could not determine runlevel - doing soft reboot
  (it's better to use shutdown instead of reboot from the command line)

Broadcast message from root@icinga (pts/0) (Thu Mar 18 13:32:51 2021):

The system is going down for reboot NOW!
shutdown: /run/initctl: No such file or directory
init: /run/initctl: No such file or directory
This is the location of poweroff:

Code: Select all

ls -l $(which poweroff)
lrwxrwxrwx 1 root root 4 Mar 18 13:28 /sbin/poweroff -> halt
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Thu Mar 18, 2021 1:01 pm

Please run as root

Code: Select all

mkfifo /run/initctl
chmod 600 /run/initctl
I wonder which process creates this file..
Is dbus and maybe elogind running?
Please run

Code: Select all

rc-status sysinit boot
Please post the output.

Maybe reemerge openrc?
Also check with your

Code: Select all

/var/log/rc.log
Last edited by alamahant on Thu Mar 18, 2021 1:34 pm, edited 2 times in total.
:)
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2112
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Thu Mar 18, 2021 1:31 pm

2bbionic wrote:I accidentally switched over to systemd and tried to roll back to the openrc procedure a couple of days ago.
How do you "accidentally" switch to systemd? 8O

Post the output of ps -p 1 -o args.
alamahant wrote:

Code: Select all

mkfifo /run/initctl
chmod 600 /run/initctl
I wonder which process creates this file..
sysvinit's init program.
Top
2bbionic
Apprentice
Apprentice
Posts: 152
Joined: Thu Mar 24, 2005 1:12 pm

  • Quote

Post by 2bbionic » Thu Mar 18, 2021 4:48 pm

Output of rc-status:

Code: Select all

 rc-status sysinit boot
Runlevel: sysinit
 dmesg                                                             [  started  ]
 sysfs                                                             [  started  ]
 devfs                                                             [  started  ]
 udev                                                              [  started  ]
 kmod-static-nodes                                                 [  started  ]
 opentmpfiles-dev                                                  [  started  ]
 udev-trigger                                                      [  started  ]
 cgroups                                                           [  started  ]
Runlevel: boot
 modules                                                           [  started  ]
 fsck                                                              [  started  ]
 root                                                              [  started  ]
 mtab                                                              [  started  ]
 swap                                                              [  started  ]
 localmount                                                        [  started  ]
 sysctl                                                            [  started  ]
 bootmisc                                                          [  started  ]
 net.lo                                                            [  started  ]
 opentmpfiles-setup                                                [  started  ]
 urandom                                                           [  started  ]
 procfs                                                            [  started  ]
 binfmt                                                            [  started  ]
 loopback                                                          [  started  ]
 hostname                                                          [  started  
There's no rc.log on my system...., I re-emergeed openrc several times already.
Output of ps:

Code: Select all

 ps -p 1 -o args
COMMAND
/sbin/openrc-init 3
"accidentally" because I tried to install icinga-director dependencies and didn't realize what I'm doing ... :(
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2112
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Thu Mar 18, 2021 6:56 pm

2bbionic wrote:

Code: Select all

 ps -p 1 -o args
COMMAND
/sbin/openrc-init 3
OK, openrc-init is process 1, i.e. currently this is a 'pure' OpenRC setup. Did you really want this setup, or did you actually want the standard sysvinit + OpenRC setup? Also, post the output of emerge -pv openrc.
Top
2bbionic
Apprentice
Apprentice
Posts: 152
Joined: Thu Mar 24, 2005 1:12 pm

  • Quote

Post by 2bbionic » Fri Mar 19, 2021 9:39 am

No, standard would be nice :)

The output if emerge -pv openrc:

Code: Select all

emerge -pv openrc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-apps/openrc-0.42.1-r1::gentoo  USE="ncurses netifrc pam (split-usr) unicode -audit -bash -debug -newnet (-prefix) (-selinux) -static-libs -sysv-utils" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
BTW, sysvinit is also installed:

Code: Select all

or search key : sysvinit ]
Searching...

*  sys-apps/sysvinit
      Latest version available: 2.97
      Latest version installed: 2.97
      Size of files: 124 KiB
      Homepage:      https://savannah.nongnu.org/projects/sysvinit
      Description:   /sbin/init - parent of all processes
      License:       GPL-2

[ Applications found : 1 ]
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2112
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Fri Mar 19, 2021 12:30 pm

2bbionic wrote:No, standard would be nice :)
OK
2bbionic wrote:

Code: Select all

emerge -pv openrc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-apps/openrc-0.42.1-r1::gentoo  USE="ncurses netifrc pam (split-usr) unicode -audit -bash -debug -newnet (-prefix) (-selinux) -static-libs -sysv-utils" 0 KiB
Then this is correct. The sysv-utils USE flag unset.

As a final check, see if the output of file /sbin/init says it is an ELF executable instead of a symbolic link. If it is, you can reboot to sysvinit with openrc-shutdown -r now and after that, the regular reboot program should work as expected. Unless you have an init= parameter in your kernel command line, the output of ps -p 1 -o args should change to:

Code: Select all

COMMAND
init [3]
Top
2bbionic
Apprentice
Apprentice
Posts: 152
Joined: Thu Mar 24, 2005 1:12 pm

  • Quote

Post by 2bbionic » Fri Mar 19, 2021 12:47 pm

Code: Select all

/sbin/init: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped
, it's not linked

When I try to reboot, this error message rises:

Code: Select all

openrc-shutdown -r now
 * Failed to open initctl fifo: No such device or address

Broadcast message from root@icinga (pts/0) (Fri Mar 19 13:40:22 2021):

The system will reboot now
and nothing happens anymore (no reboot)
Im my xen config file, I have this:

Code: Select all

# Sets runlevel 3.
extra = "init=/sbin/openrc-init 3 xencons=tty console=tty"
This it what ps says abaout init:

Code: Select all

 ps -p 1 -o args
COMMAND
/sbin/openrc-init 3
Top
2bbionic
Apprentice
Apprentice
Posts: 152
Joined: Thu Mar 24, 2005 1:12 pm

  • Quote

Post by 2bbionic » Fri Mar 19, 2021 12:54 pm

I just noticed that that someone complains about the runlevel when booting, maybe this is related?

Code: Select all

[    2.128708] Run /sbin/openrc-init as init process
OpenRC init version 0.42.1 starting
Starting sysinit runlevel
[    2.402901] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2844d7b4fe4, max_idle_ns: 440795306143 ns
[    2.791144] init-early.sh (738) used greatest stack depth: 13352 bytes left

   OpenRC 0.42.1 is starting up Gentoo Linux (x86_64)

 * Mounting /proc ...
 [ ok ]
 * Mounting /run ...
 * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Mounting xenfs ...
 [ ok ]
 * Caching service dependencies ...
 [ ok ]
 * Mounting /sys ...
 [ ok ]
 * Mounting debug filesystem ...
 [ ok ]
 * Mounting fuse control filesystem ...
 [ ok ]
 * Mounting SELinux filesystem ...
 [ ok ]
 * Mounting cgroup filesystem ...
 [ ok ]
 * Remounting devtmpfs on /dev ...
 [ ok ]
 * Mounting /dev/mqueue ...
 [ ok ]
 * Mounting /dev/pts ...
 [ ok ]
 * Mounting /dev/shm ...
 [ ok ]
 * Creating list of required static device nodes for the current kernel ...
Warning: /lib/modules/5.4.97-gentoo/modules.devname not found - ignoring
 [ ok ]
 * Setting up tmpfiles.d entries for /dev ...
 [ ok ]
 * Starting udev ...
 [ ok ]
 * Generating a rule to create a /dev/root symlink ...
 [ ok ]
 * Populating /dev with existing devices through uevents ...
 [ ok ]
Starting boot runlevel
 * Mounting misc binary format filesystem ...
 [ ok ]
 * Loading custom binary format handlers ...
 [ ok ]
 * Checking local filesystems  ...
 [ ok ]
 * Remounting filesystems ...
 [ ok ]
 * Updating /etc/mtab ...
 * Creating mtab symbolic link
 [ ok ]
 * Activating swap devices ...
 [ ok ]
 * Mounting local filesystems ...
 [ ok ]
 * Configuring kernel parameters ...
 [ ok ]
 * Creating user login records ...
 [ ok ]
 * Setting hostname to icinga  ...
 [ ok ]
 * Bringing up network interface lo ...
 [ ok ]
 * Bringing up interface lo
 *   Caching network module dependencies
 *   127.0.0.1/8 ...
 [ ok ]
 *   Adding routes
 *     127.0.0.0/8 via 127.0.0.1 ...
 [ ok ]
 [ ok ]
 * Setting up tmpfiles.d entries ...
 [ ok ]
 * Initializing random number generator ...
 [ ok ]
3 is an invalid runlevel
Starting default runlevel
 * Bringing up interface eth0
 *   Caching network module dependencies
 *   192.168.100.9/24 ...
 [ ok ]
 
 *     default via 192.168.100.99 ...
 [ ok ]
 [ ok ]
 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
 [ ok ]
 * Starting syslog-ng ...
 [ ok ]
 * Starting rpcbind ...
 [ ok ]
 * Starting NFS statd ...
 [ ok ]
 * Setting up RPC pipefs ...
 [ ok ]
 * Starting idmapd ...
 [ ok ]
 * Starting NFS sm-notify ...
 [ ok ]
 * Mounting network filesystems ...
 [ ok ]
 * Starting sshd ...
 [ ok ]
 * Starting apache2 ...
 [ ok ]
 * Starting cronie ...
 [ ok ]
And also:

Code: Select all

runlevel
unknown
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2112
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Fri Mar 19, 2021 1:15 pm

2bbionic wrote:When I try to reboot, this error message rises:

Code: Select all

openrc-shutdown -r now
 * Failed to open initctl fifo: No such device or address

Broadcast message from root@icinga (pts/0) (Fri Mar 19 13:40:22 2021):

The system will reboot now
and nothing happens anymore (no reboot)
If you have a /run/initctl file, remove it and try again. It will confuse openrc-shutdown. It will reappear once you reboot successfully to sysvinit.
2bbionic wrote:Im my xen config file, I have this:

Code: Select all

# Sets runlevel 3.
extra = "init=/sbin/openrc-init 3 xencons=tty console=tty"
If you want a standard sysvinit + OpenRC setup, this is wrong. Remove the init=/sbin/openrc-init and 3 before rebooting (I'm assuming Xen passes these as kernel parameters).
Top
2bbionic
Apprentice
Apprentice
Posts: 152
Joined: Thu Mar 24, 2005 1:12 pm

  • Quote

Post by 2bbionic » Fri Mar 19, 2021 4:08 pm

I hadn't aninitctl in /run.
I removed the init=3 from my xen config ; now it does not complain anymore but
INIT: Entering runlevel: 3
So finally reboot/poweroff works again and the pipe for initctl also is created in /run

Thanks for your support!

Kind regards,

Andreas
Top
Post Reply

13 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic