CryptSetup Boot Disk Detection
Appears to be a bug booting up with full disk encryption via cryptsetup luks/lvm2, it is speratic and inconsistent bug making it hard to troubleshoot. Mabye some of you guys have a better idea whats going on.
I have eliminated the factor of all hardware based issues from various troubleshooting, It does not seem to have the issue with normal versions of Ubuntu x64 10.04.2.
Version: BackTrack 5 x64 Gnome - Default kernel.
Error: Disk with UUID=blahblah123 not found! Dropping to busybox shell!
Occurring: After sitting in a halted state for a period of time, It fails to detect the disk on the next boot. From the busybox shell I run 'cryptsetup luksOpen /dev/sda2 bt_crypt' and it fails to detect the disk. The disk is also not detected with 'ls -la /dev/disk/by-uuid/' at this point.
Volume Setup: Separate Logical Volumes for /root, /home, /swap in group bt_crypt. /boot on a seperate ext3 partition on the same disk.
Crypttab:
Code:
bt_crypt UUID=blahblah123 none luks,retry=1
Dirty Solution: Boot into ubuntu 10.04 normal live CD, unlock the disks, reboot. Seems to fix it for the rest of the day until it's halted cold for another extended period.
Not a cryptsetup pro or anything, if someone can shed some light on the issue I would appreciate it. :confused:
Re: CryptSetup Boot Disk Detection
Sorry for double post, But appears that the issue is when halting the system period, any form of full shutdown causes the next boot to fail to detect the disk. Could this possibly be an issue with not properly shutting down the cryptdisks?
I have still not been able to solve the issue with elegance... I cant imagine I am the only one running into this issue.
Note: When issuing reboot from terminal, the disks are detected correctly on the next startup.. Also cannot seem to find any similar issues on google, I will try to dig into some of the init scripts tonight and see if I can find anything..
Re: CryptSetup Boot Disk Detection
Might I suggest creating an extended partition, and then a logical (volume) within it for your encrypted bt-crypt. I have been using Kevin Riggins writeups for encrypted USB installs for my HDD installs, except I change it to use ext3 or ext4 and do create a swap space on the encrypted volume. His later writeups for USB suggest mounting the encrypted partition as ext2 and eliminating swap to prolong the life of the flash drive. Obviously that is not an issue with HDD's.
Since you are referring to your bt-crypt partition as sda2 I think it is a primary partition. The first extended partition (even if there is only one other primary partition) will always start as sd?5. (? = a, b, c etc depending on your number of installed disks).
Let me know, I am getting ready to do my encrypted installs and am curious if this makes any difference. I'm at a loss to explain why your workaround works but obviously its a pain to do.
Re: CryptSetup Boot Disk Detection
After redo'ing the entire encryption with the extended and logical partitions as you suggested, rather then the primary, it appears to work. I am not sure why would would matter as I only have 3 primary partitions, but hey, if it works it works!
Thanks for the idea.