Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

cryptsetup: lvm is not available

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
rovernut
Posts: 108
Joined: 2013-11-20 10:50
Been thanked: 1 time

cryptsetup: lvm is not available

#1 Post by rovernut »

I just installed Jessie 8.3 to a computer I'm refurbishing for my brother. It will have a good bit of personal financial information on it so I set it up with encrypted drives and the boot partition on a thumb drive.
It's a single new 1TB drive partitioned:

Code: Select all

/
swap
/home
One thing I hadn't done that I usually do with a new drive is to run a SMART test to make sure it checks out.

It was working fine, had rebooted several times without issue. Then yesterday I shut it down to install some more memory that I found, going from 2GB to 4GB. I hadn't made any system changes or done any updates between booting it yesterday morning and shutting it down to replace the memory.

On reboot it asked for the passphrase for sda1_crypt which it accepted, but that's as far as it gets. This is what I see

Code: Select all

Please unlock disk sda1_crypt
crptsetup: sda1_crypt set up successfuly
cryptsetup: lvm is not available
cryptsetup: lvm is not available
cryptsetup: lvm is not available
and so on until it eventually drops to this screen

Image

The first thing I did was put the old memory back in. I thought it unlikely to be the issue, but wanted to rule it out.
Once I was back to the the prompt I ran

Code: Select all

blkid
and the missing uuid is definitely not there.
and

Code: Select all

cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.16.0-4-amd64 root=/dev/mapper/sda1_crypt ro single
Since this is a fresh install and all I've done is some customization I could just start over, but I'm looking at this as a learning experience, so I'd like to recover from it. Assuming that's possible.
I'm sure I'm not the first to experience this, but I've done some googling but didn't see anyone that appeared to have the same issue.

Any suggestions for next steps?
Tom Rowe

Four wheel drive allows you to get stuck
in places even more inaccessible.

User avatar
efrpcabo
Posts: 108
Joined: 2013-08-08 06:36

Re: cryptsetup: lvm is not available

#2 Post by efrpcabo »

Same thing happened to me today after I took my disk and connect it to a second computer, in which it ran fine.

But, when I put it back in the first computer, it gave me the same errors (except uuid are different, of course).

I also couldn't solve this.

Any ideas?

User avatar
efrpcabo
Posts: 108
Joined: 2013-08-08 06:36

Re: cryptsetup: lvm is not available

#3 Post by efrpcabo »

Well, finally solved it.
The solution was quite simple and fast, took me about 5m, because I had the Debian DVD around from the initial installation:
1 - booted with a Debian 8 DVD
2 - chose rescue mode, then country, keymap, etc
3 - then, the installer found automatically my encripted partitions and asked me for its passwords
4 - then, it asked me where was my root partition, in my case /dev/mapper/sda3_crypt
5 - then, I chose the option "reinstall grub" and it reinstalled but gave me some errors about some missing modules
6 - afterwards, I chose "drop to a shell in /dev/mapper/sda3_crypt" and then I did: update-initramfs -u -k all
7 - finally, I rebooted and it worked like a charm
That was it!

nevvy
Posts: 1
Joined: 2017-05-18 13:42

Re: cryptsetup: lvm is not available

#4 Post by nevvy »

efrpcabo wrote:Well, finally solved it.
The solution was quite simple and fast, took me about 5m, because I had the Debian DVD around from the initial installation:
1 - booted with a Debian 8 DVD
2 - chose rescue mode, then country, keymap, etc
3 - then, the installer found automatically my encripted partitions and asked me for its passwords
4 - then, it asked me where was my root partition, in my case /dev/mapper/sda3_crypt
5 - then, I chose the option "reinstall grub" and it reinstalled but gave me some errors about some missing modules
6 - afterwards, I chose "drop to a shell in /dev/mapper/sda3_crypt" and then I did: update-initramfs -u -k all
7 - finally, I rebooted and it worked like a charm
That was it!
Thanks efrpcabo, this recipe worked for me as well.

As for the source of the problem, it seems to be the encrypted swap partition. In my case the problem appeared when I started messing around with swap (though I have another encrypted partition as well); googling the "lvm not found" error found plenty of posts (with no solutions), all of which mentioned having encrypted swap.

I was too lazy to test the two parts of the recipe (reinstall grub and update initramfs) separately, but grub seemed fine to me as it was, so I'd guess that the problem was with initramfs. Although still - no idea as to what exactly breaks down there.

Post Reply