I'm trying to install Arch with LUKS on a flash drive. To do that, I have partitioned it as follows:
# blkid /dev/sdb1: UUID="EA15-01CE" TYPE="vfat" /dev/sdb2: UUID="23b2be0d-7eb8-48e1-9da6-bd56f7bfd741" TYPE="ext2" /dev/sdb3: UUID="1bf28f95-fd45-4b02-806b-2338f95eb22d" TYPE="crypto_LUKS" /dev/mapper/cryptroot: UUID="30d10da4-62d3-440d-af9e-0bd79b6fb8fb" TYPE="ext4"
/dev/sdb1 is a 600 MB FAT32 partition for data, /dev/sdb2 is an ext2 /boot partition, and /dev/sdb3 contains the encrypted root.
The wiki article on installing Arch Linux on a USB key states that I need to have udev rules for specially mounting th root filesystem, since the drive mappings can change (https://wiki.archlinux.org/index.php/In … ash_memory). Do I really need to do that, since it is already being mounted into /dev/mapper? My grub2 configuration looks like this, does it seem right?
GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="Arch" GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/1bf28f95-fd45-4b02-806b-2338f95eb22d:cryptroot" ... rest is the default /etc/grub/default/ ...
I've already added the "encrypt" hook to mkinitcpio.
Also, here is my fstab:
# # /etc/fstab: static file system information # # <file system> <dir> <type> <options> <dump> <pass> /dev/mapper/cryptroot / ext4 defaults,noatime 0 1 /dev/disk/by-uuid/23b2be0d-7eb8-48e1-9da6-bd56f7bfd741 /boot ext2 defaults, noatime 0 2
My question is, does this seem okay? I cannot test this right now since I only have access to an old Fedora machine which I am not allowed to reboot.
Last edited by nagaseiori (2013-03-19 03:19:45)
Well I think it looks ok, but I would change fstab into this:
# # /etc/fstab: static file system information # # <file system> <dir> <type> <options> <dump> <pass> UUID="30d10da4-62d3-440d-af9e-0bd79b6fb8fb / ext4 defaults,noatime 0 1 UUID=23b2be0d-7eb8-48e1-9da6-bd56f7bfd741 /boot ext2 defaults, noatime 0 2
Probably your GRUB_CMDLINE_LINUX will work too.
Altough I use this in my grub.cfg
linux /vmlinuz-linux root=/dev/mapper/ch-ro ro cryptdevice=/dev/sda2:ar ro quiet
-I can give you a ladder, but you need to climb it yourself-
Thank you for your answer. There was a small typo in my fstab (should have been UUID=23b2be0d-7eb8-48e1-9da6-bd56f7bfd741 /boot ext2 defaults,noatime 0 2), but everything seems to be working.