LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   No prompt at boot for encrypted partition (https://www.linuxquestions.org/questions/linux-security-4/no-prompt-at-boot-for-encrypted-partition-4175465523/)

pingu 06-11-2013 03:27 AM

No prompt at boot for encrypted partition
 
LinuxMint 14 on a HP ProBook 6465b, /home is encrypted (luks)
Problem is, when booting I don't get a prompt asking for the key? Message on screen is "Disk drive not ready or not present".
I then press "M" for manual recovery, root password, mount /home manually and exit - voila, all is fine.
Of course I could keep doing this but it is pretty annoying, I do want to simply be asked for encryption key.

What I did was, I encrypted /home running LMDE, unfortunately LMDE had a few problems with my hardware (bluetooth & wlan), so I wiped it and installed Mint14.
I did not mount /home during installation so encryption wasn't set up at first, installed that manually.
And so, it works but problem is /home doesn't get mounted/unlocked at boot.

My /etc/fstab:
/dev/mapper/cryptHome /home ext4 defaults 1 2

My /etc/crypttab:
cryptHome /dev/sda6 none luks
#cryptHome UUID=0124c3d0-2bec-4b04-bf56-e2fc72040694
(It doesn't matter which line I use)

The 2 lines for mounting /home manually:
cryptsetup luksOpen /dev/sda6 cryptHome
mount /home

Z038 06-12-2013 08:05 PM

I wonder if /dev/mapper works in fstab. I always specify /dev/<volumegroupname>/<logicalvolumename> for the device name.

All of these are encrypted partitions mounted in my fstab:

Code:

/dev/vg02/swap  swap            swap        defaults        0  0
/dev/vg02/root  /                ext4        defaults        1  1
/dev/vg02/ds9    /home            ext4        defaults        1  2
/dev/vg01/bk    /mnt/bk          ext3        defaults        1  2

I also boot using an initrd and I specify all of the encrypted devices on the -C switch when I run mkinitrd.

Like so:

Code:

mkinitrd -c -k 3.2.29 -f ext4 -r /dev/vg02/root -m mbcache:jbd2:ext4 \
  -C /dev/sdc5:/dev/sda5:/dev/sdb5 -L -u -o /boot/initrd.gz


pingu 06-13-2013 11:36 AM

Quote:

Originally Posted by Z038 (Post 4970682)
I wonder if /dev/mapper works in fstab. I always specify /dev/<volumegroupname>/<logicalvolumename> for the device name.

Yes it works - I have no problem mounting the encrypted drive manually.
I think the difference is that you use LVM, I don't.

But that thought about initrd is interresting!
Maybe my initrd needs support for encryption, I will check that next week when I'm back.


All times are GMT -5. The time now is 03:30 AM.