LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fsck on encrypted partition (https://www.linuxquestions.org/questions/linux-newbie-8/fsck-on-encrypted-partition-927753/)

velouria 02-05-2012 10:46 AM

fsck on encrypted partition
 
hi all,

my home partition is encrypted. when i try to boot on fedora 16 i get 'try to run fsck manually'. I try and get fsck.crypto:not found

what should be the output of modprobe dm-crypt? and cryptsetup luksOpen /dev/hda5 crypt1?

my home partition is sda2. does that mean i should replace hda5 by sda2 in the command above?

in any case after typing exit it boots normally

can anyone help me to fix this?

rknichols 02-05-2012 11:28 AM

Quote:

Originally Posted by velouria (Post 4594405)
hi all,

my home partition is encrypted. when i try to boot on fedora 16 i get 'try to run fsck manually'. I try and get fsck.crypto:not found

what should be the output of modprobe dm-crypt? and cryptsetup luksOpen /dev/hda5 crypt1?

my home partition is sda2. does that mean i should replace hda5 by sda2 in the command above?

If the encrypted partition is on /dev/sda2, then you would need to run
Code:

cryptsetup luksOpen /dev/sda2 crypt1
fsck /dev/mapper/crypt1


velouria 02-06-2012 04:19 AM

hi and thank you,

it doesn't seem to work though. the output is

[root@localhost liveuser]# fsck /dev/mapper/crypt1
fsck from util-linux-ng 2.18
fsck: fsck.LVM2_member: not found
fsck: Error 2 while executing fsck.LVM2_member for /dev/mapper/crypt1

what should i do now?

rknichols 02-06-2012 02:46 PM

Ouch! I didn't realize LVM was involved. Since cryptsetup was able to open the partition, it sounds like you have an encrypted partition used as an LVM logical volume. I've never used that sort of LVM setup, but I believe you would need to run "lvscan" to identify the LVM volume names and then give one of those volume names to fsck in place of "/dev/sda2". You might need to do a physical volume scan ("pvscan") first.

I have no experience mixing LVM with encryption, and I have no easy way to test any of it. Sorry.


All times are GMT -5. The time now is 01:05 PM.