[arch-releng] [PATCH] Fix grub lines for various encryption setups
The first one used a deprecated syntax and failed whenever / was not called /dev/mapper/root The second one got a cosmetical cleanup to be more consistent with what was set during the installer The third one also failed whenever / was not called /dev/mapper/root --- src/core/libs/lib-ui-interactive.sh | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 586abc9..d9f8795 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -1089,20 +1089,21 @@ generate_grub_menulst() { then debug 'FS' 'Grub kernel line? Found / on dm_crypt on raw' raw_device=`echo "$ANSWER_DEVICES" | sed -n '2p' | cut -d ' ' -f1` - kernel="kernel $subdir/vmlinuz26 root=$raw_device ro" + crypt_device=`echo "$ANSWER_DEVICES" | sed -n '1p' | cut -d ' ' -f1` + kernel="kernel $subdir/vmlinuz26 root=$crypt_device cryptdevice=$raw_device:`basename $crypt_device` ro" elif echo "$ANSWER_DEVICES" | sed -n '1p' | grep -q 'lvm-lv$' && echo "$ANSWER_DEVICES" | sed -n '4p' | grep -q 'dm_crypt$' && echo "$ANSWER_DEVICES" | sed -n '5p' | grep -q 'raw$' then debug 'FS' 'Grub kernel line? Found / on lvm on dm_crypt on raw' lv_device=`echo "$ANSWER_DEVICES" | sed -n '1p' | cut -d ' ' -f1` - vg_device=`echo "$ANSWER_DEVICES" | sed -n '2p' | cut -d ' ' -f1` + crypt_device=`echo "$ANSWER_DEVICES" | sed -n '4p' | cut -d ' ' -f1` raw_device=`echo "$ANSWER_DEVICES" | sed -n '5p' | cut -d ' ' -f1` - kernel="kernel $subdir/vmlinuz26 root=$lv_device cryptdevice=$raw_device:`basename $vg_device` ro" + kernel="kernel $subdir/vmlinuz26 root=$lv_device cryptdevice=$raw_device:`basename $crypt_device` ro" elif echo "$ANSWER_DEVICES" | sed -n '1p' | grep -q 'dm_crypt$' && echo "$ANSWER_DEVICES" | sed -n '2p' | grep -q 'lvm-lv$' && echo "$ANSWER_DEVICES" | sed -n '5p' | grep -q 'raw$' then debug 'FS' 'Grub kernel line? Found / on dm_crypt on lvm on raw' crypt_device=`echo "$ANSWER_DEVICES" | sed -n '1p' | cut -d ' ' -f1` lv_device=`echo "$ANSWER_DEVICES" | sed -n '2p' | cut -d ' ' -f1` - kernel=" kernel $subdir/vmlinuz26 root=$crypt_device cryptdevice=$lv_device:root ro" + kernel=" kernel $subdir/vmlinuz26 root=$crypt_device cryptdevice=$lv_device:`basename $crypt_device` ro" elif echo "$ANSWER_DEVICES" | sed -n '1p' | grep -q 'raw$' then debug 'FS' 'Grub kernel line? Found / on raw' -- 1.6.4.1
On Sat, 29 Aug 2009 01:13:53 +0200 Thomas Bächler <thomas@archlinux.org> wrote:
The first one used a deprecated syntax and failed whenever / was not called /dev/mapper/root The second one got a cosmetical cleanup to be more consistent with what was set during the installer The third one also failed whenever / was not called /dev/mapper/root --- src/core/libs/lib-ui-interactive.sh | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
Thanks Thomas. I didn't test your patches myself yet, but they look good so I applied them. PS: i finally discovered how to properly apply patches from email. http://jumi.lut.fi/~paalanen/scratch/claws-git-am.bash rocks! Dieter
participants (2)
-
Dieter Plaetinck
-
Thomas Bächler