hi, i believe messing with my fstab to set up a networked time machine for my mac has messed with reboot. i am stuck at the following screen. everything was working great until i rebooted the machine using 'sudo reboot'.
any obvious errors on my part or is there more info needed?
-
- Posts: 690
- Joined: Tue Jun 16, 2015 6:01 am
Re: root account is locked, starting shell
Account Inactive
Re: root account is locked, starting shell
cant ssh into rpi (or dont know how to) so how do i copy the output of your input?
here are photos of the output... over 100 lines
https://drive.google.com/folderview?id= ... sp=sharing
here are photos of the output... over 100 lines

https://drive.google.com/folderview?id= ... sp=sharing
Last edited by c.brough on Sun Jul 24, 2016 10:53 pm, edited 1 time in total.
Re: root account is locked, starting shell
Pull the card out and put it into a PC, edit cmdline.txt in the boot partition (the only one you'll see in windows) and add the foolowing to the end:c.brough wrote:cant ssh into rpi (or dont know how to) so how do i copy the output of your input?
Code: Select all
init=/bin/sh
Re: root account is locked, starting shell
stuck on these last two lines now...
Code: Select all
/bin/sh: 0: can't access tty; job control turned off
# [ 6.658951] random: nonblocking pool is initialized
Re: root account is locked, starting shell
Press enter/return key, should give a promptc.brough wrote:stuck on these last two lines now...
Code: Select all
/bin/sh: 0: can't access tty; job control turned off # [ 6.658951] random: nonblocking pool is initialized
Re: root account is locked, starting shell
ok, still cant ssh in
Code: Select all
Chriss-MBP:~ Chris$ ssh 192.168.3.174
ssh: connect to host 192.168.3.174 port 22: No route to host
Chriss-MBP:~ Chris$ ssh root@192.168.3.174
ssh: connect to host 192.168.3.174 port 22: Host is down
Chriss-MBP:~ Chris$
Re: root account is locked, starting shell
thinking my best option at this point is to do a fresh install of raspian. 
if anyone has any way of rescuing my system I'll stick around for a few more hours before wiping.

if anyone has any way of rescuing my system I'll stick around for a few more hours before wiping.

Re: root account is locked, starting shell
You won't be able to ssh in as the system isn't up, you've booted into a root shell (something like single user mode), so networking isn't running (or anything else really).c.brough wrote:ok, still cant ssh in
Code: Select all
Chriss-MBP:~ Chris$ ssh 192.168.3.174 ssh: connect to host 192.168.3.174 port 22: No route to host Chriss-MBP:~ Chris$ ssh root@192.168.3.174 ssh: connect to host 192.168.3.174 port 22: Host is down Chriss-MBP:~ Chris$
You should be able to edit the fstab or set a root password (with a keyboard and screen attached).
- DougieLawson
- Posts: 40539
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: root account is locked, starting shell
Since you seem to be unable to follow the instructions to get a single user, no network, root shell to repair your broken system that's probably your best next step.c.brough wrote:thinking my best option at this point is to do a fresh install of raspian.![]()
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: root account is locked, starting shell
i dont seem to recall the instructions you mention.DougieLawson wrote: Since you seem to be unable to follow the instructions...
- DougieLawson
- Posts: 40539
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: root account is locked, starting shell
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: root account is locked, starting shell
i did exactly that and posted back that i was then stuck at the two lines i had posted.DougieLawson wrote:viewtopic.php?p=1014500#p1014500
Re: root account is locked, starting shell
You need to connect a keyboard to that machine and repair /etc/fstab from the shell. I think "nano /etc/fstab" should work in the limited environment you're running at that time.
The stock fstab (Raspbian Lite jessie) looks like that:
Comment out anything else you've been adding.
If the root partition is read-only and you can't save the modified file, try "mount -o remount,rw /" and try again. (assuming the root partition is clean... Writing to an unclean fs is not a good idea.)
When you're done, do: "sync" a few times, then "exit". You'll see a crash dump, that's ok. Now power off the Pi and power it back on, if your repair was successful it will boot.
Otherwise if you're "stuck" or something, you could use an SD card reader and mount/repair from another linux machine. And your last option is to reinstall.
The stock fstab (Raspbian Lite jessie) looks like that:
Code: Select all
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
If the root partition is read-only and you can't save the modified file, try "mount -o remount,rw /" and try again. (assuming the root partition is clean... Writing to an unclean fs is not a good idea.)
When you're done, do: "sync" a few times, then "exit". You'll see a crash dump, that's ok. Now power off the Pi and power it back on, if your repair was successful it will boot.
Otherwise if you're "stuck" or something, you could use an SD card reader and mount/repair from another linux machine. And your last option is to reinstall.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel
Re: root account is locked, starting shell
Not quite, you said you couldn't ssh in; which is to be expected as networking isn't up.c.brough wrote:i did exactly that and posted back that i was then stuck at the two lines i had posted.DougieLawson wrote:viewtopic.php?p=1014500#p1014500
Re: root account is locked, starting shell
Looking back at the original screenshot your already in a root shell, the clue is in:
From there you can fix the /etc/fstab file as epoch1970 described.
The various instructions for setting init=/bin/sh seem fairly redundant as you already have a root shell to fix it from, you just need to use a keyboard connected to the pi.
Code: Select all
sulogin: root account is locked, starting shell
root@raspberrypi:~#
The various instructions for setting init=/bin/sh seem fairly redundant as you already have a root shell to fix it from, you just need to use a keyboard connected to the pi.
Re: root account is locked, starting shell
That dumps you into systemd's emergency mode, not single user mode. Whether the OP can acheive the same thing in that shell, I don't know as I've not been in that situation.mfa298 wrote:Looking back at the original screenshot your already in a root shell, the clue is in:From there you can fix the /etc/fstab file as epoch1970 described.Code: Select all
sulogin: root account is locked, starting shell root@raspberrypi:~#
The various instructions for setting init=/bin/sh seem fairly redundant as you already have a root shell to fix it from, you just need to use a keyboard connected to the pi.
- IgorGanapolsky
- Posts: 33
- Joined: Sun Apr 10, 2016 8:32 pm
Re: root account is locked, starting shell
Nope, it doesn't resolve the problem.asandford wrote:Pull the card out and put it into a PC, edit cmdline.txt in the boot partition (the only one you'll see in windows) and add the foolowing to the end:c.brough wrote:cant ssh into rpi (or dont know how to) so how do i copy the output of your input?That will boot you into a root shell with no password required.Code: Select all
init=/bin/sh
Re: root account is locked, starting shell
Doesn't resolve what problem?IgorGanapolsky wrote: Nope, it doesn't resolve the problem.
Re: root account is locked, starting shell
Thanks epoch1970 the /etc/fstab edit worked first time. I'm not sure why the entries had changed though but it might have something to do with adding a new USB drive before a reboot.
-
- Posts: 1
- Joined: Mon Jan 15, 2018 1:31 pm
Re: root account is locked, starting shell
hi, same happend to me (console locked) it was cause for an extraction of an usb memory that i was sharing by samba an apache, Saludos!
Re: root account is locked, starting shell
Months later and I just encountered the same problem. The comment above on /etc/fstab clued me in. My Pi drive failed and that’s where I had moved my /temp swap space.