From 4988e52a4620d8cf411d6832c50c4eeeb1fdf807 Mon Sep 17 00:00:00 2001 From: Caio Begotti Date: Fri, 6 Feb 2009 15:51:37 +0000 Subject: fixing the dump for non-dual-boot installations, we can't ignore the beginning of it for obvious reasons :P --- rescue/restore-image.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }') -- cgit v1.2.1