++# lilo for dm-0
++partitions=./partitions2
++ROOT=fe00
++runtest <<'EOF'
++mount -t xfs -r /dev/dm-0 /newroot
++EOF
+Index: geninitrd
+===================================================================
+--- geninitrd (wersja 12531)
++++ geninitrd (kopia robocza)
+@@ -759,6 +759,7 @@
+ initrd_gen_setrootdev() {
+ debug "Adding rootfs finding based on kernel cmdline root= option support."
+ busybox_applet ls
++ debug "Current /proc/partitions:\n$(sed -e 's,^,> ,' /proc/partitions)"
+ add_linuxrc <<-'EOF'
+ if [ "${ROOT##/dev/}" != "${ROOT}" ]; then
+ rootnr="$(busybox awk -v rootnode="${ROOT##/dev/}" '$4 == rootnode { print 256 * $1 + $2 }' /proc/partitions)"
+@@ -785,7 +786,7 @@
+ # We support passing root as hda3 /dev/hda3 0303 0x0303 and 303
+ add_linuxrc <<-'EOF'
+ device=
+- eval "$(busybox awk -v c="$ROOT" '
++ eval "$(busybox awk -v root="$ROOT" '
+ BEGIN {
+ num_pattern_short = "[0-9a-f][0-9a-f][0-9a-f]";
+ num_pattern = "[0-9a-f]" num_pattern_short;
+@@ -793,14 +794,24 @@
+ partition = "";
+ min = -1; maj = -1;
+
+- sub("^0x", "", c);
+- if (c ~ "^" num_pattern_short "$") sub("^", "0", c);
+- if (c ~ "^" num_pattern "$") {
+- maj = sprintf("%d",substr(c,1,2));
+- min = sprintf("%d",substr(c,3));
++ # see if we have /dev/hdX or hdX, we can just take partition name
++ if (root ~ "^\/dev\/" dev_pattern "$" || root ~ "^" dev_pattern "$") {
++ partition = root
++ sub("^/dev/", "", partition);