0

I ran sysctl disable display-manager.service and rebooted arch thinking it would boot into a terminal. Now I'm locked out of the machine.

I've tried adding init=/bin/bash to the boot options but it doesn't accept any keyboard inputs.

Anyone know how to resolve. Thanks!

9
  • 2
    Try init=/bin/sh, instead of /bin/bash.
    – aviro
    Sep 6 at 9:00
  • @aviro thanks - did try it, but still no keyboard key presses are being registered.
    – TrevTheDev
    Sep 6 at 9:17
  • I'm pretty sure you ran systemctl, not sysctl. Sep 6 at 14:17
  • 1
    Did you try to switch to a different tty with eg. Ctrl+Alt+F2?
    – ctx
    Sep 6 at 14:17
  • 1
    From past experience, when encountered similar things, usually my solution was to remove from the kernel command line in grub most of the parameters, kepping only the vmlinuz file and the root= parameters, and then adding init=/bin/sh, so eventually the line should seems like linux /boot/<vmlinuz file> root=<root fs> init=/bin/sh. Also, if you have bluetooth keyboard, try to connect a USB or serial keyboard instead.
    – aviro
    Sep 6 at 14:27

1 Answer 1

1

How to boot into a terminal in arch

Run

systemctl set-default multi-user.target

to start into multi-user mode instead of into graphical mode.

I've tried adding init=/bin/bash to the boot options but it doesn't accept any keyboard inputs.

Try init=/bin/sh, instead of /bin/bash

thanks - did try it, but still no keyboard key presses are being registered.

That's a bit strange, because keyboard handling is usually done by the kernel, so you don't have to start any services (unless you've got a bluetooth keyboard or similar), so it should work, right in the shell you get dropped to.

So, the next logical step would be booting from a live Arch image, mounting your broken system's / file system into a directory there, bind-mounting /sys, /dev, /proc and /run into the corresponding subdirectories of that directory as well, chrooting into your installed system, and then using systemctl enable display-manager.service to undo what's been done. Reboot after.

1
  • Thank you Marcus - I booted into a live Arch image and chrooted and that got me back into Arch. However, I've noted my virtual terminals aren't working - I used nomodeset and now they work. However init=/bin/sh still doesn't give me a shell that I can type in. It could be my USB keyboard or some root user restriction. Still trying to work out what the problem is.
    – TrevTheDev
    Sep 7 at 1:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .