You are not logged in.
Hi Folks,
Used to use Arch a while back - decided to give it a go again.
I've followed the wiki to try and get arch set up with an encrypted system partition. I partitioned the drives as follows:
boot /dev/sda1
swap /dev/sda2
root /dev/sda3
I encrypted the drive like so:
cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sda3
and left the swap partition for the time being, as there is info at the bottom regarding having swapspace with a random passphrase which I'll try setting up later. I'm just using a passphrase on the root partition as it looked simpler than setting up a keyfile.
I've run through the arch setup obviously selecting /dev/sda1 for the boot partition and /dev/mapper/root for the root partition. Added encrypt into the HOOKS line in /etc/mkinitcpio.conf as well as EXT4 into the modules line. Edited the grub.conf like so:
# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz-linux cryptdevice=/dev/sda3:root root=/dev/mapper/root ro
initrd /initramfs-linux.img
then rebooted.
I get
:: Running Hook [encrypt]
Waiting 10 seconds for device /dev/sda3 ...
:: Running Hook [udev]
:: Triggering uevents...done.
Waiting 10 seconds for device /dev/mapper/root ...
ERROR: Unable to find root device '/dev/mapper/root'.
which kinda makes sense, as it's not asked for a passphrase so can't possibly be mounted.
Any ideas where this has gone wrong?
Thanks
Last edited by r-dubz (2012-01-22 20:58:36)
Offline
What's the structure of the logical volume you have sitting on top of sda3? I.e., what exact commands did you run, after encrypting the partition, to make the partition ready for installing on?
What's the exact HOOKS line in mkinitcpio.conf? Order matters.
Offline
Thanks for the reply.
I ran the
cryptsetup luksOpen /dev/sda3 root
command which creates the /dev/mapper/root device and then chose this device during the /arch/setup as opposed to /dev/sda3.
I put encrypt in the hooks like so:
HOOKS="base encrypt udev autodetect pata scsi sata filesystems"
Cheers.
EDIT: Mistake in HOOKS line.
Last edited by r-dubz (2012-01-22 19:43:56)
Offline
Okay, usually people with LUKS also use LVM. I have LUKS sandwiched between two layers of LVM2 ;-) But I can't think of any reason off the top of my head why you can't just have LUKS by itself ...
I don't see any "encrypt" in your hooks line. I think it should go between "sata" and "filesystems".
Offline
Okay, usually people with LUKS also use LVM. I have LUKS sandwiched between two layers of LVM2 ;-) But I can't think of any reason off the top of my head why you can't just have LUKS by itself ...
I don't see any "encrypt" in your hooks line. I think it should go between "sata" and "filesystems".
I actually had it at the start after base (not sure why I chose there) but maybe moving it to where you suggested might help. I'll give that a go - cheers.
Offline
I actually had it at the start after base (not sure why I chose there) but maybe moving it to where you suggested might help. I'll give that a go - cheers.
Aha, I must be going blind
Offline
r-dubz wrote:I actually had it at the start after base (not sure why I chose there) but maybe moving it to where you suggested might help. I'll give that a go - cheers.
Aha, I must be going blind
No I edited it but you were too fast. ;-)
That's working now - thanks very much. Makes sense for sata to be before encrypt - cheers!
Offline
Awesome! Glad to hear it worked. Please remember to mark the thread solved :-)
Offline