Manjaro Linux Forum

Technical Issues and Assistance => Newbie Corner => Topic started by: Zdenko on 23. February 2016, 11:55:59

Title: Encryption password no longer works after update
Post by: Zdenko on 23. February 2016, 11:55:59
Hi,

I'm a relative Manjaro and linux Newbie. I've been using Kubuntu for 6 months or so and I tried a Manjaro install last week.

I like Manjaro a lot but I have a major problem since yesterday:

I installed Manjaro with the disk encryption option using the Thus installer. This was fine, and every time the computer started it asked me for the password and let me in to the login screen correctly. Two days ago, I did a system update using Octopi and after reboot, the encryption password fails.

Luckily, after only a week of use, I wasn't massively invested in the install. So I reinstalled, and this time for the encryption I chose "password1234" just to make sure that it's not a character problem for Manjaro not recognizing my Swedish keyboard correctly.

Again, the password works until the Octopi update. Then, after reboot, I can't get past the encryption password screen.

Obviously, this is a major problem, as I'm locked out of my own system.

Any advice is most welcome. For the moment, I have a non-encrypted system, but that's less than ideal.
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 23. February 2016, 12:03:50
We have had currently an issue with disk encryption, but it is solved (https://forum.manjaro.org/index.php?topic=31356.msg257698#msg257698) now if you follow some instructions:
- either install a not affected kernel like 4.4 and reboot before updating
- or run sudo pacman -U http://repo.manjaro.org.uk/pool/overlay/cryptsetup-1.7.0-2-$(uname -m).pkg.tar.xz before updating
- or learn how to chroot a not decryptable root partition https://forum.manjaro.org/index.php?topic=31356.msg258127#msg258127
Title: Re: Encryption password no longer works after update
Post by: Zdenko on 23. February 2016, 12:14:33
Thanks for the suggestions. I will try them out.

However, just more broadly: I am concerned that this happened "out of the blue" for me. If I fix the problem and continue using Manjaro, how can I be sure that something like this won't occur again? Obviously, having some problems might be tolerable, but when the problem is that you can't access everything on your computer... That's really bad.

Is this because Manjaro is a rolling release? In which case, does this mean I should switch to a distro that has stable versions released every 6 months or so?

I'm rambling, but basically: how can I avoid this in the future, especially as it would be a major problem.
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 23. February 2016, 12:27:40
Manjaro packages get tested before released as stable. Nevertheless bugs can slip through. :(
To be dilligent you need
- to have a backup strategy
- to learn and practice using the terminal (most part is about keeping cool and reading carefully)
- to follow the forums a bit
- to keep cool and be patient, because a solution is usually found quite soon and the steps described in clear language
Title: Re: Encryption password no longer works after update
Post by: Zdenko on 23. February 2016, 14:36:05
Apologies in advance for the n00bness:

I looked up how to install a new kernel (your first advice point). I found the instructions here: https://wiki.manjaro.org/index.php/Manjaro_Kernels#Adding_New_Kernels

I put in the command:

sudo mhwd-kernel -i linux442

Which I assumed would be appropriate to 4.4.2.

This gave me:

Error: Please make sure if the given kernel(s) exist(s).

What am I doing wrong?
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 23. February 2016, 14:41:29
@Zdenko, it is just linux44
Title: Re: Encryption password no longer works after update
Post by: Zdenko on 23. February 2016, 15:19:16
Thank you. I now have the updated kernel. I did it a very n00b method though:

I went alt-space, then typed "kernel" and entered the settings manager for the kernel. There, I tried to install 4.4.2, but it returned an error about the wrong NVidia driver.

So I went to Octopi, and told it to update the NVidia driver. It updated the kernel at the same time, seemingly. Reboot proves it: I'm now using 4.4.2. I removed the older kernel. Reboot is working fine so far with encryption.

I totally see I did it a weird way round, but I appreciate all the help. I'm glad the encryption works again. It's important, I think.
Title: Re: Encryption password no longer works after update
Post by: apt-get on 29. February 2016, 16:45:48
I'm having the same problem as described in the original post.

I tried chrooting from a live disc, but when I run mhwd-kernel -i linux44 (or any other version) I receive "error: no targets specified (use -h for help)".

Does anyone know a fix for this?
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 29. February 2016, 17:25:42
I'm having the same problem as described in the original post.

I tried chrooting from a live disc, but when I run mhwd-kernel -i linux44 (or any other version) I receive "error: no targets specified (use -h for help)".

Does anyone know a fix for this?
You need to mount --bind /run /mnt/run according to this post https://forum.manjaro.org/index.php?topic=31356.msg258466#msg258466
I will better copy it over here:

Okay, VICTORY (at least so far)

Managed to install the latest kernel (45 rc) and it's working. Also tried 44, but couldn't log in - first there was a black screen and then a white screen saying that something went wrong (rly).

For all still struggling, maybe the following helps. This is what I did once in the live system and open terminal:

Code: [Select]
# su
Code: [Select]
# cryptsetup open --type luks /dev/sda2 root
Code: [Select]
# mount -t ext4 /dev/mapper/root /mnt
These are optional - if you want to install a new kernel:
Code: [Select]
# mount /dev/sda1 /mnt/boot
# mount --bind /dev /mnt/dev
# mount --bind /dev/pts /mnt/dev/pts
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys

Code: [Select]
# chroot /mnt /bin/bash
Install the updated cryptsetup package and/or linux45
Code: [Select]
pacman -U /var/cache/pacman/pkg/cryptsetup-1.7.0-1.1-$(uname -m).pkg.tar.xz
Code: [Select]
pacman -S linux45

Kudos! Three absolutely marvelous post! Thank you, heyne001!

Maybe just one addition:
Code: [Select]
# cp /etc/resolv.conf etc/resolv.confbefore running chroot command.
EDIT (15.04.2016): ONE IMPORTANT NOTE! The four mount commands are not optional, they are neccessary!

Thank you guys! Your posts helped me solving the luks-encryption-issue. ^^

For those who want to install another kernel instead, should mount "run" too:
Code: [Select]
# mount --bind /run /mnt/run
In my case the issue could only be solved by installing another kernel (4.4, old kernel was 4.1). Therefore I had to add the line above. Otherwise grub would post errors while mkinitcpio was running.

And if your computer/laptop/etc. uses UEFI, you should mount the efi partition, too:
Code: [Select]
# mount /dev/sda1 /mnt/boot/efi
To get detailed information about the partitions on your harddisk, this command is quite helpful:
Code: [Select]
lsblk -f
So you have to change the mount-point-names according to your partition-table.

I don't know if my last two points are really necessary, but it helped solving my problem. ^^
Well, one reason I moved from archlinux to manjaro was to avoid those downgrade-procedures(ok, first time on manjaro after six month old install, I am not angry or sth. ;-) ), but luckily there are well written 'step-by-step' guides in this forum.
So thanks again.
Title: Re: Encryption password no longer works after update
Post by: bossriger on 15. March 2016, 17:56:17
Please can someone help me?

I've been using the "fix" (in LiveCD 32bit/i686 version) like so:

Code: [Select]
su
lsblk -f
cryptsetup open --type luks /dev/sda2 root
lsblk -f
mount -t ext4 /dev/mapper/ManjaroVG-ManjaroRoot /mnt
chroot /mnt /bin/bash
pacman -U /var/cache/pacman/pkg/cryptsetup-1.7.0-1.1-$(uname -m).pkg.tar.xz

Everything is fine until I get to:

Code: [Select]
pacman -U /var/cache/pacman/pkg/cryptsetup-1.7.0-1.1-$(uname -m).pkg.tar.xz
That pacman code does not work. Specifically it says the packages is not in /var/cache/pacman/pkg/ (and indeed, when I look, it is empty. I also tried:

Code: [Select]
pacman -U http://repo.manjaro.org.uk/pool/overlay/cryptsetup-1.7.0-1.1-$(uname -m).pkg.tar.xz
And that pacman code does not work, as it does not find the package.

I even tried:

pacman -S cryptsetup and it finds the new version, And "Y" to install does install it. But in reality after I reboot, the new version is not installed.

Please can someone tell me how to do this
Code: [Select]
pacman -U /var/cache/pacman/pkg/cryptsetup-1.7.0-1.1-$(uname -m).pkg.tar.xz part - Please?  :(
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 15. March 2016, 18:05:03
You are refering to a fix from some time ago. Just figure that package versions have changed and the link is no more available. The fixed package is already available from default repositories, so just synchronize the repo and install the current package:
Code: [Select]
sudo pacman -Syy
sudo pacman -S cryptsetup
Title: Re: Encryption password no longer works after update
Post by: bossriger on 15. March 2016, 18:32:58
You are refering to a fix from some time ago. Just figure that package versions have changed and the link is no more available. The fixed package is already available from default repositories, so just synchronize the repo and install the current package:
Code: [Select]
sudo pacman -Syy
sudo pacman -S cryptsetup

Thank you, it installed the newer version of cryptsetup.

This fix does not work, as the same issue is still in place (so the new version is subject to the same issue).

This issue is still unresolved.  :(

The following is what I did:

Code: [Select]
su
lsblk -f
cryptsetup open --type luks /dev/sda2 root
lsblk -f
mount -t ext4 /dev/mapper/ManjaroVG-ManjaroRoot /mnt
chroot /mnt /bin/bash
pacman -Syy
pacman -S cryptsetup

Then reboot, to find issue is still not fixed.
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 15. March 2016, 18:39:48
Well, you didn't mount all the needed folders before chroot. heyne01 wrote that these mount commands are optional, they are actually neccessary.
Title: Re: Encryption password no longer works after update
Post by: bossriger on 15. March 2016, 18:52:30
Well, you didn't mount all the needed folders before chroot. heyne01 wrote that these mount commands are optional, they are actually neccessary.

I didn't know that, nobody said they were not optional... So now it's broken and I have to reinstall Manjaro?  :-\
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 15. March 2016, 18:58:01
I didn't know that, nobody said they were not optional... So now it's broken and I have to reinstall Manjaro?  :-\
I wrote this in the thread several times, but you didn't read to the end, no wonder the thread is long.
The Arch Wiki would have been a more reliable source of information.
I edited my post in this topic and mentioned that the four mount command are not optional but neccessary.
You can try again with the mount commands and it should probably work.
Title: Re: Encryption password no longer works after update
Post by: bossriger on 15. March 2016, 19:21:06
I wrote this in the thread several times, but you didn't read to the end, no wonder the thread is long.
The Arch Wiki would have been a more reliable source of information.

You can try again with the mount commands and it should probably work.

Thank you for your help. I appreciated it. I went back and did all this, including updating linux kernel. Like I said...

Code: [Select]
su
lsblk -f
cryptsetup open --type luks /dev/sda2 root
lsblk -f
mount -t ext4 /dev/mapper/ManjaroVG-ManjaroRoot /mnt
chroot /mnt /bin/bash
exit
mount /dev/sda1 /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
pacman -Syy
pacman -S cryptsetup
pacman -S linux45

This does not fix the issue. I feel I'm left with no option but to dump Manjaro and stop recommending it; that makes it a sad day.  :(
Title: Re: Encryption password no longer works after update
Post by: mandog on 15. March 2016, 19:36:46
Wow 4 posts and 2 hrs
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 15. March 2016, 19:45:22
You need to issue the mount commands before the chroot command!
Yeah it can be tricky sometimes with Manjaro, but not exclusively.
Title: Re: Encryption password no longer works after update
Post by: eugen-b on 15. March 2016, 20:01:35
Wow 4 posts and 2 hrs
Yeah, could be a troll, especially considering the last words. ;) :P
This does not fix the issue. I feel I'm left with no option but to dump Manjaro and stop recommending it; that makes it a sad day.  :(