Problem with crypted LVM after Debian installation
Hello,
I installed Fedora on crypted LVM (I created it using partition manager from installation program). It works fine: ask for passphrase during startup. Then I installed Debian on the other partition (again crypted LVM). At the moment I am not able to run Fedora anymore. My passphrase doesn't work. After the third attempt I see messages that /dev/sda3 (my Fedora crypted LVM) is not a LUKS partition... pvscan recognise /dev/sda3 as LVM PV partition, but command: Code:
cryptsetup luksOpen /dev/sda3 lvvm |
pvscan shouldn't be able to recognize the partition if its not been opened with luksOpen. It's possible that something got overwritten when you did your debian install, but lets not jump to conclusions.
We could do with seeing the output from the following to better advise you. Code:
|
Thank you for your answer! I have thought that nobody would answer to my question.
fdisk -l /dev/sda : Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes cryptsetup luksDump /dev/sda3 : Code:
/dev/sda3 is not a LUKS partition Code:
Code:
cryptsetup luksOpen /dev/sda4 Code:
PV VG Fmt Attr PSize PFree |
hmmm...
The fdisk -l shows that you only have one lvm partition (type 8e) sda3. sda4 is a standard linux partition. Normally a pvcreate won't let you create on a non lvm type partition, but as we're dealing with a luks mapping that may explain why pvcreate managed to create a pv on it. Worryingly, the pvs command shows that its finding a lvm physical volume, on sda3 which it shouldn't as that is the encrypted device and it should only find it on the /dev/mapper device associated with it when you open it. Your psize/pfree show it as being empty and its not allocated to a volume group. Here's mine for comparison purposes. Code:
root@jupiter:~# pvs Are these commands being run from your running debian system or a live/recovery cd? If you're running from a live cd, try a Code:
vgscan --mknodes If they're from your debian system I'd be interested to see the output of commands. Code:
mount My gut feeling is that somehow during the debian install a new physical volume has been created over the sda3 partition wiping out the existing luks metadata. The unopened sda3 would have just looked like random data to the installer so there's no way it could have known it was already in use. Your sda4 appears to have a pv header on it, but at this stage its not clear whether its actually being used as such. |
Quote:
Quote:
Could you advise me how to prevent a situation like this? Is it better to create two PV manually and than to install these two system on it? |
Quote:
The only thing you can do to mitigate this sort of stuff is to develop a healthy case of paranoia and take a few extra seconds before you hit that final <enter>. Double and triple check any confirmation dialogs or command line you've just typed when installing to sense-check what it's going to do, rather than what you think you've told it to do. Doing this has saved me on more than one occasion. As for recovering sda3, if as it appears, lvm has written its pv metadata over the top of your luks encrypted partition then I'd be very surprised if there's any way to recover it. |
Somehow I have destroyed again pv on sda3 (with new Fedora installation) after Debian installation on sdb4. So I have installed Fedora again on sda3 and now everyting works fine.
Thank you for your explanations! |
You're welcome Setkos. Glad you got there in the end.
|
All times are GMT -5. The time now is 02:17 AM. |