Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 494188 - =sys-kernel/dracut-031-r1 with =sys-fs/eudev-1.3 - dracut Warning: /dev/mapper/laptop-gentoo_root does not exist
Summary: =sys-kernel/dracut-031-r1 with =sys-fs/eudev-1.3 - dracut Warning: /dev/mappe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 19:39 UTC by georg
Modified: 2013-12-28 17:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Systeminfo about my system (sysinfo.txt,19.46 KB, text/plain)
2013-12-13 19:39 UTC, georg
Details
Kernel Konfig (config-3.10.24-slim,100.29 KB, text/x-mpsub)
2013-12-13 19:41 UTC, georg
Details
rdsosreport from the rescue shell (rdsosreport.txt,278.65 KB, text/plain)
2013-12-14 10:33 UTC, georg
Details
dmesg from the rescue shell (dmesg.rescue.txt,30.79 KB, text/plain)
2013-12-14 10:40 UTC, georg
Details
rdsosreport from the rescue shell with rd.debug=1 rd.udev.debug=1 (rdsosreport.txt,278.65 KB, text/plain)
2013-12-19 16:43 UTC, georg
Details
right rdsosreport from the rescue shell with rd.debug=1 rd.udev.debug=1 (rdsosreport.txt,278.90 KB, text/plain)
2013-12-19 16:52 UTC, georg
Details
dracut-eudev-compat.patch (dracut-eudev-compat.patch,549 bytes, patch)
2013-12-24 00:34 UTC, Alexander Tsoy
Details | Diff
dracut-eudev-compat.patch (dracut-eudev-compat.patch,555 bytes, patch)
2013-12-24 00:52 UTC, Alexander Tsoy
Details | Diff
udev-rules-add-eudev-rules.patch (0001-udev-rules-add-eudev-rules.patch,967 bytes, patch)
2013-12-25 10:28 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description georg 2013-12-13 19:39:05 UTC
I use vanilla kernel 3.10.24, dracut-031-r1 and eudev-1.3. My rootfs is encrypted with LUKS and i need an initramfs to set it up properly.

With the abouve combination the initramfs can not unlock my device. I need udev that the build initramfs can unlock my device. If i fall back to the rescue console, i can modprobe my ahci module, it gets loaded, a manual "udevadm trigger" does not create the /dev/sdax device to open my LUKS device. 



Reproducible: Always

Steps to Reproduce:
1. install euvev, dracut
2. setup rootfs on LUKS device
3. build initramfs with dracut
4. boot

--> You wont be able to unlock the LUKS device.
Actual Results:  
i can not unlock my LUKS device

Expected Results:  
i can unlock my LUKS device
Comment 1 georg 2013-12-13 19:39:56 UTC
Created attachment 365262 [details]
Systeminfo about my system
Comment 2 georg 2013-12-13 19:40:27 UTC
mount | column -t
rootfs                          on  /                         type  rootfs       (rw)
proc                            on  /proc                     type  proc         (rw,nosuid,nodev,noexec,relatime)
sysfs                           on  /sys                      type  sysfs        (rw,nosuid,nodev,noexec,relatime)
devtmpfs                        on  /dev                      type  devtmpfs     (rw,nosuid,size=4035236k,nr_inodes=1008809,mode=755)
devpts                          on  /dev/pts                  type  devpts       (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs                           on  /dev/shm                  type  tmpfs        (rw,nosuid,nodev)
tmpfs                           on  /run                      type  tmpfs        (rw,nosuid,nodev,mode=755)
/dev/mapper/laptop-gentoo_root  on  /                         type  btrfs        (rw,relatime,space_cache,autodefrag)
mqueue                          on  /dev/mqueue               type  mqueue       (rw,nosuid,nodev,noexec,relatime)
configfs                        on  /sys/kernel/config        type  configfs     (rw,nosuid,nodev,noexec,relatime)
cgroup_root                     on  /sys/fs/cgroup            type  tmpfs        (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc                          on  /sys/fs/cgroup/openrc     type  cgroup       (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset                          on  /sys/fs/cgroup/cpuset     type  cgroup       (rw,nosuid,nodev,noexec,relatime,cpuset)
cpuacct                         on  /sys/fs/cgroup/cpuacct    type  cgroup       (rw,nosuid,nodev,noexec,relatime,cpuacct)
/dev/sda1                       on  /boot                     type  ext2         (rw,noatime)
/dev/mapper/laptop-gentoo_home  on  /home                     type  ext4         (rw,noatime,commit=0)
none                            on  /var/tmp/portage          type  tmpfs        (rw,size=6000M,nr_inodes=1M)
none                            on  /proc/sys/fs/binfmt_misc  type  binfmt_misc  (rw)
Comment 3 georg 2013-12-13 19:41:36 UTC
Created attachment 365264 [details]
Kernel Konfig
Comment 4 Alexander Tsoy 2013-12-13 21:15:04 UTC
So no problems with sys-fs/udev?. Do I understand correctly?

Please add rd.debug to the kernel cmdline, then after dracut drop you to emergency shell copy file /run/initramfs/rdsosreport.txt to persistent storage (eg /boot partition) and attach it to the bug report.
Comment 5 georg 2013-12-14 08:16:20 UTC
Yes, you are absolutly right. With stable udev everything works ok. If i have build my initramfs, booted and then unmerge udev and switch to eudev, all is fine. If i want to build a new initramfs with dracut, i need to switch to udev, build initramfs and switch back to eudev.
Comment 6 georg 2013-12-14 10:33:19 UTC
Created attachment 365302 [details]
rdsosreport from the rescue shell

Here is the requested file. It seems that there crashes something. I did some tests with different kernels, but all did this. It did not change by exchanging the kernel.
Comment 7 georg 2013-12-14 10:40:38 UTC
Created attachment 365304 [details]
dmesg from the rescue shell
Comment 8 georg 2013-12-14 10:42:15 UTC
To get the dmesg output and rdsosreport i did manually load the ahci module and created my "mknod /dev/sda1 b 8 1" the block device. This is what appears at the end of the dmesg output.
Comment 9 Alexander Tsoy 2013-12-16 16:59:29 UTC
Hmm.. I need some more info. Please add "rd.debug rd.udev.debug" to the kernel cmdline and attach resulting rdsosreport.txt again. Also show the output of `lsblk` issued on sucessfully booted system.
Comment 10 georg 2013-12-19 16:30:48 UTC
georg@machariel ~ $ lsblk
NAME                            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                               8:0    0 698,7G  0 disk  
├─sda1                            8:1    0   200M  0 part  /boot
├─sda2                            8:2    0   127G  0 part  
├─sda3                            8:3    0     1K  0 part  
├─sda5                            8:5    0  97,7G  0 part  
└─sda6                            8:6    0 473,8G  0 part  
  └─luks-05f6359d-643e-4122-884d-55a75f238bd9 (dm-0)
                                253:0    0 473,8G  0 crypt 
    ├─laptop-home (dm-1)        253:1    0     8G  0 lvm   
    ├─laptop-wheezy_root (dm-2) 253:2    0    30G  0 lvm   
    ├─laptop-gentoo_root (dm-3) 253:3    0    50G  0 lvm   /
    ├─laptop-swap (dm-4)        253:4    0    10G  0 lvm   [SWAP]
    ├─laptop-gentoo_home (dm-5) 253:5    0    20G  0 lvm   /home
    ├─laptop-backup (dm-6)      253:6    0    50G  0 lvm   
    └─laptop-gentoo_rt (dm-7)   253:7    0    50G  0 lvm   
sdb                               8:16   0 931,5G  0 disk  
└─sdb1                            8:17   0 931,5G  0 part  
sr0                              11:0    1  1024M  0 rom
Comment 11 georg 2013-12-19 16:43:43 UTC
Created attachment 365688 [details]
rdsosreport from the rescue shell with rd.debug=1 rd.udev.debug=1

There is the requested file.
Comment 12 Alexander Tsoy 2013-12-19 16:51:14 UTC
(In reply to georg from comment #11)
> Created attachment 365688 [details]
> rdsosreport from the rescue shell with rd.debug=1 rd.udev.debug=1
> 
> There is the requested file.

Seems you've uploaded the same file again and there is no rd.udev.debug in the cmdline.

BOOT_IMAGE=/vmlinuz-3.12.4-slim root=/dev/mapper/laptop-gentoo_root ro vconsole.keymap=de-latin1-nodeadkeys vconsole.locale.LANG=de_DE.UTF-8 net.ifnames=0 rd.luks=1 rd.lvm=1 rd.luks.uuid=05f6359d-643e-4122-884d-55a75f238bd9 rd.debug=1
Comment 13 georg 2013-12-19 16:52:24 UTC
Created attachment 365690 [details]
right rdsosreport from the rescue shell with rd.debug=1 rd.udev.debug=1

Somehow i mixed the files. This is now the right one
Comment 14 Alexander Tsoy 2013-12-24 00:34:03 UTC
Created attachment 366054 [details, diff]
dracut-eudev-compat.patch

I have an idea. Please try attached patch.
Comment 15 Alexander Tsoy 2013-12-24 00:47:16 UTC
(In reply to Alexander Tsoy from comment #14)
> Created attachment 366054 [details, diff] [details, diff]
> dracut-eudev-compat.patch
> 
> I have an idea. Please try attached patch.

Just put this patch into /etc/portage/patches/sys-kernel/dracut directory and (re)emerge dracut-034-r2 (this is the only version with epatch_user support).
Comment 16 Alexander Tsoy 2013-12-24 00:52:53 UTC
Created attachment 366056 [details, diff]
dracut-eudev-compat.patch

fix indentations
Comment 17 georg 2013-12-24 19:04:09 UTC
Thanks! This did help :)
Comment 18 Alexander Tsoy 2013-12-25 10:28:43 UTC
Created attachment 366164 [details, diff]
udev-rules-add-eudev-rules.patch

Amadeusz, I'm not sure if I should push this patch upstream. What do you think?

@eudev: is there a strong reason to install this rules as "80-drivers-modprobe.rules", or it just to simplify the build system?
Comment 19 Alexander Tsoy 2013-12-25 22:41:27 UTC
(In reply to Alexander Tsoy from comment #18)
> @eudev: is there a strong reason to install this rules as
> "80-drivers-modprobe.rules", or it just to simplify the build system?

By the way genkernel-next also expects "80-drivers.rules":
https://github.com/Sabayon/genkernel-next/blob/master/gen_initramfs.sh
Comment 20 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-12-28 15:32:07 UTC
(In reply to Alexander Tsoy from comment #18)
> Created attachment 366164 [details, diff] [details, diff]
> udev-rules-add-eudev-rules.patch
> 
> Amadeusz, I'm not sure if I should push this patch upstream. What do you
> think?

Push this patch upstream, please. It handles special case but it doesn't break other distros. There's special case for Debian, too, as you can see. :-)
Comment 21 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-12-28 15:48:41 UTC
Thanks!

+*dracut-034-r3 (28 Dec 2013)
+
+  28 Dec 2013; Amadeusz Żołnowski <aidecoe@gentoo.org> dracut-034-r2.ebuild,
+  +dracut-034-r3.ebuild, +files/034-0014-udev-rules-add-eudev-rules.patch:
+  Committing on behalf of Alexander Tsoy <alexander@tsoy.me>.
+  Fixes bug #494188.
+
+  LUKS devices couldn't be decrypted with eudev because of missing rules file.
+
Comment 22 Alexander Tsoy 2013-12-28 17:30:08 UTC
(In reply to Amadeusz Żołnowski from comment #21)
> +  LUKS devices couldn't be decrypted with eudev because of missing rules
> file.
> +

This was actually a different issue: no udev rules for loading kernel modules was installed in initramfs. No problems with LUKS. ;)