Dd

Aus SchnallIchNet
Wechseln zu: Navigation, Suche

lokal kopieren

# dd if=/dev/hda of=/dev/hdc bs=16065b

remote kopieren

root@target # netcat -l -p 1234 | dd of=/dev/hdc bs=16065b
root@source # dd if=/dev/hda bs=16065b | netcat targethost 1234

oder

# dd if=/dev/hda bs=16065b | gzip -1 >/mnt/vielplatz/plattenimage.gz
# gunzip -dc /mnt/vielplatz/plattenimage.gz | dd of=/dev/hdc bs=16065b

statt gunzip -dc kann man auch zcat verwenden

-d      decompress
-c      same as 'zcat'

also:

# zcat /mnt/vielplatz/plattenimage.gz | dd of=/dev/hdc bs=16065b

MBR

den mbr einer platte auslesen bzw. schreiben

MBR lesen

dd if=/dev/hdX of=/tmp/hdX_mbr.img bs=512 count=1

MBR schreiben

dd if=/tmp/hdX_mbr.img of=/dev/hdX bs=512 count=1

oder wenn man die vorhandene partitionstabelle (aus welchem grund auch immer)
behalten moechte:

dd if=/tmp/hdX_mbr.img of=/dev/hdX bs=446 count=1