diff options
Diffstat (limited to 'src/core/libs')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 2 | ||||
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 88c4675..fa31095 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -95,6 +95,7 @@ get_device_with_mount () { # /dev/sda2 raw # $1 a "recognizer": a string that will match the filesystem section uniquely (using egrep), such as ';<mountpoint>;' or other specific attributes of the hosted filesystem(s) get_anchestors_mount () { + debug 'FS' "Finding anchestor for: $1" local buffer= read block type leftovers <<< `egrep "$1" $TMP_BLOCKDEVICES 2>/dev/null` [ -z "$type" ] && return 1 @@ -119,6 +120,7 @@ get_anchestors_mount () { get_anchestors_mount "$recognizer" && buffer="$buffer $ANSWER_DEVICES" fi + debug 'FS' "Found anchestors: $ANSWER_DEVICES" ANSWER_DEVICES=$buffer [ -n "$ANSWER_DEVICES" ] } diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 47c5e50..de4681e 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -886,28 +886,31 @@ interactive_install_grub() { sed -i -e '/#-\*/q' $grubmenu # handle dmraid/mdadm,lvm,dm_crypt etc. replace entries where needed automatically - # '/ on raw' and '/ on lvm on raw' (default) + debug 'FS' 'Grub kernel line? Assuming "/ on raw" or "/ on lvm on raw" as default' kernel="kernel $subdir/vmlinuz26 root=${_rootpart} ro" if get_anchestors_mount ';/;' then if echo "$ANSWERS_DEVICES" | sed -n '1p' | grep -q 'dm_crypt$' && echo "$ANSWERS_DEVICES" | sed -n '2p' | grep -q 'raw$' then - # '/ on dm_crypt on raw' + debug 'FS' 'Grub kernel line? Found / on dm_crypt on raw' raw_device=`echo "$ANSWERS_DEVICES" | sed -n '2p' | cut -d ' ' -f1` kernel="kernel $subdir/vmlinuz26 root=$raw_device ro" elif echo "$ANSWERS_DEVICES" | sed -n '1p' | grep -q 'lvm-lv$' && echo "$ANSWERS_DEVICES" | sed -n '4p' | grep -q 'dm_crypt$' && echo "$ANSWERS_DEVICES" | sed -n '5p' | grep -q 'raw$' then - # / on lvm on dm_crypt on raw + debug 'FS' 'Grub kernel line? Found / on lvm on dm_crypt on raw' lv_device=`echo "$ANSWERS_DEVICES" | sed -n '1p' | cut -d ' ' -f1` vg_device=`echo "$ANSWERS_DEVICES" | sed -n '2p' | cut -d ' ' -f1` crypt_device=`echo "$ANSWERS_DEVICES" | sed -n '4p' | cut -d ' ' -f1` kernel="kernel $subdir/vmlinuz26 root=$lv_device cryptdevice=$crypt_device:`basename $vgdevice` ro" elif echo "$ANSWERS_DEVICES" | sed -n '1p' | grep -q 'dm_crypt$' && echo "$ANSWERS_DEVICES" | sed -n '2p' | grep -q 'lvm-lv$' && echo "$ANSWERS_DEVICES" | sed -n '5p' | grep -q 'raw$' then - # / on dm_crypt on lvm on raw + debug 'FS' 'Grub kernel line? Found / on dm_crypt on lvm on raw' crypt_device=`echo "$ANSWERS_DEVICES" | sed -n '1p' | cut -d ' ' -f1` lv_device=`echo "$ANSWERS_DEVICES" | sed -n '2p' | cut -d ' ' -f1` kernel=" kernel $subdir/vmlinuz26 root=$crypt_device cryptdevice=$lv_device:root ro" + else + debug 'FS' 'Grub kernel line? Could not figure this one out' + show_warning "Disk setup detection" "Could not figure out what kind of disk setup you are using. Are you using some really fancy dm_crypt/lvm/softraid setup? Please file a bug for this and supply all files from /tmp/aif/" fi fi cat >>$grubmenu <<EOF |