One of my PCs is a dedicated Slackware build box. Currently I have two systems installed on it: Slackware 13.37 and Slackware64 13.37. The main purpose of this machine is to build packages (mine or from SBo), so I can easily install them on many machines from here.
The current partitioning scheme looks like this:
[root@betadine:~] # fdisk -l /dev/sda
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 têtes, 63 secteurs/piste, 9729 cylindres, total 156301488 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique)*: 512*octets / 512*octets
taille d'E/S (minimale / optimale)*: 512*octets / 512*octets
Identifiant de disque*: 0x0005ac98
Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 63 4000184 2000061 82 Linux swap
/dev/sda2 * 4000185 4192964 96390 83 Linux
/dev/sda3 4192965 42090299 18948667+ 83 Linux
/dev/sda4 42090300 156301487 57105594 5 Étendue
/dev/sda5 * 42090363 42283079 96358+ 83 Linux
/dev/sda6 42283143 80180414 18948636 83 Linux
/dev/sda7 * 80180478 80373194 96358+ 83 Linux
/dev/sda8 80373258 118270529 18948636 83 Linux
/dev/sda9 * 118270593 118463309 96358+ 83 Linux
/dev/sda10 118463373 156301487 18919057+ 83 Linux
- sda1 is the swap partition shared by all the installed systems
- Slackware 13.37 is installed on sda2 and sda3
- Slackware64 13.37 is installed on sda5 and sda6.
Currently, partitions sda7 to sda10 are unused. They're supposed to get two fresh installs of Slackware 14.0 and Slackware64 14.0 as soon as the stable release is out.
In the meantime, whenever I have to do some experimenting that's liable to create havoc, I always backup the machine using G4L (Ghost For Linux). This simple software sends the raw contents of the hard disk to a local FTP server, byte by byte.
Usually I try to reduce the size of the compressed disk images by writing zeros to every unused area of the disk before backing it up, somehow like this. Within the installed system:
# dd if=/dev/zero of=/0bits bs=20M ; rm -f /0bits
Now I wonder if I can simply write zeros to single partitions from, say, a live system. Say I'd like to fill only sda7 with zeros, can I issue the following command?
# dd if=/dev/zero of=/dev/sda7
Of course, this shouldn't affect all the other partitions (sda1-6, sda8-10).
I'm not exactly sure, so I'd better ask first, since an error of judgement could destroy a few days' work.