Bug 1547278 - During rescue startup boot process halts with "cannot open access to console, the root account is locked"
Summary: During rescue startup boot process halts with "cannot open access to console,...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: bootconf
Version: 27
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-20 23:15 UTC by Matthew Koster
Modified: 2018-11-30 22:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 22:04:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Missing rescue menu item (30.84 KB, image/png)
2018-02-23 23:18 UTC, Matthew Koster
no flags Details
inst.rescue does not work (40.39 KB, image/png)
2018-02-23 23:19 UTC, Matthew Koster
no flags Details

Description Matthew Koster 2018-02-20 23:15:00 UTC
Description of problem:

Tried to boot from the latest Fedora ISO (Fedora-Workstation-Live-x86_64-27-1.6.iso) into Rescue Mode using "linux rescue" as per official documentation located here - https://docs-old.fedoraproject.org/en-US/Fedora/13/html/Installation_Guide/s1-rescuemode-boot.html which is the first official document to surface when doing a google search for fedora rescue mode.

Upon trying to boot, I get the message "cannot open access to console, the root account is locked" which a hint to check out sulogin(8) which states the following:

       sulogin is invoked by init when the system goes into single-user mode.

       The user is prompted:

            Give root password for system maintenance
            (or type Control-D for normal startup):

       If the root account is locked and --force is specified, no password is required.

It does not seem to be adding the --force flag into the command.


Version-Release number of selected component (if applicable): Fedora-Workstation-Live-x86_64-27-1.6.iso

How reproducible:
Tried it about 4 times, every time same issue

Steps to Reproduce:
1. Boot system from Fedora 27 DVD
2. Hit ESC to get kernel boot prompt
3. add "linux rescue" to kernel command line but delete "quiet rhgb"
4. boot to it
5. wait for the "cannot open access to console"

Actual results:
cannot get to a rescue command line mode to rescue/delete/fix the system

Expected results:
be able to rescue/delete/fix the system using a command line

Additional info:
This bug was reported in 2016 on Fedora 23 - 3 months after post, it was responded with an EOL response, the bug was never fixed.
https://bugzilla.redhat.com/show_bug.cgi?id=1371740

Comment 1 Marc Methot 2018-02-22 04:31:12 UTC
Hello,

I would advise following our current documentation for Fedora 27:
https://docs.fedoraproject.org/f27/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader.html#sec-Booting_to_Rescue_Mode

The first link in a google search isn't always the most relavent. I would also recommend first trying to reach out on the following link for usage assistance: https://ask.fedoraproject.org

Fedora 13 had many differences with 27 and that doc would indeed lead to failure. Try with our current documentation as I cannot reproduce any errors during setting up rescue mode.

Cheers,
MM

Comment 2 Matthew Koster 2018-02-22 21:40:57 UTC
The issue here is the new documentation requires the downed system to be able to read the OS files, even for systemd.unit=rescue.target and systemd.unit=emergency.target to work, the OS needs to know where the files are located.  In my current situation, where the Volume Group was renamed without an update to fstab and grub, both of these and regular boot result in a Dracut timeouts happening.  Hence the need to boot from the Live CD to try and recover.

There is no "e" option when booting from the Live CD, escape gives you the boot: prompt, but neither command works in this scenario...  The "linux rescue" does work (or at least it is a recognized command) but ends in not being able to work and gives the reason being "Root is locked".

The need for a viable rescue mode was to try and reverse the command.

This was eventually done via a response I found to a question asked at https://ask.fedoraproject.org in which it explains how to modify the kernel line to have the new vg which managed to get me into "emergency mode" where I could revert the vg naming.

However, none of this solves the issue that there is no way to boot into a rescue mode off the Live CD, which again, the only method I could find that works is by using "boot: linux rescue" which in turn fails with the message mentioned above.  Is there another way to boot into rescue mode from the Live CD (not from the downed system itself as the new documentation suggests) or is this no longer supported at all?

Comment 3 Matthew Koster 2018-02-23 23:08:54 UTC
I am currently testing the "Boot your computer to Rescue mode" documentation listed here - https://docs.fedoraproject.org/f27/install-guide/advanced/Boot_Options.html#sect-boot-options-rescue

Comment 4 Matthew Koster 2018-02-23 23:18:30 UTC
Created attachment 1400050 [details]
Missing rescue menu item

https://docs.fedoraproject.org/f27/install-guide/advanced/Boot_Options.html#sect-boot-options-rescue

Rescue a Fedora system is not in the troubleshooting menu

Comment 5 Matthew Koster 2018-02-23 23:19:30 UTC
Created attachment 1400051 [details]
inst.rescue does not work

https://docs.fedoraproject.org/f27/install-guide/advanced/Boot_Options.html#sect-boot-options-rescue

the inst.rescue boot option does not work either

Comment 6 Matthew Koster 2018-02-23 23:30:39 UTC
Sorry to spam, the inst.rescue works, but gets me into the graphical interface when used after hitting "tab" and putting it at the end of the boot arguments...

Which is still against what the documentation says:

"You may boot a command-line Linux system from an installation disc without actually installing Fedora on the computer. This enables you to use the utilities and functions of a running Linux system to modify or repair already installed operating systems.

To load the rescue system with the installation disk or USB drive, choose Rescue a Fedora system from the Troubleshooting submenu in the boot menu, or use the inst.rescue boot option."

I will be running more tests including using the default.rescue option which is supposed to load the drives of the system to /mnt/sysimage

Comment 7 Matthew Koster 2018-02-28 20:46:59 UTC
Ok, final tests have been completed.

Booting into rescue mode from the installation CD does not work.

The official documentation for booting into rescue mode from the CD located here - https://docs.fedoraproject.org/f27/install-guide/advanced/Boot_Options.html#sect-boot-options-rescue do not work.

I tested on my messed up drive, as well as a fresh install with nothing wrong.  According to the documentation provided, it states:

"Booting Your Computer in Rescue Mode
You may boot a command-line Linux system from an installation disc without actually installing Fedora on the computer. This enables you to use the utilities and functions of a running Linux system to modify or repair already installed operating systems.

To load the rescue system with the installation disk or USB drive, choose Rescue a Fedora system from the Troubleshooting submenu in the boot menu, or use the inst.rescue boot option.

Specify the language, keyboard layout and network settings for the rescue system with the screens that follow. The final setup screen configures access to the existing system on your computer.

By default, rescue mode attaches an existing operating system to the rescue system under the directory /mnt/sysimage/."


After testing I have concluded the following:

1. The statement "choose Rescue a Fedora system from the Troubleshooting submenu in the boot menu" is FALSE, said submenu does not exist

2. the statement "or use the inst.rescue boot option" is FALSE, although the boot options accept this parameter, it shows no change from a regular boot to the install disk, loading up the graphical user interface and asking to either Try Fedora or Install to Hard Drive.  This inevitably makes...

3. The statement "By default, rescue mode attaches an existing operating system to the rescue system under the directory /mnt/sysimage/" is FALSE, as with the above, as the option inst.rescue has no real effect on the boot process of the installation CD, it does not load the system OS to this directory, or any directory.


I will also note that I attempted to boot to systemd.unit=rescue.target to boot a clean system and was faced with the same "Cannot open access to console, the root account is locked." message and then continues with the boot process. This only happens when Root password is NOT set, it does work if there is a Root password, which means this will only work some of the time.

I also attempted to boot into systemd.unit=emergency.target which just booted me into the OS, not emergency mode.

I still believe there is an issue here.  In no case to I get into a rescue environment to fix anything.  I am either entered into the OS, or presented with the message that it can't enter due to Root being locked.

Comment 8 Patrick J. Maloney 2018-06-26 14:30:19 UTC
Some FYI on my work-around to this:

1.  I created a F28 bootable stick with a persistent overlay using livecd-iso-to-disk command.

2.  I then booted that USB normally into the live GUI, logged into root, set a password, and then rebooted.  Because of the persistent overlay, the root password was remembered.

3.  This time, I hit ESC at the menu, typed 'linux rescue', and got past the 'root account is locked' problem.

At this point, /mnt/sysimage does not exist so I can't chroot to my system root filesystem.  So, that just becomes an exercise for the user.  I figured out how to mount my drives (mine are encrypted) manually into /mnt/sysimage and then did a chroot to that.  It kept prompting me to do 'mount -t proc proc /proc' so I did that, too.

At this point, I was ready to try to resolve my problem, which I did (a libgcc*.so was truncated) and was able to boot back into my main system.

Good Luck!

Comment 9 Ben Cotton 2018-11-27 15:05:39 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Ben Cotton 2018-11-30 22:04:46 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.