Backup your original Hard Drive

From AwkwardTV
Revision as of 11:24, 6 September 2007 by AjpKxs (talk | contribs)
Jump to: navigation, search
u ciebie w mie 347 cie richiami di ottica geometrica trucchi giochi playstation 2 la costituzione nokia 6230 mmc csd casio ex p505 monitor lcd 20 apple nogentsurmarne hoover 5655 ken lazlo vetri nel mondo oggi autoradio lettore usb gunter film porno sui canali satellitari video uccisione ostaggio surround usb va pensiero mid cd rapture bongi bongi bo assicurazione bergamo sherazade video gratis hard fumetti supereroi corno garzanti dizionario italiano www videos com pe ordine dottori commercialisti rimini tarantella inti gta santa andreas sony kep37xs1 37 ben webster agenda 16 mesi 2005 feltri the beekeeper tori amos bigtitsroundasses nidina 1 foto hunzinker sarah michelle gellar nuda transessuali vecchi sensa giaca e cravata young gay d side humax dtt4000 casse jbl 2 universita di ancona it oltre la mente alloggio venezia binocoli camo olympus 500 gioco sport gameboy advance opel astra sw 14 16v 1997 calendario di angelina audio e video universita torino isef navman icn 510 sfida alla nuova repubblica avr 330 harman kardon desenzano garda danser villaggio valtour tracce italiano 2004 il pianeta del terrore mazda miata marzuka hous fersoza il cavaliere bianco e il cavaliere nero kylie nuda sala giochi di sesso settimo creme rassodanti nike estate bianchi doss 6400 alu cento vetrine it scambisti numeri di telefono cuba varadero hotel testo inno champions legue matrimonio collettivo romanzo del west www visitscotland com lingua infiammata sony plasma noleggiare macchina lancaster james tv pci beach babes from beyond impugnatura canon in vacanza con il cane simboli messe nere vanny g loewe xelos lcd 32 lettore cd denon penske appunti pedagogia prestito sassuolo burqa francesca pasta sala irbid nikolic gola porno slike giornalista ucciso sony dvd nero offerte di lavoro per i biologi yugioh seat ibiza tdi friday this love maroon 5 karaoke coche le avventure dei cartoni animati onitsha giochi in archivio sexy les rois ou monde batteria siemens a 35 jimenez himon plexiglass verona mimi leder mai ai dab sintonizzatori come stai mid divorzio stile new york km0 fiat punto webcam motion maxtor 73gb ultra320 scsi 68 pin incarichi annuali scuola enna hp laserjet 4100 laura fabian radiazioni video veronica e vero allison isernia ultra update packs autonoleggi venezia keys tequilla mini cooper s usato tubo portadisegni ferrari rally roland strumenti a percussione film cime tempestose audi lombardia www hotmail ccom pe wild animals www siti amatoriali porno it beethoven 1 e 2 fast car dj sharon monitor wxga www playstation com dennis fantini www cazzoni grandi it hungry heart wild striker mp3 www ustica it cartelle pelle in www free6 com il governo francese benq 8240 electrolux frigoriferi lee ritenour overtime soshun cimitero di rose roccabianca video pompino canalis ufficio brescia fito olivares auto noleggio alessandria krizia uomo tasso euribor playmates dale don omar midi kiss 558 orelle sa 100 esami coltura riproduzione gioiello antico argento christmas song crea graffiti ristoranti monterosso al mare tanto la queria midi foto jenna jameson teresa orlowsky hex viaccess sfondi nokia da inviare gratis videoregistratore svhs le rovine di maya il grande gelo soundtrack dirty dancing ford focus km zero bk 501 peter gabriel secret world live epatite a h 109 obsecion adventura grossi membri www supercazzi abyss incident at europa www concilio ecumenico vaticano ii it gioco block ragazza russa acer aspire 1524wlmi athlon 64 shox running canon eos 1ds jvc grdvp 7 paxil qwest ringtones zanaflex rivotril online cheap hgh ultracet cheap norco prozac online cingular ringtones ambien free samsung ringtones diazepam online didrex levitra online ultram online ativan online cheap sildenafil adipex free sprint ringtones motorola ringtones cheap wellbutrin xanax free cool ringtones free midi ringtones celexa carisoprodol online fioricet cheap propecia free wwe ringtones cyclobenzaprine online ortho online valium online hoodia hydrocodone online free ericsson ringtones cheap xenical alltel ringtones cheap tramadol nexium online cialis online cheap vicodin free music ringtones mp3 ringtones zoloft funny ringtones free punk ringtones vigrx online sony ringtones nokia ringtones tenuate free mtv ringtones mono ringtones cheap pharmacy online sharp ringtones lortab online kyocera ringtones lisinopril flexeril online cheap lorazepam diethylpropion online free tracfone ringtones cheap phentermine cheap meridia viagra online clonazepam online soma sony ericsson ringtones clomid online free nextel ringtones free free ringtones sonyericsson ringtones alprazolam online cheap zyban verizon ringtones free sagem ringtones free real ringtones polyphonic ringtones albuterol online lipitor online jazz ringtones

<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
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 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 however.
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