diff options
author | Caio Begotti <caio1982@mandriva.org> | 2009-02-06 15:51:37 +0000 |
---|---|---|
committer | Caio Begotti <caio1982@mandriva.org> | 2009-02-06 15:51:37 +0000 |
commit | 4988e52a4620d8cf411d6832c50c4eeeb1fdf807 (patch) | |
tree | 0ce8d4bc032241966f42a3607179654c637b8a13 /rescue | |
parent | 3b59141d88ac174896e3c1d553406f80607646b6 (diff) | |
download | drakx-4988e52a4620d8cf411d6832c50c4eeeb1fdf807.tar drakx-4988e52a4620d8cf411d6832c50c4eeeb1fdf807.tar.gz drakx-4988e52a4620d8cf411d6832c50c4eeeb1fdf807.tar.bz2 drakx-4988e52a4620d8cf411d6832c50c4eeeb1fdf807.tar.xz drakx-4988e52a4620d8cf411d6832c50c4eeeb1fdf807.zip |
fixing the dump for non-dual-boot installations, we can't ignore the beginning of it for obvious reasons :P
Diffstat (limited to 'rescue')
-rwxr-xr-x | rescue/restore-image.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index c167c4e1d..ade481511 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -215,8 +215,12 @@ function write_image() *) uncomp=cat ;; esac + if [ -s /tmp/fdisk.log ]; then + skipstart='dd of=/dev/null bs=1 count=32256 &>/dev/null;' + fi + # the actual dumping command, from image to disk - ${uncomp} ${images_dir}/${image} | (dd of=/dev/null bs=1 count=32256 &>/dev/null; dd bs=4M of=/dev/${root} >/tmp/backup.out) & + ${uncomp} ${images_dir}/${image} | (${skipstart} dd bs=4M of=/dev/${root} >/tmp/backup.out 2>&1>>/tmp/log) & sleep 3 pid=$(ps ax | grep 'dd bs=4M of' | grep -v grep | awk '{ print $1 }') |