3

I have a remote server, running Linux 5.19.0-41-generic x86_64, that I am trying to reboot.

I get the following message

sudo reboot
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Failed to talk to init daemon.
sudo init 6
Couldn't find an alternative telinit implementation to spawn.

PID 1 process is bash.

ps -p 1 -o comm=
bash

Apparently, there is no GRUB, at least there is none in /usr/sbin , and

grub-install --version
-bash: grub-install: command not found

I guess, GRUB was not used at startup.

It does not seem to be a virtual machine. I checked some files. It seems to be running on bare metal. But the configuration is minimal: top shows just a handful of processes and on ssh I am prompted to "unminimize", if I need fuller functionality.

I was inclined to think that SysV was used:

ls /etc/init.d
apport          bluetooth  hwclock.sh  network-manager  procps                       rsync  udev
avahi-daemon    dbus       iwpmd       nfs-common       pulseaudio-enable-autospawn  saned  unattended-upgrades
binfmt-support  gdm3       kmod        pppd-dns         rpcbind                      ssh    x11-common

But:

runlevel
unknown

and /etc/inittab does not exist.

sudo shutdown -r now
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Failed to talk to init daemon.

Q1: how do I figure out with what my system was booted?

Q2: how do I reboot it?

For Q2, it would be great if I could reboot it using systemd.

0x11111
  • 131

1 Answers1

1

Try with these commands. You should run these on the same order as root user:

echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger

If your system doesn't shuts off with previous commands. Try this:

echo 1 > /proc/sys/kernel/sysrq
echo s > /proc/sysrq-trigger
sleep 25
echo b > /proc/sysrq-trigger