Raspberry is running fine, but I cannot login via ssh or directly on the device. Problem: I executed following command: sudo apt remove --purge zsh
Yes I know I am a moron.
I know I have to access /etc/passwd to change after my username the entry from /bin/zsh zu /bin/bash. But I cannot access this file. When I add init /bin/bash to cmdline.txt I have sort of root access. I can read but not write.
And: Booting the rasperry holding shift does not bring me to the boot menu
Anyone can help me?
1 Answer 1
Rebooting to a root shell can repair most configuration problems on the Pi.
- Append
init=/bin/sh
at the end ofcmdline.txt
and reboot. - After booting you will be at the prompt in a root shell.
- Your root file system is mounted as readonly now, so remount it as read/write
mount -n -o remount,rw /
- Edit to fix your problem.
- Remove
init=/bin/sh
and reboot.
NOTE you should use init=/bin/sh
NOT init=/bin/bash
as this is guaranteed to exist.
On Debian /bin/sh
is actually a link to /bin/dash
Anyone can help me?
is not a question about the problemI can read but not write
- I guess/
is mounted readonly - you couldmount / -o remount,rw
to make it writable