[SOLVED] How do you reboot a server when Systemd is unavailable?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do you reboot a server when Systemd is unavailable?
I'm in minimal mode trying to reset the root users password.
"System has not been booted with systemd as init system (PID 1). Can't operate"
I can't run any systemctl commands as the systemd daemon is unavailable. If you didn't have direct console access to this server - how would you reboot it? Other than just pulling the plug physically, and booting it back online?
Not necessarily, if the OP used init=/bin/bash then as a shell process there isn't any basic power management commands available.
In my ignorance I just stopped the process via the exit command and virtually pulled the plug (I was playing with a VM). Here is one way...
Quote:
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger
Originally Posted by https://en.wikipedia.org/wiki/Magic_SysRq_key
A common use of the magic SysRq key is to perform a safe reboot of a Linux computer which has otherwise locked up (abbr. REISUB). This can prevent a fsck being required on reboot and gives some programs a chance to save emergency backups of unsaved work. The QWERTY (or AZERTY) mnemonics: "Raising Elephants Is So Utterly Boring", "Reboot Even If System Utterly Broken" or simply the word "BUSIER" read backwards, are often used to remember the following SysRq-keys sequence:
unRaw (take control of keyboard back from X),
tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
kIll (send SIGKILL to all processes except init, forcing them to terminate immediately), Sync (flush data to disk), Unmount (remount all filesystems read-only),
reBoot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.