1

I have a problem with encryption. I installed ubuntu 1804 with full disk encryption. Then I added RU language as additional language to type. I moved it to be first. Few days ago I could not enter password on startup but somehow I did it. Right now I have same problem again. I got to terminal window and see:

(initramfs) _ If I try to type something it types in RU language and I can switch it to EN. I believe the problem with the password is that I can't change the language. Normally WinKey+Space worked fine but now it doesn't work tried nearly all combinations with Ctrl, Alt nothing seems to work. Any help?

Alex K.
  • 11

1 Answers1

0

As solution, I recommend you boot from live CD and change password of your partition to latin layout.

Access an encrypted system from a Live CD:

In the case of emergency, it may be useful to have access to the encrypted files of a system installed by using this manual (you need the password, for sure). Boot the Live CD and install the needed software:

sudo apt-get install lvm2 cryptsetup
sudo modprobe dm-crypt

Open/decrypt the device (replace sda2 with your device if needed):

sudo cryptsetup luksOpen /dev/sda2 lvm

Activate the LVM to get /dev/ubuntu/home, /dev/ubuntu/root and /dev/ubuntu/swap:

sudo pvscan
sudo vgscan
sudo lvscan
sudo vgchange -a y

Mount the root and home partition:

sudo mkdir /mnt/root
sudo mount /dev/ubuntu/root /mnt/root
sudo mkdir /mnt/home
sudo mount /dev/ubuntu/home /mnt/home

Now you can access your home partition via /mnt/home, the root partition is located at /mnt/root. So you can copy or edit all of your data. If you don't have enough permissions to copy needed files, try it with a filemanager started with gksudo nautilus.

Change/add/remove passwords:

LUKS is able to manage up to eight passwords at the same time. Each password will be stored in a so-called slot (0-7). The currently used slots of the encrypted partition can be printed out by using luksDump (don't forget to replace sdX2 with your own partition, e.g. sda2):

sudo cryptsetup luksDump /dev/sdX2

[...example output follows...]
Key Slot 0: ENABLED
    Iterations:             xxxxxx
    Salt:                   [...]
                            [...]
    Key material offset:    8
    AF stripes:             4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

To add a new password, use luksAddKey:

sudo cryptsetup luksAddKey /dev/sdX2

To remove an existing password, use luksRemoveKey:

sudo cryptsetup luksRemoveKey /dev/sdX2

Source: http://blog.andreas-haerter.com/2011/06/18/ubuntu-full-disk-encryption-lvm-luks#tips_and_tricks

Some solutions to change password encrypted LVM: https://askubuntu.com/a/110195/881020

slava
  • 3,887
  • Thanks for your answer. What I was doing is that at startup I was selecting previous configuration and could enter the password. I will give it a try. – Alex K. Nov 24 '18 at 00:11