]> git.pld-linux.org Git - packages/grub2.git/blob - grub-lvmdevice.patch
up to 2.12
[packages/grub2.git] / grub-lvmdevice.patch
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
3 @@ -131,6 +131,21 @@
4  
5  # Device containing our userland.  Typically used for root= parameter.
6  GRUB_DEVICE="`${grub_probe} --target=device /`"
7 +
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
13 +       /dev/mapper/*-*)
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
18 +               fi
19 +       ;;
20 +esac
21 +
22  GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
23  GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2> /dev/null`" || true
24  
This page took 0.069795 seconds and 3 git commands to generate.