Giuseppe Iuculano ha scritto: > Tested, unfortunately root is empty:
Hi, attached debdiff fixes the root detection, can you review it please? Giuseppe
diff -Nru grub-installer-1.34/debian/changelog grub-installer-1.35/debian/changelog --- grub-installer-1.34/debian/changelog 2008-09-22 02:47:51.000000000 +0200 +++ grub-installer-1.35/debian/changelog 2008-09-23 20:51:08.000000000 +0200 @@ -1,3 +1,10 @@ +grub-installer (1.35) unstable; urgency=low + + [Giuseppe Iuculano] + * Fix root detection in menu.lst for dmraid devices discovered by os-prober + + -- Giuseppe Iuculano <[EMAIL PROTECTED]> Tue, 23 Sep 2008 20:41:40 +0200 + grub-installer (1.34) unstable; urgency=low [ Frans Pop ] diff -Nru grub-installer-1.34/grub-installer grub-installer-1.35/grub-installer --- grub-installer-1.34/grub-installer 2008-09-21 22:25:25.000000000 +0200 +++ grub-installer-1.35/grub-installer 2008-09-23 20:39:15.000000000 +0200 @@ -135,6 +135,23 @@ tmp_drive=$(grep -v '^#' $device_map | grep "$tmp_disk *$" | \ sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%') + # If not found, check if it is a SATA RAID partition, and set tmp_drive + satafound=0 + if type dmraid >/dev/null; then + if [ -z "$tmp_drive" ]; then + if echo "$(basename $tmp_disk)" | grep -q "$(dmraid -sa -c | grep -v "No RAID disks")" ; then + for raiddisk in $(dmraid -r -c | grep -v "No RAID disks"); do + tmp_drive=$(grep -v '^#' $device_map | grep "$raiddisk *$" | \ + sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%') + satafound=1 + tmp_satadm=$(dmraid -sa -c | grep -v "No RAID disks") + tmp_satadev=$(basename $tmp_disk) + tmp_satadevn=$(echo $tmp_satadev | sed "s/`echo $tmp_satadm`//") + done + fi + fi + fi + # If not found, print an error message and exit if [ -z "$tmp_drive" ]; then echo "$1 does not have any corresponding BIOS drive." 1>&2 @@ -146,7 +163,11 @@ # GRUB's syntax case "$host_os" in linux*) - echo "$tmp_drive" | sed "s%)$%,`expr $tmp_part - 1`)%" + if [ "$satafound=1" ]; then + echo "$tmp_drive" | sed "s%)$%,`expr $tmp_satadevn - 1`)%" + else + echo "$tmp_drive" | sed "s%)$%,`expr $tmp_part - 1`)%" + fi ;; gnu*) if echo $tmp_part | grep "^s" >/dev/null; then
signature.asc
Description: OpenPGP digital signature