Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How can I rewrite all empty sectors with zeros?
Date: Sun, 22 Jul 2012 17:48:42
Message-Id: 20120722194550.33954839@weird.wonkology.org
In Reply to: [gentoo-user] How can I rewrite all empty sectors with zeros? by Jarry
1 Jarry writes:
2
3 > I want to backup my whole hard-drive (8 partitions) with:
4 > # dd if=/dev/sda | gzip > /path/image.gz
5 >
6 > In order to achieve good compression level I'd like to wipe
7 > out all empty space with zeros. How can I do that?
8
9 You can create files containing only zeros on all partitions until
10 they are full. Like this:
11
12 for i in 5 6 7 8 9 10 11 12
13 do
14 mount /dev/sda$i /mnt
15 dd if=/dev/zero of=/mnt/zero
16 rm /mnt/zero
17 umount /mnt
18 done
19
20 Wonko

Replies

Subject Author
Re: [gentoo-user] How can I rewrite all empty sectors with zeros? Mick <michaelkintzios@×××××.com>