this way you can also BACKUP THE ENTIRE MAC/ LINUX HARDDISK LINUX TO A FILE!

TEMPLATE
MacOS:

open terminal

1. first check where the cdrom was mounted via

mount

macbook:~
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk0s3 on /Volumes/Mac OS X Install DVD (hfs, local)

2. then unmount via

sudo umount /dev/disk0s3

unmount disk
sudo umount
# dd bs=512 conv=noerror if=/dev/disk0s3 of=/Users/path/OSX.iso
# copy do not abort on read errors

to mount the image (fuer Linux-User):
mount -t iso9660 -r -o loop /pfad/image.iso /mountpoint

restore would be the other way around:

# dd bs=512 conv=noerror if=/Users/path/OSX.iso of=/dev/disk2s0

hope it helps

The watch command will will re-execute the kill command once every two seconds, giving you near-realtime status to what dd is doing. If you want to change how often the watchcommand polls for, you can change it with the -n parameter, for example to change the polling to every 5 seconds, you would use:

$ watch -n5 'sudo kill -USR1 `pgrep ^dd`'

… let the second terminal open, NOW SWITCH BACK to the first one and get this nice output:

root@Microknoppix:/mnt/qnap2/XEN# dd bs=512 conv=noerror if=/mnt/qnap2/XEN/xenserver3_2012_11_02_sda.iso of=/dev/sda
^N14354649+0 Datensätze ein
14354649+0 Datensätze aus
7349580288 Bytes (7,3 GB) kopiert, 274,756 s, 26,7 MB/s
14655017+0 Datensätze ein
14655017+0 Datensätze aus
7503368704 Bytes (7,5 GB) kopiert, 279,778 s, 26,8 MB/s
14885807+0 Datensätze ein
14885807+0 Datensätze aus
7621533184 Bytes (7,6 GB) kopiert, 283,599 s, 26,9 MB/s
14929225+0 Datensätze ein
14929225+0 Datensätze aus
7643763200 Bytes (7,6 GB) kopiert, 284,553 s, 26,9 MB/s
15237953+0 Datensätze ein
15237953+0 Datensätze aus
7801831936 Bytes (7,8 GB) kopiert, 289,571 s, 26,9 MB/s
15550857+0 Datensätze ein
15550856+0 Datensätze aus
7962038272 Bytes (8,0 GB) kopiert, 294,593 s, 27,0 MB/s
15846633+0 Datensätze ein
15846633+0 Datensätze aus
8113476096 Bytes (8,1 GB) kopiert, 299,648 s, 27,1 MB/s
16141825+0 Datensätze ein
16141825+0 Datensätze aus
8264614400 Bytes (8,3 GB) kopiert, 304,648 s, 27,1 MB/s

maybe you need to mount your NAS first:
mkdir /mnt/qnap2
mount -t cifs //192.168.0.231/BACKUP /mnt/qnap2 -o user=USER,pass=PASSWORD

if you only want to restore the master boot record:

dd if=/mnt/qnap2/XEN/xenserver3_2012_11_02_sda.iso of=/dev/sda bs=512 count=1

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin