Backup your original Hard Drive

From AwkwardTV
Revision as of 09:58, 22 September 2007 by AjpKxs (talk | contribs)
Jump to: navigation, search
lacie 80gb usb definizione di sistema candlemass documents of doom memories fade www disney latono com kiss dvd 508 wrestlinh brasileira il ladro dei bambini ragazzo lissone frontline gatto www incinte com g7050 cellulari lg gamesurround fortissimo turtle blues digitale 5 megapixel minera ef 28200 indirizzi accompagnatrici beauty ninna nanna l berte myoplex low carb www y philips 190s5fs diamanti quotazioni titoli buoni o cattivi www intra it cheryl ladd maxtor plus 9 300 gb televisore 4 3 sony kv 32 sandy pelada corason garmin ique 3600 kit lisa e michele riforma tfr paul johnsons epson 1290 photo cartucce amd athlon 64 3800 hztc 9 moreno morena l arte neoclassica hot hits cd musicali x2250 lexmark asus extreme n6600 td eurorack ub1202 i predatori della pietra magica canon 70 300 mappa geografica dmc fz10 calendari amatoriali sexxy free gratis moto autodromo del mugello telefonini siemens c60 paulita karmacoma photocd www citroen italia lento de julieta venegas le serve preghiere in latino olivo cyber dsc t33 www seefeld com dedica it napoli palermo magazzini ingrosso abbigliamento bologna torcia subacquea fa mi gunther weeny rivalutazione terreni wonderful rkelly ashanti himno spain clone cd masterizzatore sony toshiba style bay garrigue jean dalaras lettore dvd divx irradio motoslitte canon 180 macro civitavecchia cagliari seven heven mario super testina canon bjc hotel nazionale sanremo associazione nazionale residenti estero stuck in a moment acoustic strumenti ginecologici il dolce corpo di deborah anello oro bianco lunytunes amplificatore antenna lunotto toner canon 220 video sexy cantante decreto legislativo 65 99 train simulator love deluxe dvd portatile 8 mf jet 440 ati radeon x600 pro natalia mesa bush assistenza rasoi elettrici firenze gomera lofra 66 c2 energy vtr hard disk 2 5 box play midi la foresta che vive semeraro mobili download windows xp driver hp 640c mariah carey scandalo tv show nuda poesie su dio plugin for mac eat me crashdown epson epl6200l traditional iran music moda anni 60 foto naturiste jvc 23 elisa bridges peris hilton benedetto marcello adagio per pianoforte braun 370 treni regionali definizione del settore secondario classe 1984 young boys flex motorola io e il re tom tom pocket pc buitres mariani clima verga novelle gloria trevi beatiful video pharrell video sapphire ati allinwonder 9800 immagini di fiche milionario scaricare kaily midi file de norah jones oasis little by little acoustic serena gf seno grossi temptation samsung clp 510 sponde per letto kermit getz auto nuove vini irlandesi jvc rcex25 videos gratis de porno v 3 sony str de distrito nacional designers e stilisti lavatrice rex ri laccato fotocamere canon ixus 500 rinconete e cortadillo flirt game d p r 28 dicembre 2000 n 445 hard disk 250 esterno la maschera del vendicatore rover 75 connoisseur www radio dej it www maggiore it sony dscp200 s download giochi bigliardo computer roma alberghi e hotel boss occhiali saggio breve boccaccio dante petrarca confronto processore amd skt a dr mario pioneer 436 spartito buoni o cattivi my x8 un americano a oxford dpr 633 72 infrarossi esterno morellato spa tom go 500 zucche ro dragostea tin dei alimentatore stabilizzato mp3 usb sd trucco prince of persia pc alice cooper prime cuts poze cu bebelusa strategia marketing monopolio gioco inxs live baby live wembley stadium outkast psychedelic funk soul brother enel distribuizione spa digital audio video recorder wonde gps un branco di vigliacchi verifica domini testo backstreet boy il pilota della morte digitale terrestre interno tv giochi sexi per bambini from the beginning

<Google>WIKI</Google>

The Phoem method may be superceded by Engadget's. Please consider doing a complete ~40GB backup of your original drive.

Phoem's Fast DD Method (OS X)

This will allow you to make copies of your AppleTV system partitions in case you need to restore them to a virgin state. This has only been tested on MacOS X.

NOTE: These instructions assume /dev/disk2 is your AppleTV drive.

First we will make copies of the original AppleTV partitions that we care about (everything except for the media partition, basically).

Lets copy the partitions onto your local drive:

dd if=/dev/disk2 of=Partition.img bs=1024k count=100
dd if=/dev/disk2s1 of=EFI.img
dd if=/dev/disk2s2 of=OS.img
dd if=/dev/disk2s3 of=OSBoot.img

Now lets put it back in place onto the new drive:

dd if=Partition.img of=/dev/disk2 bs=1024k count=100
dd if=EFI.img of=/dev/disk2s1
dd if=OS.img of=/dev/disk2s2
dd if=OSBoot.img of=/dev/disk2s3

Now use iPartition demo to find out the size if you were to grow the partition completely; using up the free space.
Execute: gpt recover /dev/disk2
Execute: gpt remove -i 4 /dev/disk2
Unmount the drives.
Execute: 'gpt add -s 309849759 -i 4 /dev/disk2 5A8 '
NOTE: 309849759 represents the # of blocks iPartition mentioned.
Finally, open diskutility and format just the media partition. (erase)

Linux Method

For a full disk image execute (approx 40GB space required):

dd if=/dev/sdc of=appletv-full-disk.bin bs=1024

For a compressed disk image execute (approx 2.5GB, roughly 1-3hrs):

dd if=/dev/sdc bs=1024 | gzip > appletv-full-disk.bin.gz

For partition-specific backups execute:

dd if=/dev/sdc0 of=Partition.img bs=1024 count=100
dd if=/dev/sdc1 of=EFI.img
dd if=/dev/sdc2 of=OS.img
dd if=/dev/sdc3 of=OSBoot.img
dd if=/dev/sdc4 of=Media.img

To perform a full drive restore (takes a long time, 18 hours in one case, but a sure thing from a whole disk), execute:

dd if=appletv-full-disk.bin of=/dev/sdc bs=1024

Note: sdc represents your AppleTV 2.5" notebook drive. It could be sda/sdb/sdc (USB) or hda/hdb/hdc (IDE) depending on your system, and how you connect the drive to the host machine. The number that sometimes but not always follows it is the partition id. In Linux, not specifying the partition id treats the whole drive as one big partition. This can be useful for backups and restores.

The reasoning behind creating a full backup image should be clear by looking at the partition table with fdisk. The minor partitions are 5A8 wrapped in one large meta-partition!

Disk /dev/hdc: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device    | Boot | Start | End   | Blocks   | Id | System
/dev/hdc1          1       4864    39070076   ee   EFI GPT


Update: Linux can see the partitions and can mount them (although journaling is not supported), if the following options are compiled in the kernel. (not sure if you need all of them)

Filesystems -> Partition Types -> Advanced partition selection                    (CONFIG_PARTITION_ADVANCED=y)
Filesystems -> Partition Types -> Macintosh partition map support                 (CONFIG_MAC_PARTITION=y)
Filesystems -> Partition Types -> EFI GUID Partition support                      (CONFIG_EFI_PARTITION=y)
Filesystems -> Miscanelous filesystems ->Apple Extended HFS file system support   (CONFIG_HFSPLUS_FS=m or y)

Partitions can be mounted forcefully. Although this is not recommended, it may be necessary to alter execution permissions on files such as /usr/sbin/sshd before it will auto-launch. Forceful mounts can be done with:

mount -t hfsplus -o force /dev/sdc3 /mnt/appletv

Linux Method With Compression

To back up the whole raw disk image takes 40 GB of drive space on the destination drive. Most of the source disk is empty howev 5A8 er.
This allows for the creation of a smaller image by piping dd to gzip while imaging the drive.

dd if=/dev/sdc bs=1024 | gzip > wholedrive.img.gz

39070080 0 records in
39070080 0 records out
40007761920 bytes (40 GB) copied, 3436.62 seconds, 11.6 MB/s

Note: This will take about an hour depending on your machine!

In the end, this results in a file that's about 2.4GB on the destination disk. Not a bad compression ratio!

Update: dd if=/dev/sdc bs=1024 | bzip2 -9 > wholedrive.img.bz2 Will take approx twice as long, and result in a 2.2GB file. FYI.

Update 2: there is a huge gain in compressibility if you zero the empty space on the partitions before doing backup. I did the folowing using a macintosh on Media and OSBoot partitions and the resulting image is only 528 MB! The reason is that the zeros are more compressible than the garbage, which was there before.

dd if=/dev/zero of=/Volumes/Media/big_file_full_of_zeros bs=1024
rm /Volumes/Media/big_file_full_of_zeros
sudo umount /Volumes/Media/

Maybe the same effect can be obtained using macintosh Disk Utility -> Erase -> Erase Free Space ... -> Zero Out Deleted Files