I wanted to make a service that can shutdown the server every day at 9:30 pm. But I accidently set it up so the shutdown service runs on boot. So whenever I turn on the server, it shuts itself down before it can get to the login screen....

Anyway, is there a way to stop systemd from loading services while the server is turning on?

Or do I have to reimage the machine? I would really prefer not to reimage the machine, but I can if theres no other solution.

  • there are boot loader options to access a rescue mode (if GRUB try 'e') but given no such loader specifics i'd opt for a "liveCD" (more likely a live-USB these days) boot the original installation system, mount the system's root partition, edit the problematic file under /etc/systemd/system/ un-mount and smile the smile of the newly educated (for more detailed help to come you might want to specify your distribtuion and boot loader) – Theophrastus May 25 at 18:09
  • Thanks actually thats really helpful! I cant believe I didnt think of that. – Isaac Thiessen May 25 at 18:11
  • 1
    You can add systemd.unit=rescue.target to the kernel boot line from the boot menu and that will prevent units from being executed and will provide you with a rescue shell. – jordanm May 25 at 18:18

Your Answer

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

Browse other questions tagged or ask your own question.