Skip to content

Instantly share code, notes, and snippets.

@gnh1201
Last active May 27, 2024 21:26
Show Gist options
  • Save gnh1201/ef8fd8b7aa7ba1f76708d2e701ae25a5 to your computer and use it in GitHub Desktop.
Save gnh1201/ef8fd8b7aa7ba1f76708d2e701ae25a5 to your computer and use it in GitHub Desktop.
How to fix "can not open access to console the root account is locked"

How to fix "can not open access to console the root account is locked"

I recently experienced this problem, but I only had answers that did not help. Then, I was able to get a hint from the short opinion of the Linux Forum.

This problem is related to the change of the drive. If it is not properly reflected in /etc/fstab, such an error may occur.

  1. Download SystemRescueCD and make a bootdisk: https://www.system-rescue.org/

  2. FDISK and MOUNT

    # fdisk -l    # find a drive
    # mkdir /mnt/tmp
    # mount -t ext4 /dev/sda2 /mnt/tmp    # mount -t [filesystem] [drive] [mountpoint]
  3. Open the [mountpoint]/etc/fstab in text editor, and remove lines of the detacted devices

  4. Save and reboot, and remove the bootdisk.

Done.

References

@NaolB02
Copy link

NaolB02 commented May 27, 2024

Thank you for the reply.

@NaolB02 In similar cases, what I usually check is the block UUID. I hope the following link will be helpful for you.

https://unix.stackexchange.com/questions/658/linux-how-can-i-view-all-uuids-for-all-available-disks-on-my-system

I was trying to install some package on my kali linux which took long and then black out the screen with a single blinking cursor. It just stayed there so I powered it off. When I tried to restart it, it would bring the same error. I check the /etc/fstab file using SystemRescue but there seems nothing wrong. Do you know anyway of solving this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment