Annotated edit history of
ddNotes version 8 showing authors affecting page license.
View with all changes included.
Rev |
Author |
# |
Line |
7 |
BenStaz |
1 |
!! Erase a Harddrive (zero fill) |
|
|
2 |
This command attempts to write a zero at every writable location on your hard drive. |
|
|
3 |
Before using the command, I recommend triple checking that you are indeed erasing the correct harddrive! |
|
|
4 |
|
|
|
5 |
*dd if=/dev/zero of=/dev/hda bs=1M |
8 |
BenStaz |
6 |
|
|
|
7 |
---- |
7 |
BenStaz |
8 |
|
3 |
BenStaz |
9 |
!! Clone a Harddrive |
|
|
10 |
|
|
|
11 |
Lets say that ''/dev/sda'' is the hdd we wish to clone, and that ''/dev/sdb'' is an empty drive that is to be used as the target. |
|
|
12 |
|
|
|
13 |
* dd if=/dev/sda of=/dev/sdb bs=1M |
4 |
BenStaz |
14 |
|
|
|
15 |
Note : the destination harddrive should be equal or larger in size to the source harddrive. |
3 |
BenStaz |
16 |
|
|
|
17 |
---- |
|
|
18 |
|
|
|
19 |
!! Clone a CD/DVD |
|
|
20 |
|
|
|
21 |
* dd if=/dev/cdrom of=/here/is/a/path/mycdrom.iso |
|
|
22 |
|
|
|
23 |
---- |
|
|
24 |
|
|
|
25 |
!! How to backup and restore your [MBR] |
|
|
26 |
|
|
|
27 |
!Including the partition table. |
|
|
28 |
|
|
|
29 |
<verbatim> |
|
|
30 |
Backup : dd if=/dev/sda of=/backup/mbr.bkp bs=512 count=1 |
|
|
31 |
Restore : dd if=/backup/mbr.bkp of=/dev/sda bs=512 count=1 |
|
|
32 |
</verbatim> |
|
|
33 |
|
|
|
34 |
!Excluding the partition table (only the executable code area) |
|
|
35 |
|
|
|
36 |
<verbatim> |
|
|
37 |
Backup : dd if=/dev/sda of=/backup/mbr.bkp bs=446 count=1 |
|
|
38 |
Restore : dd if=/backup/mbr.bkp of=/dev/sda bs=446 count=1 |
|
|
39 |
</verbatim> |