Thursday, November 05, 2009

Backup copy of Mac OS installation disk

The method I explain only for personal use and not for distribution. Everyone know that DVD disks are not reliable media and there is a big chance to get the problem with drive laser or disk. So, it is a very good idea to protect the data on Mac OS installation disk. The structure there little complicated. There are some partitions on it I want to save too. If you try do it by `Disk Utility' program and create dmg image you'll lose all partitions except main one. But there is one trick to do it by CLI utility. Lets see how. This may be one stage or two stages procedure. First of one we will create cdr master image by this simple command:
$ hdiutil create -srcdevice /dev/disk1 -format UDTO ImageName
Note: /dev/disk1 is your DVD drive in system.
The second command for those who prefer to have dmg image:
$ hdiutil convert -format UDZO -o ImageNameForDMG ImageNameForCDR
I want to highlight that direct to dmg command save only one main partition, so it is not an exact copy of your disk.
The BASH script examples are below:
dvd2cdr.shView





cdr2dmg.shView

No comments: