"Cannot open access to console the root account is locked"

If none of the more specific forums is the right place to ask

"Cannot open access to console the root account is locked"

Postby quixote » 2019-08-18 01:32

When I try to boot into Stretch / Debian 9, suddenly I'm getting this message,
Code: Select all
"Cannot open access to console the root account is locked. See sulogin man page."
It tells me to press Enter to continue, but that only repeats the same message each time.

I found a possible workaround under bug #802211 by Marga Monterola showing how to force sulogin by putting a small conf file in /etc/systemd/system/rescue.service.d/sulogin.conf or /etc/systemd/system/emergency.service.d/sulogin.conf. This first location didn't help, so I also put it in the second. That didn't help either.

Background: I've used my Stretch partition (call it sda5) for two or three years. I have a separate /home partition which hasn't changed. Last month I cloned the Stretch partition using gparted, changed the UUID on one of them (don't remember which), and upgraded one of them to 10. The Buster/10 partition, call it sda2, is booting as normal. It's only the Stretch partition which suddenly has this issue.

I have booted into Stretch after I made all these changes. About two or three weeks ago. Then there was no problem.

I tried chrooting into the Stretch install. Command line access is fine, and the whole system seems to be there as normal. When I try startx though (from the # prompt since I forgot to try it as my user) it says
Code: Select all
xinit: unable to connect to X server: Resource temporarily unavailable
xinit: server error
xauth:  error in locking authority file /home/mia/.Xauthority


I've searched everywhere I can think of, but can't find a solution for my situation. Hope someone can help! TIA
User avatar
quixote
 
Posts: 100
Joined: 2009-10-15 02:51
Location: Sitooterie

Re: "Cannot open access to console the root account is locke

Postby L_V » 2019-08-18 06:23

You forgot at least two steps:
1 - check/modify /etc/fstab of the cloned partition: is UUID of / the right one ?
2 - bootloader: did you really check on which partition you boot ?

quixote wrote:I tried chrooting into the Stretch install. Command line access is fine, and the whole system seems to be there as normal.
When I try startx though (from the # prompt since I forgot to try it as my user) it says [code]xinit: unable to connect to X server: Resource temporarily unavailable

You mean you try to start a X session as root in a chroot session ? Really ?
L_V
 
Posts: 1047
Joined: 2007-03-19 09:04

Re: "Cannot open access to console the root account is locke

Postby quixote » 2019-08-18 07:32

"You mean you try to start a X session as root in a chroot session ? Really ?"

Erm, yes, really. :oops: When I'm feeling calm I know not to do that, but I was frustrated by then so ....

Yes, I checked which partition loads very carefully. I had trouble with that initially, so I got good at figuring out which was which. Once I did the upgrade on sda2, it wasn't difficult since the time stamps are different in / .

I also changed the UUIDs to match the correct partitions in fstab. I rechecked everything letter by letter now that I'm having this trouble and there aren't any typos. Come to think of it, you can disable UUID checking in /etc/default/grub. I wonder if that might be worth trying, if somehow the UUID is the problem??

Part of me says it *has* to be some UUID problem, but then why was it working fine before?

Anyway, thanks for your suggestions!
User avatar
quixote
 
Posts: 100
Joined: 2009-10-15 02:51
Location: Sitooterie

Re: "Cannot open access to console the root account is locke

Postby L_V » 2019-08-18 07:45

quixote wrote: I rechecked everything letter by letter!
You should also check again the digits.
L_V
 
Posts: 1047
Joined: 2007-03-19 09:04

Re: "Cannot open access to console the root account is locke

Postby phenest » 2019-08-18 08:43

Have you tried the device node in fstab instead of the UUID? For example: /dev/sda5.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
User avatar
phenest
 
Posts: 1703
Joined: 2010-03-09 09:38
Location: The Matrix

Re: "Cannot open access to console the root account is locke

Postby p.H » 2019-08-18 09:25

Be aware that system partition cloning is more tricky than it seems.

quixote wrote:Come to think of it, you can disable UUID checking in /etc/default/grub. I wonder if that might be worth trying, if somehow the UUID is the problem??

Don't do that. It won't help. This file is only for GRUB, not the rest of the system.

phenest wrote:Have you tried the device node in fstab instead of the UUID? For example: /dev/sda5.

Don't do that either. device node names /dev/sd* are not reliable.

1) The system init went into emergency mode because something when wrong. Usually, because a mandatory mount failed. You should see a related error message above or in the journal.

2) You cannot log into the emergency shell if you did not define a password for root (and use only sudo). While you are root in the chroot, define a root password with "passwd" so that you can log into the emergency shell and check what's wrong in the logs.
Also these commands may help provide useful information :
Code: Select all
cat /proc/cmdline
cat /etc/fstab
blkid
p.H
 
Posts: 1084
Joined: 2017-09-17 07:12

Re: "Cannot open access to console the root account is locke

Postby phenest » 2019-08-18 09:32

p.H wrote:
phenest wrote:Have you tried the device node in fstab instead of the UUID? For example: /dev/sda5.

Don't do that either. device node names /dev/sd* are not reliable.

I only meant that to be for testing, rather than a permanent solution.
If it works, there could be a problem with the UUID's. If it doesn't work, then the problem lies elsewhere.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
User avatar
phenest
 
Posts: 1703
Joined: 2010-03-09 09:38
Location: The Matrix

Re: "Cannot open access to console the root account is locke

Postby Dai_trying » 2019-08-18 09:40

One more thing to check is the PARTUUID, I have seen somewhere (can't remember exactly) that some thiings (might be grub or os-prober, but also might not) use it when looking at partition info. Might not be affecting the OP but worth checking if only to rule out as a potential problem.

I think I read somewhere that formatting a partition would leave the PARTUUID the same while changing the UUID of the partition but haven't actually checked to see if that is true as I've had no reason to, but could be relevant somewhere then cloning partitions.
Dai_trying
 
Posts: 752
Joined: 2016-01-07 12:25

Re: "Cannot open access to console the root account is locke

Postby phenest » 2019-08-18 09:51

ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
User avatar
phenest
 
Posts: 1703
Joined: 2010-03-09 09:38
Location: The Matrix

Re: "Cannot open access to console the root account is locke

Postby p.H » 2019-08-18 10:06

Dai_trying wrote:One more thing to check is the PARTUUID, I have seen somewhere (can't remember exactly) that some thiings (might be grub or os-prober, but also might not) use it when looking at partition info.

AFAIK, GRUB does not and cannot use PARTUUIDs (I wish it could). Neither does the Debian installer nor any other part of the system by default. If there are PARTUUIDs in /etc/fstab, you put them there.

Dai_trying wrote:I think I read somewhere that formatting a partition would leave the PARTUUID the same while changing the UUID of the partition

Correct.

Dai_trying wrote:could be relevant somewhere then cloning partitions.

Usually partition cloning clones the UUID but not the PARTUUID.
p.H
 
Posts: 1084
Joined: 2017-09-17 07:12

Re: "Cannot open access to console the root account is locke

Postby Dai_trying » 2019-08-18 12:45

Thanks for the clarification I wasn't really sure about it all but thought mentioning it might help.
Dai_trying
 
Posts: 752
Joined: 2016-01-07 12:25

Re: "Cannot open access to console the root account is locke

Postby quixote » 2019-08-18 19:44

Thank you, thank you, thank you for all the good suggestions! I'm off to try them now (it's morning here :D ).

I haven't used partuuids because I don't understand them. I get that uuid works much better than the old system, but, dang, it was so much easier :mrgreen: .

Will read up on things first using that interesting-looking link about uuid.
User avatar
quixote
 
Posts: 100
Joined: 2009-10-15 02:51
Location: Sitooterie

Re: "Cannot open access to console the root account is locke

Postby quixote » 2019-08-21 03:08

The bad news is that nothing seems to change the message about the root account being locked.

I tried using the device name in fstab instead of uuid, but it couldn't find that either.

The UUID article is excellent. Apparently grub2 will use PARTUUID. I used Schroder's instructions from the article to find them for all my partitions, tried that, still doesn't start up.

Maybe I should go into grub rescue mode, it suddenly occurs to me, and see if I can figure out what the machine thinks it's looking for.

Anyway, last thing I tried was to set up a root password, but still the same message: root account is locked.

I'm totally baffled.
User avatar
quixote
 
Posts: 100
Joined: 2009-10-15 02:51
Location: Sitooterie

Re: "Cannot open access to console the root account is locke

Postby p.H » 2019-08-21 08:17

quixote wrote:The bad news is that nothing seems to change the message about the root account being locked.

What is the output of
Code: Select all
passwd --status root

in chroot ?

Also, can you post the error message causing the system initialization to start sulogin ?
p.H
 
Posts: 1084
Joined: 2017-09-17 07:12

Re: "Cannot open access to console the root account is locke

Postby quixote » 2019-08-22 20:57

after chrooting:
Code: Select all
root P 08/21/2019 0 99999 7 -1
I can understand the date part, that's when I gave root a password. What does the rest mean?

While booting, if I remember right (I'll get it verbatim the next time I try booting), it gets to the message saying network is ok, then says I'm now in emergency mode, and after logging in I should check journal[?something] -kb [something like that], and/or check a log system[something].

But instead of dropping to a root shell, it gives me the "cannot open access to console, root account locked" message.

A return just cycles through the same set of messages. Ctrl-Alt-Delete does lead to a restart. No other key presses seem to do anything.

Does any of that suggest anything?? :?:
User avatar
quixote
 
Posts: 100
Joined: 2009-10-15 02:51
Location: Sitooterie

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable