Rich Freeman on 19 Apr 2015 15:37:46 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Help with encrypted SSD


On Sun, Apr 19, 2015 at 5:09 PM, Lee H. Marzke <lee@marzke.net> wrote:
> If I can get the drive unlocked,  I'll try  that.

You may need to do it on a different computer.  I have no idea what
your BIOS is doing, but the BIOS is just a program, and programs do
whatever they were designed to do.  They could make it refuse to work
on the second Tuesday of the month if they wanted to.  Maybe it is
supposed to be a feature linking the BIOS password and the drive
password.  I guess you're hosed if you install two drives with
different passwords in the same machine.

fdisk definitely won't work if the drive is locked, because it reads
the drive.  You would need to use hdparm to see what is going on.
hdparm -I /dev/sda will tell you at the bottom what the security
status of the drive is.  If it is frozen then you have to stick it in
a PC that has a BIOS that won't freeze the drive.  Maybe you could
unplug it and plug it back in again while the PC is powered in AHCI
mode.

But, you may need a vendor-specific command to unlock it if it doesn't
response to a secure erase without a password.

>
> The problem is LVM is inside DM-crypt,  so DM needs to be expanded
> first.     The installer has a script to do this but it only does
> 100% of the drive as DM-crypt/LVM,  and I want part reserved for
> VM's which don't do as well running inside an encrypted partition.

Does DM-crypt actually store metadata including the volume length?  I
thought it was just a passthrough.  If it is then all you have to do
is partition the new drive with two 500GB partitions, dd the old
partitions over them, and then mount them.  DM-crypt will just unlock
each partition as 250GB of whatever was on there before followed by
250GB of random data.  Then you can expand your lvm volumes and/or
filesystems over that space.

If DM-crypt does store the volume length in some kind of metadata,
then there should be some tool to expand the volume.  You just have to
start at the bottom layer and work your way up.

--
Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug