# Booting LUKS encrypted root with crypt_root=LABEL=root

## yzh

Hello,

I'm trying to boot my encrypted root system with a label instead of /dev/sdaX, but it fails because LABEL=root maps to /dev/mapper/root instead of /dev/sda2.

This is my blkid:

```

/dev/sda1: LABEL="boot" UUID="4d2961f6-c70d-429a-a927-959a3ad2061e" TYPE="ext2" 

/dev/sda2: UUID="660da344-3835-450c-944d-dba973cdfcf2" TYPE="crypto_LUKS" 

/dev/sda3: LABEL="data" UUID="9c8db595-d84c-45ba-83b1-0b4707213181" TYPE="ext4" 

/dev/mapper/root: LABEL="root" UUID="3e49f2d7-ebf7-444f-8422-b6aa670fb46c" TYPE="ext4" 

```

If i try to label /dev/sda2, it gives the following error:

```

# e2label /dev/sda2 cryptroot

e2label: Bad magic number in super-block while trying to open /dev/sda2

Couldn't find valid filesystem superblock.

```

It will work if i use UUID=660da344-3835-450c-944d-dba973cdfcf2, but i want to use LABEL's.. anyone know a way to label a crypto_LUKS partition?

PS: This is my grub/menu.lst that works, but I want to use "crypt_root=LABEL=root":

```

default 0

timeout 5

title=Linux

root (hd0,0)

kernel /boot/kernel-x86-2.6.39-hardened-r8 crypt_root=/dev/sda2

initrd /boot/initramfs-x86-2.6.39-hardened-r8

```

----------

## cach0rr0

labels are applied at the filesystem level (for those fs that support it), not the partition level 

your /dev/sda2 has no filesystem to be able to label, as it is an luks partition

----------

## yzh

 *cach0rr0 wrote:*   

> labels are applied at the filesystem level (for those fs that support it), not the partition level 
> 
> your /dev/sda2 has no filesystem to be able to label, as it is an luks partition

 

Ah thanks, too bad  :Sad: 

(so i guess it's not possible to label a LUKS partition..)

----------

