diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-11-12 10:19:47 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-11-12 10:19:47 +0000 |
commit | bc6dec9b571f4adac09bd772476be0165695cd88 (patch) | |
tree | f807442a194ec22153652d80a23ce295ee58ed84 /rescue/restore-image.sh | |
parent | 93d56a9c7b120b8d92ace566efdf3bd7cd076864 (diff) | |
download | drakx-bc6dec9b571f4adac09bd772476be0165695cd88.tar drakx-bc6dec9b571f4adac09bd772476be0165695cd88.tar.gz drakx-bc6dec9b571f4adac09bd772476be0165695cd88.tar.bz2 drakx-bc6dec9b571f4adac09bd772476be0165695cd88.tar.xz drakx-bc6dec9b571f4adac09bd772476be0165695cd88.zip |
update /boot/grub/device.map if needed
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-x | rescue/restore-image.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index c5fa5726e..70a7cab89 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -11,6 +11,7 @@ fi export PATH="/sbin:/bin:/usr/sbin:/usr/bin" +mnt_dir="/tmp/mnt" restore_media="/tmp/media" images_dir="$restore_media/images" images="$images_dir/list" @@ -184,6 +185,13 @@ function expand_fs() parted $disk -- mkpartfs primary linux-swap ${main_part_sectors}s -1s yes mkswap -L swap $swap_part fi + mkdir -p $mnt_dir + mount $main_part $mnt_dir + grub_dir="$mnt_dir/boot/grub" + if [ -d "$grub_dir" ]; then + echo "(hd0) $disk" > "$grub_dir/device.map" + fi + umount $mnt_dir fi } |