You are not logged in.

#1 2014-07-03 00:24:41

JosephRT
Member
Registered: 2014-07-02
Posts: 4

Not getting prompted for key for my encrypted root on boot

I just installed Arch for the first time on my laptop and I'm having some trouble getting my root partition to unlock on boot.  I've got two SSDs that I've got in RAID 0: a 300MB boot partition on each one (essentially empty space on the second drive), a 10GB root partition on each, and the rest is allocated to RAM.  The root and home partitions are in RAID 0 using mdadm.  I used dm-crypt with cryptsetup to encrypt the root and home arrays.  The setup seemed to go well; I can open each of them using cryptsetup.

Booting is another problem, however.  I'm using GRUB2 which is booting and showing me my Arch install.  Before I boot I go into the the options and set the linux line to:

/vmlinuz-linux root=/dev/mapper/root rw text cryptdevice=/dev/md0:root

Where "/dev/mapper/root" is the location of where the root partition should be after it's unlocked, "/dev/md0" is the root array, and "root" is what I want it mapped to.  Booting with that gives me:

:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
:: running hook [encrypt]
Waiting 10 seconds for device /dev/mapper/root ...
Waiting 10 seconds for device /dev/mapper/root ...
ERROR: device '/dev/mapper/root' not found.  Skipping fsck
ERROR: Unable to find root device '/dev/mapper/root'
You are being dropped to a recovery shell
	Type 'exit' to try and continue booting
sh: can't access tty: job control turned off

Which looks to me like it either can't find /dev/md0 or it doesn't understand that I should be prompted.  I've done a little bit of rearranging with mkinitcpio.conf and it's currently looking like:

MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block mdadm_udev encrypt filesystem keyboard fsck"

I've tried swapping "mdadm_udev" and "encrypt" around, but I'm getting the same result after I re-run mkinitcpio.  I imagine I've got something misconfigured here, but I don't know what it is and could use some help figuring it out.

Last edited by JosephRT (2014-07-03 02:07:21)

Offline

#2 2014-07-03 00:57:03

bch24
Member
Registered: 2011-11-20
Posts: 27

Re: Not getting prompted for key for my encrypted root on boot

JosephRT wrote:
/vmlinuz-linux root=/dev/mapper/root rw text cryptsetup=/dev/md0:root

Where "/dev/mapper/root" is the location of where the root partition should be after it's unlocked, "/dev/md0" is the root array, and "root" is what I want it mapped to.  Booting with that gives me:

:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
:: running hook [encrypt]
Waiting 10 seconds for device /dev/mapper/root ...
Waiting 10 seconds for device /dev/mapper/root ...
ERROR: device '/dev/mapper/root' not found.  Skipping fsck
ERROR: Unable to find root device '/dev/mapper/root'
You are being dropped to a recovery shell
	Type 'exit' to try and continue booting
sh: can't access tty: job control turned off

I have been experiencing issues with cryptsetup and md raid where it does not prompt for password. In my case, if I enter the password when the Waiting prompt comes up then it will boot fine. It used to work properly, but a couple updates back it changed where it no longer prompts. My other systems that boot encrypted without raid have no problems.

So, if you havent tried, type in your password when the wait prompt comes up.

Offline

#3 2014-07-03 00:58:56

aoba
Member
Registered: 2013-08-30
Posts: 70

Re: Not getting prompted for key for my encrypted root on boot

Try changing

cryptsetup=/dev/md0:root

to

cryptdevice=/dev/md0:root

Offline

#4 2014-07-03 02:09:21

JosephRT
Member
Registered: 2014-07-02
Posts: 4

Re: Not getting prompted for key for my encrypted root on boot

bch24 wrote:

I have been experiencing issues with cryptsetup and md raid where it does not prompt for password. In my case, if I enter the password when the Waiting prompt comes up then it will boot fine. It used to work properly, but a couple updates back it changed where it no longer prompts. My other systems that boot encrypted without raid have no problems.

So, if you havent tried, type in your password when the wait prompt comes up.

Gave it a shot, but no dice.  You mean type it in when it's telling me that it's looking for it?  I can type it out in plan text, but it doesn't take.

@aoba I actually have that was a typo in my initial post that I just fixed.  Thanks for spotting that, though.

Offline

#5 2014-11-02 16:55:03

JosephRT
Member
Registered: 2014-07-02
Posts: 4

Re: Not getting prompted for key for my encrypted root on boot

I apologize for the necro-post, but I realized that I never came back and answered my question after I got it working.  Per xkcd 979, I hate it when I find a topic that describes my problem exactly but with no solution.

My problem was that my mdadm.conf on my installed system wasn't set up properly.  After I chroot'ed into it and set it up, I was able to boot into my system.

Offline

Board footer

Powered by FluxBB