ZigzagoonBalloon
Posts: 3
Joined: Sun Dec 03, 2017 10:09 am

Edited fstab, rebooted, Cannot access to console, the root account is locked

Sun Dec 03, 2017 10:21 am

Still learning and made the mistake of changing fstab without having a backup. Running latest raspbian.
When booted gets stuck in a loop of "Cannot access console, press enter to continue."
My guess is I need to access the fstab file and remove the changes but how can I do this with no access to the console?
Screenshot: https://imgur.com/a/DuoHM

Thanks in advance.

epoch1970
Posts: 3020
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Sun Dec 03, 2017 4:46 pm

Well, sorry for that.
Add init=/bin/sh to cmdline.txt and sweat your way out of it
viewtopic.php?t=172814
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel


marshalexander99
Posts: 8
Joined: Tue Nov 04, 2014 3:37 pm

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Dec 04, 2017 3:11 pm

I'm having the same issue but adding the init=/bin/sh makes no difference. Anything else I can try?

User avatar
DougieLawson
Posts: 35347
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Dec 04, 2017 5:52 pm

Toss the SDCard and write a new one.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ZigzagoonBalloon
Posts: 3
Joined: Sun Dec 03, 2017 10:09 am

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Dec 04, 2017 11:08 pm

When I tried it the "init=/bin/sh" had to be on the second line not on a new line and also in quotes. Else it seemed to do nothing.

jahboater
Posts: 4427
Joined: Wed Feb 04, 2015 6:38 pm

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Dec 04, 2017 11:15 pm

ZigzagoonBalloon wrote:
Mon Dec 04, 2017 11:08 pm
When I tried it the "init=/bin/sh" had to be on the second line not on a new line and also in quotes. Else it seemed to do nothing.
Think about it!
cmdline.txt contains the command line arguments that are passed to the linux kernel when it starts up.

cmdline.txt should obviously only contain one single line of text.

Just add init=/bin/bash somewhere within the line or at the end.

deepakchauhan
Posts: 1
Joined: Sun Mar 04, 2018 7:24 am

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Sun Mar 04, 2018 7:26 am

Tried everything, but non worked. Your solution helped get access to the console. However I had to add nofail to make it worked.

cyteck2000
Posts: 1
Joined: Sun Jun 24, 2018 7:03 pm

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Sun Jun 24, 2018 7:08 pm

Hello All,

I am getting the same issue. I know what I did wrong I just cannot get back in to fix it. After the Pi boots I get the Press enter to continue message but when I click enter it does not continue. Can someone please tell me what I am doing wrong.

Cyteck2000

mrmsbarnes
Posts: 15
Joined: Thu Jul 31, 2014 11:27 pm

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Jul 16, 2018 5:44 am

What is amazing is that when you hit Enter, the operating system is capable of fixing the lock and continuing with boot up.
Which says the Raspbian people really don't want you running their OS unattended. They don't give a flying about headless.
No, they want you right there in attendance for every boot. Don't go away. Wait for it. Wait for it. OK, now you can go.

User avatar
DougieLawson
Posts: 35347
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Jul 16, 2018 7:14 am

mrmsbarnes wrote:
Mon Jul 16, 2018 5:44 am
What is amazing is that when you hit Enter, the operating system is capable of fixing the lock and continuing with boot up.
Which says the Raspbian people really don't want you running their OS unattended. They don't give a flying about headless.
No, they want you right there in attendance for every boot. Don't go away. Wait for it. Wait for it. OK, now you can go.
Poppycock and balderdash. That's the best piece of complete nonsense I've read all day. All fifteen of my raspberries run completely headless.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
Yukon Cornelius
Posts: 20
Joined: Tue Jul 03, 2018 7:24 am

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Jul 16, 2018 7:52 am

DougieLawson wrote:
Mon Jul 16, 2018 7:14 am
....... That's the best piece of complete nonsense I've read all day. .....
Don't be too hasty in judgement ..... it's still early and it's a Monday ..... :mrgreen:

But seriously , backing-up the sd card is so easy .

I use the dd command in Linux , or you can use Etcher , if a GUI is preferred .
It works beautifully in both Linux and " that other OS " .

Either way , there's no sensible reason not to make back-ups , then you can bork away to your heart's content :)

PS : I think I read somewhere that Raspbian now has it's own writer built-in

cire0205
Posts: 1
Joined: Mon Feb 18, 2019 3:34 am

Re: Edited fstab, rebooted, Cannot access to console, the root account is locked

Mon Feb 18, 2019 3:39 am

It showed this issue after i disconnect the boot disk drive and plugged into Mac, then mac created .DS_Store file in this disk, after deleted all those .DS_Store files, reconnect to raspi, it works without any issue.

Return to “Troubleshooting”