summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/restore-image.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index 10bde44e0..7aac5c74e 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -93,6 +93,7 @@ function detect_root()
devs_found=$(echo $devices | wc -w)
# we might use it later again
fdisk -l | grep "^/dev/" | grep -v ${dev} > /tmp/fdisk.log
+ first_disk=$(echo ${devices} | cut -d ' ' -f 1)
if ! grep -qe "FAT\|NTFS\|HPFS" /tmp/fdisk.log; then
rm -rf /tmp/fdisk.log
@@ -109,10 +110,10 @@ function detect_root()
fi
fi
else
- root=$(echo ${devices} | cut -d ' ' -f 1)
+ root=$first_disk
fi
else
- root=$(detect_and_resize_win32 $(echo ${devices} | cut -d ' ' -f 1))
+ root=$(detect_and_resize_win32 $first_disk)
fi
echo "${root}"