# LUKS: Where the hell is my /dev/mapper/root?

## root_tux_linux

Hi

i've a lil problem with my encrypted system because i cant find /dev/mapper/root!

the system works but i cant fsck my root partition not manuel or at boot.

http://www.loaditup.de/files/490065.jpeg

```
gentoo ~ # ls /dev/mapper/

backup  control  home  swap

gentoo ~ # 
```

```
gentoo ~ # cryptsetup  status root

/dev/mapper/root is active:

  cipher:  aes-xts-plain

  keysize: 512 bits

  device:  /dev/sda3

  offset:  4040 sectors

  size:    83903455 sectors

  mode:    read/write

gentoo ~ # 
```

```

gentoo ~ # mount | grep root

rootfs on / type rootfs (rw)

/dev/mapper/root on / type ext4 (rw,noatime,barrier=1,data=ordered)

gentoo ~ #  
```

Can someone tell me wtf is going on with my system and how i can fix it?

----------

## root_tux_linux

Hmmm

After a... 

```
gentoo ~ # dmsetup resume root 
```

I can see my root...

```
gentoo ~ # ls /dev/mapper/

backup  control  home  root  swap

gentoo ~ # 
```

Maybe a bug in genkernel or in the dm-crypt script?

----------

## Paczesiowa

I have a similar problem - root and swap are decrypted in intramfs, and after some update they are no longer visible in /dev/mapper/ (only control device), starting /etc/init.d/lvm service restores them, but I don't use lvm so something is wrong.

----------

## Sadako

I use cryptsetup, but not in an initrd, so this is a total guess, but this is what I imagine is happening;

You run cryptsetup whithin the initrd, and the device nodes under /dev/mapper are created, but only within the initrd

You mount and switch_ or pivot_root to the fs on one of the dmcrypt device nodes, boot as normal, udev takes over, however the expected devices nodes under /dev/mapper aren't created

Is this accurate?

If so, I don't think this is a bug or anything similar, or if it is then it's a udev issue.

After a quick look at the dmsetup man page, looks like adding `udev mknodes` to an init script should fix this.

----------

## root_tux_linux

I made a bugreport...

Please confirm: https://bugs.gentoo.org/show_bug.cgi?id=317933

----------

## frostschutz

I don't have this issue, but I'm also using LVM on top of cryptsetup/LUKS, so if LVM fixes it, I wouldn't notice.

I took a quick peek at the LVM init script and saw it depends on device-mapper and dmeventd... do you have these started?

----------

## Paczesiowa

Hopeless: I know that these devices are "overmounted" by udev, but before yesterday's update they were being created again, by udev or something else. 

frostschutz: device-mapper service doesn't help, I'll check dmeventd.

----------

