You are not logged in.

#1 2013-03-18 12:24:49

nagaseiori
Member
Registered: 2012-09-22
Posts: 71

[SOLVED] Clarification on LUKS system installed on USB Flash Drive

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)

Offline

#2 2013-03-18 13:18:43

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: [SOLVED] Clarification on LUKS system installed on USB Flash Drive

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-

Offline

#3 2013-03-19 03:19:27

nagaseiori
Member
Registered: 2012-09-22
Posts: 71

Re: [SOLVED] Clarification on LUKS system installed on USB Flash Drive

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.

Offline

Board footer

Powered by FluxBB