Kernel panic with geninitrd and root=/dev/vgname/lvname

Łukasz Krotowski lukasz.krotowski at
Tue May 13 01:33:11 CEST 2014

our geninitrd in function initrd_gen_setrootdev() tries to fill
/proc/sys/kernel/real-root-dev based on /proc/partitions. But, when
booted with root=/dev/vgname/lvname:
- /proc/sys/kernel/real-root-dev is already filled with proper number
by initrd_gen_lvm(),
- /proc/partitions contains dm-X not vgname/lvname hence root device
is not found. And that causes panic.

My local fix is:
+ if [ "$(busybox cat /proc/sys/kernel/real-root-dev)" -eq 0 -a
"${ROOT##/dev/}" != "${ROOT}" ]; then
- if [ "${ROOT##/dev/}" != "${ROOT}" ]; then

Since I don't know how to change geninitrd I'm signaling this issue
here. FWIW I use geninitrd with --initrdfs=rom.

More information about the pld-devel-en mailing list