I have a remote server, running Linux 5.19.0-41-generic x86_64, I am trying to find out how it was booted.
Apparently, it does not use systemd :
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.
Q1: how to diagnose with what the thing was booted.
Q2: how to reboot it? Ideally, using systemd.
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.
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.
Thanks.