1 --- grub-2.02~beta2/util/grub-mkconfig.in~ 2014-01-13 16:12:41.020705075 +0200
2 +++ grub-2.02~beta2/util/grub-mkconfig.in 2014-01-13 16:10:42.000000000 +0200
5 # Device containing our userland. Typically used for root= parameter.
6 GRUB_DEVICE="`${grub_probe} --target=device /`"
8 +# Rewrite to sane LVM node (Code from PLD Linux geninitrd):
9 +# /dev/mapper/sys-rootfs -> /dev/sys/rootfs
10 +# /dev/mapper/blodnatt-blah--bleh -> /dev/blodnatt/blah-bleh
11 +# /dev/mapper/vg--meaw-root -> /dev/vg-meaw/root
12 +case "$GRUB_DEVICE" in
14 + LVM2_LV_NAME='' LVM2_VG_NAME=''
15 + eval $(lvs --noheadings --nameprefixes "$GRUB_DEVICE" 2>/dev/null)
16 + if [ -n "$LVM2_VG_NAME$LVM2_LV_NAME" ]; then
17 + GRUB_DEVICE=/dev/$LVM2_VG_NAME/$LVM2_LV_NAME
22 GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
24 # Device containing our /boot partition. Usually the same as GRUB_DEVICE.