2

First off, I've been looking into this question for quite a while, but it seems that finding a solution in near impossible.

So here's the deal:

I have an encrypted LVM setup, multiple drives fused to one mount point. When I boot the server, I unlock the encryption with a password, that I remember. The boot starts, and then hangs because of a problem with a drive; it cannot mount 1 drive that is required in the fstab.

The boot then stops, and enters emergency mode, where it asks for a root password, that, for the life of me, I can't remember. I think it might have something to do with the keyboard that's AZERTY when the keyboard is seen as QWERTY by the OS.

I've been told that the best way to do would be to boot a bash shell before the OS and then change the root password from there, comment the drives out in fstab, and reboot. Is it possible ? How should I do such thing?

1
  • It is definately possible to fix this - but the advice to boot to a bash shell is overly simplistic and the exact steps are a bit variable. You need to use a rescue CD which recognises LVM and has decryption tools - in general terms you boot the rescue disk, ensure the LVM is reconstructed, manually decrypt the root partition, mount it and edit /etc/shadow to change the root password. You can, of-course also fix the fstab file at this point.
    – davidgo
    Commented Dec 14, 2017 at 18:10

0

You must log in to answer this question.

Browse other questions tagged .