summaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/0001-init-resolve-UUID-.-devices-for-cryptsetup.patch
blob: e297b60182dfcebea438d87c954db0ac797fe265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 979090f14647d6e6b0c0d399580c22cbf48b0fef Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 10 Mar 2015 09:20:34 +0000
Subject: [PATCH] init: resolve UUID=... devices for cryptsetup

recent version of cryptsetup does not seem to work with UUID=... devices
unless udev is used to create /dev/disk/by-uuid symlinks.

We work around that by resolving UUID=... to the device.
---
 initramfs-init.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/initramfs-init.in b/initramfs-init.in
index fd3e510..d687e64 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -251,7 +251,7 @@ start_cryptsetup() {
 	modprobe dm-crypt
 	if [ -n "$KOPT_cryptroot" ]; then
 		modprobe dm-crypt
-		cryptsetup luksOpen "$KOPT_cryptroot" "$KOPT_cryptdm"
+		cryptsetup luksOpen $(resolve_dev "$KOPT_cryptroot") "$KOPT_cryptdm"
 	fi
 }
 
-- 
2.3.2