Jarry writes:

> I want to backup my whole hard-drive (8 partitions) with:
> # dd if=/dev/sda | gzip > /path/image.gz
> 
> In order to achieve good compression level I'd like to wipe
> out all empty space with zeros. How can I do that?

You can create files containing only zeros on all partitions until
they are full. Like this:

for i in 5 6 7 8 9 10 11 12
do
        mount /dev/sda$i /mnt
        dd if=/dev/zero of=/mnt/zero
        rm /mnt/zero
        umount /mnt
done

        Wonko

Reply via email to