4

I'm running Rasbian (Debian?) on my Raspberry Pi, and have allot of auto-starting things in init.d. But what if I want to stop them all from running, and simply break into a terminal prompt? I've tried ctrl+c and I've tried esc, but none of the two seem to work.

Any suggestions?

PS: I can log in through SSH and modify whatever, this is not a question of being "locked out of my Linux". I'm just curious if there are any "hold down key X to go to failsafe prompt".

3
  • 3
    Is rebooting to start /bin/sh at boot instead of /sbin/init an option?
    – lgeorget
    Jul 22, 2014 at 20:22
  • @lgeorget is right - you can almost definitely just pass the kernel parameter init=bin/sh from your bootloader - probably grub.
    – mikeserv
    Jul 22, 2014 at 20:29
  • Isn't there a way to boot into single-user mode, like most flavors of Unix?
    – Barmar
    Jul 24, 2014 at 17:15

1 Answer 1

1

All flavors of Unix has a way of starting in "single-user mode". This usually gives you a root prompt just as the kernel is handing over to the system initialization scripts.

One way of doing this on Raspbian Linux is to modify /boot/cmdline.txt so that it reads

init=/bin/sh

This will start a shell rather than handing over control to /sbin/init (which would set up networking and run other init scripts etc.)

You may also edit this file upon boot by

  1. Pressing Shift while starting up,
  2. Press E to edit configuration,
  3. Tab down to cmdline.txt,
  4. Change the file as above and exit.

Related: https://raspberrypi.stackexchange.com/questions/3751/oops-i-need-runlevel-1

You must log in to answer this question.

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