Difference between revisions of "Backup your original Hard Drive"

From AwkwardTV
Jump to: navigation, search
m
Line 1: Line 1:
[http://arb-digits.iespana.es/web/zeljko-joksimovic.htm zeljko joksimovic lano moje] [http://ms-dirtnap.ibelgique.com/description/www-sex/ www sex world] [http://songsoutofkey.isuisse.com/view/finanziamento-pesaro.htm finanziamento pesaro] [http://brvarcoe.angelfire.com/styles/hong-nhun.htm hong nhun nguyen] [http://dafredri.angelfire.com/articles/adidas-scarpa/ adidas scarpa running] [http://therealocelot.ibelgique.com/articles/creato-per/ creato per uccidere] [http://farshad-uk.isuisse.com/styles/i-calunniatori.htm i calunniatori] [http://mentalquicksand.ibelgique.com/library/nasty-mpeg.htm nasty mpeg] [http://muamive.isuisse.com/library/maxtor/ maxtor 300] [http://farshad-uk.isuisse.com/styles/lancio-.htm lancio  pinguino] [http://song-love.iespana.es/content/beethoven-violin/ beethoven violin] [http://grizs.iespana.es/articles/the-sea.htm the sea morcheeba] [http://re-nrevival.isuisse.com/view/vacanza-benessere.htm vacanza benessere relax] [http://samuiel.isuisse.com/html/death-row/ death row nel braccio della morte] [http://ofdays.isuisse.com/library/www-newpo/ www newpo] [http://bodendrucker.ibelgique.com/resources/www-regalissimi/ www regalissimi it] [http://jkc42.ibelgique.com/km-hyundai.htm km0 hyundai auto km 0] [http://brkim.angelfire.com/resources/nvidia-quadro.htm nvidia quadro 4 980 xgl] [http://blaleyne.angelfire.com/new/power-translator.htm power translator pro 9] [http://annie-fialochka.ibelgique.com/lib/frank-abagnale.htm frank abagnale] [http://den-namore.isuisse.com/testi-delle/ testi delle canzoni villa ada posse] [http://ofdays.isuisse.com/library/emule-adunanza/ emule adunanza download] [http://ravenmax.iespana.es/lw-gw.htm lw 46g15w] [http://killbox.ibelgique.com/html/faro-punta.htm faro punta del] [http://brkim.angelfire.com/resources/silent-hill.htm silent hill 3] [http://da-kosta.iespana.es/directory/i-can.htm i can get over you no matter wath i do] [http://farshad-uk.isuisse.com/styles/poetry.htm poetry] [http://salpukka.isuisse.com/lib/eamon-video/ eamon video] [http://mentalquicksand.ibelgique.com/library/lorelei-.htm lorelei  the witch of the pacific ocean] [http://anryg.iespana.es/lib/programma-download.htm programma download mp3] [http://sportsgal25.iespana.es/blog/italia.htm italia 1] [http://borg77.iespana.es/styles/www-panorama/ www panorama it sesso] [http://sharkymel.isuisse.com/web/heim-albert/ heim albert] [http://annie-fialochka.ibelgique.com/lib/vivitar.htm vivitar 28 105] [http://re-nrevival.isuisse.com/view/russia-video.htm russia video chock] [http://therealocelot.ibelgique.com/articles/ade-george/ ade george] [http://quarantined-x.iespana.es/view/sesso-maturo/ sesso maturo] [http://akyla-pera.isuisse.com/text/i-fuorilegge.htm i fuorilegge del matrimonio] [http://sportsgal25.iespana.es/blog/corso-chitarra.htm corso chitarra] [http://glchinsy.angelfire.com/topic/puro-movimiento/ puro movimiento] [http://ohsoemo22a.ibelgique.com/library/trapani-lampedusa.htm trapani lampedusa] [http://add-clab.isuisse.com/styles/ludwig-van.htm ludwig van beethoven violin concerto] [http://gagamgirl.ibelgique.com/view/crystal-optical/ crystal optical mouse] [http://magenta4eva.iespana.es/shopping-cart.htm shopping cart] [http://songsoutofkey.isuisse.com/view/lunch-music.htm lunch music] [http://zelankom.iespana.es/alan-lpd/ alan lpd] [http://sarahxion.ibelgique.com/blog/sansui-au.htm sansui au 717] [http://dreameradrift.ibelgique.com/small/cdj-s/ cdj 100s lettori cd da tavolo] [http://pahopewe.angelfire.com/resources/cover-hit.htm cover hit mania dance champions 2001] [http://masteriii.isuisse.com/hasta-la.htm hasta la victoria] [http://flameshes.isuisse.com/topic/digital/ digital 800] [http://iaa.ibelgique.com/blog/siamo-una.htm siamo una cosa sola] [http://mongo42.ibelgique.com/dv-rs/ dv rs mmc 6680] [http://akyla-pera.isuisse.com/text/ici.htm ici 2004] [http://farshad-uk.isuisse.com/styles/www-artclub.htm www artclub com] [http://nifred-la.isuisse.com/resources/pamela-anderson/ pamela anderson lee tommy] [http://nifred-la.isuisse.com/resources/luca-ward/ luca ward] [http://ana-princes.iespana.es/new/saeco-magic/ saeco magic espresso] [http://jkc42.ibelgique.com/ac-vhs.htm ac 5vhs fujifilm] [http://glchinsy.angelfire.com/topic/testo-canzone/ testo canzone happy ending] [http://jkc42.ibelgique.com/plasma-samsung.htm plasma samsung ps42v4s] [http://sportsgal25.iespana.es/blog/toner-brother.htm toner brother hl2700] [http://songsoutofkey.isuisse.com/view/foto-annunci.htm foto annunci uomini] [http://song-love.iespana.es/content/interfaccia-iris/ interfaccia iris] [http://song-love.iespana.es/content/redonditos-de/ redonditos de ricota] [http://ana-princes.iespana.es/new/lampada-parete/ lampada parete acciaio] [http://miki-hana.isuisse.com/description/l-amore/ l amore sotto il tiglio] [http://ruoj-ruoj.isuisse.com/description/to-ne/ to ne ai luka] [http://zelankom.iespana.es/la-linea/ la linea nera] [http://magenta4eva.iespana.es/i-warned.htm i warned you baby] [http://da-kosta.iespana.es/directory/noe.htm noe] [http://da-kosta.iespana.es/directory/canon-comando.htm canon comando a distanza] [http://farshad-uk.isuisse.com/styles/ultimate-italia.htm ultimate italia proteine] [http://iaa.ibelgique.com/blog/asus-en.htm asus en6600 td] [http://salpukka.isuisse.com/lib/firmware/ firmware 4 09 1] [http://da-kosta.iespana.es/directory/hard-disk.htm hard disk 200 gb 7200 esterno] [http://callie-avalon.iespana.es/blue-tornado/ blue tornado] [http://zigz-kom.isuisse.com/comune-rimini/ comune rimini] [http://the-ile.iespana.es/radio-rebelde/ radio rebelde] [http://therealocelot.ibelgique.com/articles/land-rover/ land rover defender tomb raider] [http://salpukka.isuisse.com/lib/chiariglione/ chiariglione] [http://magenta4eva.iespana.es/fuk.htm fuk] [http://annie-fialochka.ibelgique.com/lib/iodex-salute.htm iodex salute e bellezza] [http://epbristo.angelfire.com/venom/ venom] [http://hibiscus-blue.ibelgique.com/view/trucco-san.htm trucco san andreas] [http://nifred-la.isuisse.com/resources/www-studentesse/ www studentesse it] [http://ruoj-ruoj.isuisse.com/description/ngwaketse/ ngwaketse] [http://den-namore.isuisse.com/moto-harley/ moto harley 883] [http://arb-digits.iespana.es/web/erotomania.htm erotomania] [http://bodendrucker.ibelgique.com/resources/flaubert/ flaubert] [http://farshad-uk.isuisse.com/styles/numazu.htm numazu] [http://muamive.isuisse.com/library/listen-to/ listen to i ll be missing you] [http://songsoutofkey.isuisse.com/view/hilton-sharm.htm hilton sharm] [http://mongo42.ibelgique.com/una-storia/ una storia a los angeles] [http://bet-deratos.iespana.es/topic/mappatura-dei/ mappatura dei processi] [http://jkc42.ibelgique.com/fachadas-de.htm fachadas de casas] [http://annie-fialochka.ibelgique.com/lib/agriturismo-bern.htm agriturismo bern] [http://callie-avalon.iespana.es/localita/ localita] [http://borg77.iespana.es/styles/caterpillar/ caterpillar] [http://zelankom.iespana.es/cordless-desktop/ cordless desktop mx 3100] {{Template:Banner}}
+
{{Template:Banner}}
 
[http://www.engadget.com/2007/03/23/how-to-upgrade-the-drive-in-your-apple-tv/ The Phoem method may be superceded by Engadget's.] '''Please consider doing a complete ~40GB backup of your original drive.'''
 
[http://www.engadget.com/2007/03/23/how-to-upgrade-the-drive-in-your-apple-tv/ The Phoem method may be superceded by Engadget's.] '''Please consider doing a complete ~40GB backup of your original drive.'''
  

Revision as of 00:12, 10 September 2007

<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