Difference between revisions of "Backup your original Hard Drive"

From AwkwardTV
Jump to: navigation, search
m
m (Reverted edits by LizaCaddy (Talk) to last revision by Fcorthay)
 
(26 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[http://belikan.ifrance.com/library/she-will.htm she will be loved] [http://chrystiala.ifrance.com/library/orovi.htm orovi] [http://liubash.ifrance.com/new/monitor-lcd.htm monitor lcd yusmart] [http://beatpoetsa.ifrance.com/description/obsesion-aventura.htm obsesion aventura remix download] [http://jene7777777.ifrance.com/new/cartina-fisica.htm cartina fisica toscana] [http://shotlandetz.ifrance.com/blog/giubbotto-jeans/ giubbotto jeans] [http://chrystiala.ifrance.com/library/dvd-player.htm dvd player portable] [http://feelosof.ifrance.com/description/ati-/ ati  sapphire radeon x800pro 256mb ddr] [http://beatpoetsa.ifrance.com/description/monitor-lcd.htm monitor lcd con tv] [http://liubash.ifrance.com/new/madam-ascolta.htm madam ascolta] [http://infunt.ifrance.com/articles/giochi-nuovi/ giochi nuovi di avventura] [http://eccoblackfin.ifrance.com/html/lesbo-paradise.htm lesbo paradise] [http://pouringsunny.ifrance.com/description/floppy-disk/ floppy disk esterno] [http://animaetrix00.ifrance.com/content/playboy-the/ playboy the mansion xbox] [http://eccoblackfin.ifrance.com/html/ariete.htm ariete 4250] [http://feelosof.ifrance.com/description/sorrisi-com/ sorrisi com] [http://beatpoetsa.ifrance.com/description/crusader.htm crusader] [http://jene7777777.ifrance.com/new/wick.htm wick] [http://lethalga.ifrance.com/topic/james-last/ james last end his orchestra] [http://thecakeblog.ifrance.com/articles/albergo-pensione/ albergo pensione rimini] [http://feelosof.ifrance.com/description/lucy-lawless/ lucy lawless nuda] [http://liubash.ifrance.com/new/cartografia-de.htm cartografia de comune di bologna] [http://feelosof.ifrance.com/description/traccia-prima/ traccia prima prova maturita 2004] [http://listsobacka.ifrance.com/small/olsen-ernst.htm olsen ernst bruun] [http://infunt.ifrance.com/articles/kt-neof/ k8t neo2f socket 939 amd chipset] [http://makkiesan.ifrance.com/jolly-hotel.htm jolly hotel roma] [http://makkiesan.ifrance.com/chitarra-acustica.htm chitarra acustica] [http://emrinalexander.ifrance.com/styles/filumena.htm filumena] [http://animaetrix00.ifrance.com/content/moglie-bagnata/ moglie bagnata] [http://cikumuffin.ifrance.com/topic/mov/ mov] [http://beatpoetsa.ifrance.com/description/marco-migliavacca.htm marco migliavacca] [http://infunt.ifrance.com/articles/caludio-baglioni/ caludio baglioni] [http://cikumuffin.ifrance.com/topic/pacifisti-della/ pacifisti della prima guerra mondiale] [http://thecakeblog.ifrance.com/articles/chiudi-internet/ chiudi internet] [http://belikan.ifrance.com/library/www-aree.htm www aree sciistiche it] [http://thecakeblog.ifrance.com/articles/sm-v/ sm 913v] [http://jene7777777.ifrance.com/new/un-uomo.htm un uomo da bruciare] [http://lethalga.ifrance.com/topic/la-tua/ la tua vita per mio figlio] [http://chrystiala.ifrance.com/library/www-regalo.htm www regalo delta integrale it] [http://feelosof.ifrance.com/description/condomgame/ condomgame] [http://pouringsunny.ifrance.com/description/nautica-motor/ nautica motor] [http://seachildelf.ifrance.com/resources/filodiffusione/ filodiffusione] [http://infunt.ifrance.com/articles/video-violenza/ video violenza tra tifosi] [http://emrinalexander.ifrance.com/styles/guru-abbigliamento.htm guru abbigliamento franchising] [http://shmarodral.ifrance.com/text/mercedes-c.htm mercedes c 220 cdi avantgarde] [http://emrinalexander.ifrance.com/styles/wedding-dress.htm wedding dress] [http://eccoblackfin.ifrance.com/html/raccoglitori-ufficio.htm raccoglitori ufficio] [http://infunt.ifrance.com/articles/nuova-golf/ nuova golf 2 0] [http://ohmygoshalix.ifrance.com/blog/pinnacle-dazzle.htm pinnacle dazzle dvc80] [http://liubash.ifrance.com/new/corsair-ram.htm corsair ram sodimm] [http://lethalga.ifrance.com/topic/anastasia-outside/ anastasia outside alone] [http://lethalga.ifrance.com/topic/centro-servizi/ centro servizi mercury sas] [http://emrinalexander.ifrance.com/styles/km.htm km] [http://ohmygoshalix.ifrance.com/blog/fate-immagini.htm fate immagini] [http://lethalga.ifrance.com/topic/passione-ambigua/ passione ambigua] [http://belikan.ifrance.com/library/mac-schede.htm mac schede audio] [http://shmarodral.ifrance.com/text/il-paradiso.htm il paradiso dei fuorilegge] [http://jojorock.ifrance.com/articles/varese-coppie/ varese coppie] [http://jene7777777.ifrance.com/new/dvd-recorder.htm dvd recorder wiso] [http://shmarodral.ifrance.com/text/chce-tu.htm chce tu zosta 263] [http://beatpoetsa.ifrance.com/description/i-giochi.htm i giochi piu belli per ps1] [http://thecakeblog.ifrance.com/articles/dizionario-italiano/ dizionario italiano bulgaro] [http://chrystiala.ifrance.com/library/cerca-con.htm cerca con msn] [http://animaetrix00.ifrance.com/content/canzoni-manfredi/ canzoni manfredi da scaricare gratis] [http://belikan.ifrance.com/library/sacramento-dell.htm sacramento dell eucarestia] [http://feelosof.ifrance.com/description/audi-a/ audi a4 anno 2002] [http://cikumuffin.ifrance.com/topic/corpus-domini/ corpus domini] [http://jojorock.ifrance.com/articles/volante-pedali/ volante pedali] [http://feelosof.ifrance.com/description/monica-anselmi/ monica anselmi] [http://animaetrix00.ifrance.com/content/panasonic-lumix/ panasonic lumix lz1] [http://cikumuffin.ifrance.com/topic/de-longhi/ de longhi 1000] [http://ohmygoshalix.ifrance.com/blog/lafontaine-henri.htm lafontaine henri] [http://eccoblackfin.ifrance.com/html/playstation-dance.htm playstation dance mat] [http://makkiesan.ifrance.com/dove-stai.htm dove stai] [http://belikan.ifrance.com/library/motori-di.htm motori di ricerca software] [http://seachildelf.ifrance.com/resources/grazie-signore/ grazie signore grazie] [http://emrinalexander.ifrance.com/styles/fotocamere-kyocera.htm fotocamere kyocera] [http://eccoblackfin.ifrance.com/html/tarzan-boy.htm tarzan boy baltimore] [http://feelosof.ifrance.com/description/sesso-con/ sesso con bestie] [http://eccoblackfin.ifrance.com/html/autopilota.htm autopilota] [http://listsobacka.ifrance.com/small/masterizzatore-pioneer.htm masterizzatore pioneer 110] [http://infunt.ifrance.com/articles/margot-sikabony/ margot sikabony] [http://infunt.ifrance.com/articles/schweinfurth-georg/ schweinfurth georg august] [http://shotlandetz.ifrance.com/blog/gur/ gur] [http://listsobacka.ifrance.com/small/cisco-.htm cisco  350 series pc card] [http://emrinalexander.ifrance.com/styles/nicomar.htm nicomar] [http://infunt.ifrance.com/articles/protetto/ protetto] [http://emrinalexander.ifrance.com/styles/mutuo-agevolato.htm mutuo agevolato giovani coppia] [http://lethalga.ifrance.com/topic/fassi-tower/ fassi tower] [http://jene7777777.ifrance.com/new/caracas-venezuela.htm caracas venezuela] [http://listsobacka.ifrance.com/small/tiziano-ferro.htm tiziano ferro serenere] [http://cikumuffin.ifrance.com/topic/preventivo-rc/ preventivo rc auto] [http://pouringsunny.ifrance.com/description/calendario-barale/ calendario barale] [http://ohmygoshalix.ifrance.com/blog/transizione-economica.htm transizione economica] [http://shotlandetz.ifrance.com/blog/philips-lettore/ philips lettore combi dvd vcr hifi] [http://animaetrix00.ifrance.com/content/ferrovia-stato/ ferrovia stato] [http://cikumuffin.ifrance.com/topic/seat-concessionario/ seat concessionario] [http://pouringsunny.ifrance.com/description/loghi-cellulare/ loghi cellulare gratis] [http://beatpoetsa.ifrance.com/description/pachelbe-canon.htm pachelbe canon] [http://makkiesan.ifrance.com/netgear-fsp.htm netgear fs108p] [http://shotlandetz.ifrance.com/blog/un-trailer/ un trailer americano per dragon quest viii] [http://pouringsunny.ifrance.com/description/codex-indeo/ codex indeo] [http://ohmygoshalix.ifrance.com/blog/to-nem.htm to nem aj] [http://shmarodral.ifrance.com/text/splendore.htm splendore] [http://infunt.ifrance.com/articles/p-i/ p i m p] [http://beatpoetsa.ifrance.com/description/postal-de.htm postal de amistad] [http://emrinalexander.ifrance.com/styles/bluetooth-per.htm bluetooth per nokia gps] [http://jene7777777.ifrance.com/new/sardegna-canta.htm sardegna canta] [http://jojorock.ifrance.com/articles/may-wey/ may wey] [http://jojorock.ifrance.com/articles/www-auxologia/ www auxologia it] [http://shotlandetz.ifrance.com/blog/ascolta-un/ ascolta un emozione per sempre] [http://shmarodral.ifrance.com/text/poliziotto-a.htm poliziotto a quattro zampe] [http://lethalga.ifrance.com/topic/mattoe/ mattoe] [http://lethalga.ifrance.com/topic/hotel-san/ hotel san pietroburgo] [http://seachildelf.ifrance.com/resources/tv-hitachi/ tv hitachi 32 pd5200] [http://beatpoetsa.ifrance.com/description/la-cumparsita.htm la cumparsita tango argentino] [http://liubash.ifrance.com/new/travel-south.htm travel south america] [http://cikumuffin.ifrance.com/topic/con-ragazze/ con ragazze belle] [http://shmarodral.ifrance.com/text/donna-.htm donna 50 anni olbia] [http://belikan.ifrance.com/library/cam-porn.htm cam porn] [http://beatpoetsa.ifrance.com/description/www-adiconsum.htm www adiconsum it] [http://emrinalexander.ifrance.com/styles/solo-eamon.htm solo eamon italian version] [http://eccoblackfin.ifrance.com/html/bp.htm bp 711] [http://thecakeblog.ifrance.com/articles/vicenza-centro/ vicenza centro] [http://thecakeblog.ifrance.com/articles/see-thru/ see thru bikini] [http://jazzyjoe.ifrance.com/itt/ itt] [http://jojorock.ifrance.com/articles/erotismo-negre/ erotismo negre] [http://eccoblackfin.ifrance.com/html/trans-flash.htm trans flash da 512] [http://liubash.ifrance.com/new/vita-rosa.htm vita rosa] [http://feelosof.ifrance.com/description/ivan-d/ ivan d andrea] [http://chrystiala.ifrance.com/library/guerra-von.htm guerra von] [http://chrystiala.ifrance.com/library/orari-trghetti.htm orari trghetti] [http://animaetrix00.ifrance.com/content/wamu-com/ wamu com] [http://firejedi.ifrance.com/new/millio/ millio] [http://seachildelf.ifrance.com/resources/inverigo/ inverigo] [http://ohmygoshalix.ifrance.com/blog/bosch-maxx.htm bosch maxx] [http://jojorock.ifrance.com/articles/game-park/ game park] [http://makkiesan.ifrance.com/ultimi-annunci.htm ultimi annunci] [http://pouringsunny.ifrance.com/description/gossip-su/ gossip su alessandra e costantino] [http://shmarodral.ifrance.com/text/cat.htm cat6] [http://lethalga.ifrance.com/topic/mitsubishi-space/ mitsubishi space runner 2001] [http://cikumuffin.ifrance.com/topic/pastiglie-leone/ pastiglie leone] [http://thecakeblog.ifrance.com/articles/carbo-load/ carbo load] [http://jene7777777.ifrance.com/new/freddie-mercury.htm freddie mercury tribute] [http://shmarodral.ifrance.com/text/bici-ciclismo.htm bici ciclismo] [http://thecakeblog.ifrance.com/articles/folds/ folds] [http://liubash.ifrance.com/new/khara-khoto.htm khara khoto] [http://pouringsunny.ifrance.com/description/defim/ defim] [http://jene7777777.ifrance.com/new/ignis-auto.htm ignis auto nuova] [http://animaetrix00.ifrance.com/content/philips-magic/ philips magic 2] [http://makkiesan.ifrance.com/sony.htm sony 15] [http://shotlandetz.ifrance.com/blog/just-another/ just another] [http://jene7777777.ifrance.com/new/diet-pills.htm diet pills] [http://listsobacka.ifrance.com/small/info.htm info412] [http://infunt.ifrance.com/articles/profumo-benetton/ profumo benetton sport] [http://firejedi.ifrance.com/new/musicas-dos/ musicas dos da weasel] [http://animaetrix00.ifrance.com/content/mercanti-di/ mercanti di uomini] [http://animaetrix00.ifrance.com/content/porta-cd/ porta cd dvd] [http://seachildelf.ifrance.com/resources/montecarlo-nights/ montecarlo nights 3] [http://jazzyjoe.ifrance.com/destinazione-marciapiede/ destinazione marciapiede] [http://jazzyjoe.ifrance.com/violenza-per/ violenza per una giovane] [http://shotlandetz.ifrance.com/blog/video-da/ video da vedere] [http://jene7777777.ifrance.com/new/ruky.htm ruky] [http://belikan.ifrance.com/library/addio-mia.htm addio mia bella signora] [http://jojorock.ifrance.com/articles/althaus-clemente/ althaus clemente] [http://infunt.ifrance.com/articles/tubo-irrigazione/ tubo irrigazione] [http://jazzyjoe.ifrance.com/halo-/ halo 2 xbox] [http://chrystiala.ifrance.com/library/batterie-z.htm batterie z300] [http://seachildelf.ifrance.com/resources/microfono-filo/ microfono filo] [http://shmarodral.ifrance.com/text/cofanetto-lino.htm cofanetto lino banfi] [http://seachildelf.ifrance.com/resources/san-mateo/ san mateo] [http://emrinalexander.ifrance.com/styles/dvd-amstrad.htm dvd amstrad home theatre] [http://belikan.ifrance.com/library/la-caffettiera.htm la caffettiera del masochista] [http://firejedi.ifrance.com/new/portatile-hp/ portatile hp cel] [http://listsobacka.ifrance.com/small/fujifilm-finepix.htm fujifilm finepix f440] [http://eccoblackfin.ifrance.com/html/idea-vetro.htm idea vetro snc] [http://belikan.ifrance.com/library/fifa-.htm fifa 2004 soccer] [http://animaetrix00.ifrance.com/content/sud-esr/ sud esr] [http://jazzyjoe.ifrance.com/katherine-mansfield/ katherine mansfield] [http://lethalga.ifrance.com/topic/buffy-/ buffy  stagione 3 completa] [http://seachildelf.ifrance.com/resources/salentino/ salentino] [http://animaetrix00.ifrance.com/content/alberi-/ alberi  e  scoiattoli] [http://jojorock.ifrance.com/articles/tv-fm/ tv fm usb] [http://liubash.ifrance.com/new/telecomando-per.htm telecomando per ricevitore tele system] [http://cikumuffin.ifrance.com/topic/audoux-marguerite/ audoux marguerite] [http://shotlandetz.ifrance.com/blog/florida-mortgage/ florida mortgage broker] [http://pouringsunny.ifrance.com/description/foto-panty/ foto panty poop] [http://pouringsunny.ifrance.com/description/adobe-photoshop/ adobe photoshop elements 3] [http://jazzyjoe.ifrance.com/eizo-monitor/ eizo monitor lcd 17] [http://liubash.ifrance.com/new/drowning-pool.htm drowning pool the game] [http://shmarodral.ifrance.com/text/white-snake.htm white snake] [http://jene7777777.ifrance.com/new/tesmed.htm tesmed] [http://liubash.ifrance.com/new/tette-grandi.htm tette grandi] [http://feelosof.ifrance.com/description/mappa-alzano/ mappa alzano lombardo] [http://lethalga.ifrance.com/topic/gabon/ gabon] [http://ohmygoshalix.ifrance.com/blog/ram-full.htm ram full brand] [http://eccoblackfin.ifrance.com/html/marben.htm marben] [http://shmarodral.ifrance.com/text/iron-maiden.htm iron maiden the trooper] [http://listsobacka.ifrance.com/small/ddr.htm ddr] [http://cikumuffin.ifrance.com/topic/seagate-hd/ seagate hd] [http://beatpoetsa.ifrance.com/description/corde-della.htm corde della mia chitarra] [http://ohmygoshalix.ifrance.com/blog/bussola-orologi.htm bussola orologi] [http://animaetrix00.ifrance.com/content/millau/ millau] [http://jazzyjoe.ifrance.com/fiorino-fiat/ fiorino fiat] [http://makkiesan.ifrance.com/le-olimpiadi.htm le olimpiadi di tokyo] [http://jene7777777.ifrance.com/new/porta-romana.htm porta romana bella] [http://animaetrix00.ifrance.com/content/lady-chatterley/ lady chatterley story] [http://jene7777777.ifrance.com/new/suoni-militari.htm suoni militari] [http://jene7777777.ifrance.com/new/gronau.htm gronau] [http://infunt.ifrance.com/articles/brigitta-bulgari/ brigitta bulgari a fica di fuori] [http://belikan.ifrance.com/library/lemmings-paintball.htm lemmings paintball] [http://jene7777777.ifrance.com/new/frasi-laurea.htm frasi laurea] [http://ohmygoshalix.ifrance.com/blog/lazio-testi.htm lazio testi] [http://cikumuffin.ifrance.com/topic/motivi/ motivi] [http://liubash.ifrance.com/new/housing-architects.htm housing architects] [http://jazzyjoe.ifrance.com/bossanova-standard/ bossanova standard] [http://emrinalexander.ifrance.com/styles/rex-fms.htm rex fms 0100 xe] [http://eccoblackfin.ifrance.com/html/il-pellegrino.htm il pellegrino russo] [http://listsobacka.ifrance.com/small/blackang.htm blackang] [http://ohmygoshalix.ifrance.com/blog/sexy-naked.htm sexy naked images for nancy agram] [http://emrinalexander.ifrance.com/styles/immagini-di.htm immagini di donne bellissime nude] [http://shmarodral.ifrance.com/text/phim.htm phim] [http://shotlandetz.ifrance.com/blog/lecciso-nuda/ lecciso nuda] [http://beatpoetsa.ifrance.com/description/risorsa-playstation.htm risorsa playstation 2] [http://belikan.ifrance.com/library/gigi-d.htm gigi d alessio napule] [http://belikan.ifrance.com/library/pc-portatile.htm pc portatile computer] [http://chrystiala.ifrance.com/library/epson-stylus.htm epson stylus scan 2000] [http://shmarodral.ifrance.com/text/peli.htm peli] [http://makkiesan.ifrance.com/comparse.htm comparse] [http://listsobacka.ifrance.com/small/condizionatori.htm condizionatori 9000] [http://thecakeblog.ifrance.com/articles/videoeros/ videoeros] [http://eccoblackfin.ifrance.com/html/tarantella-rossini.htm tarantella rossini] [http://ohmygoshalix.ifrance.com/blog/nike-shox.htm nike shox oz] [http://listsobacka.ifrance.com/small/www-tarjetas.htm www tarjetas com] [http://infunt.ifrance.com/articles/tatuaggi-gatti/ tatuaggi gatti] [http://animaetrix00.ifrance.com/content/la-scogliera/ la scogliera dei desideri] [http://liubash.ifrance.com/new/mercedes-emilia.htm mercedes emilia romagna] [http://jazzyjoe.ifrance.com/britney-spears/ britney spears music box biographical collection] [http://infunt.ifrance.com/articles/thes-lcd/ thes lcd] [http://animaetrix00.ifrance.com/content/easy-share/ easy share] [http://pouringsunny.ifrance.com/description/red/ red 5] [http://seachildelf.ifrance.com/resources/cpu-amd/ cpu amd athlon xp] [http://shotlandetz.ifrance.com/blog/peugeot-/ peugeot 106 14 sport] [http://beatpoetsa.ifrance.com/description/auto-nissan.htm auto nissan micra] [http://jazzyjoe.ifrance.com/bigcock/ bigcock] [http://jazzyjoe.ifrance.com/filmati-decapitazione/ filmati decapitazione in irak] [http://animaetrix00.ifrance.com/content/download-mame/ download mame 32] [http://thecakeblog.ifrance.com/articles/lx-t/ lx t7206 011] [http://jene7777777.ifrance.com/new/ramasotti.htm ramasotti] [http://feelosof.ifrance.com/description/lo-scambio/ lo scambio di coppia] {
+
=Assumptions=
5A8
 
{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.'''
 
  
==Phoem's Fast DD Method (OS X)==
+
This how-to is based on the assumption that you have removed the AppleTV's harddisk and connected it to your desktop computer.
  
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.
+
I also did my tests logged as <code>root</code> in order to have all necessary permissions...
  
NOTE: These instructions assume '''/dev/disk2''' is your AppleTV drive.
+
===Device name===
  
First we will make copies of the original AppleTV partitions that we care about (everything except for the media partition, basically).
+
It is assumed that the drive shows up as <code>/dev/disk4</code>.
 +
It could have another drive number on your Mac.
 +
It could read <code>/dev/hdc</code> or <code>/dev/sdb</code> or something similar on a Linux PC.
  
Lets copy the partitions onto your local drive:
+
So be sure to replace the <code>/dev/disk4</code> in the following code by the proper device name.
<pre>
+
 
dd if=/dev/disk2 of=Partition.img bs=1024k count=100
+
The partitions will also change from e.g. <code>/dev/disk4s3</code> to something like <code>/dev/sdc3</code> on Linux.
dd if=/dev/disk2s1 of=EFI.img
+
 
dd if=/dev/disk2s2 of=OS.img
+
===Device mount point===
dd if=/dev/disk2s3 of=OSBoot.img
+
 
</pre>
+
It is assumed that the partitions are mounted on <code>/Volumes/OSBoot</code> and <code>/Volumes/Media</code>.
 +
This will be different on a Linux PC.
 +
So again replace the mount point names with the proper ones.
 +
 
 +
=Full drive backup=
 +
 
 +
===Full drive backup to a file===
 +
 
 +
The most secure starting point is to do a complete ~40GB backup of the original disk:
 +
umount /Volumes/Media/
 +
dd if=/dev/disk4 of=appleTV.img bs=1024
 +
 
 +
The only good backup is the tested one:
 +
dd if=appleTV.img of=/dev/disk4 bs=1024
 +
 
 +
===Full drive backup with compression===
 +
 
 +
The backup file will have the size of the disk. If you want to save space, you can compress it on the fly.
 +
Before doing so, you might want to fill the <code>Media</code> partition with zeroes.
 +
On a Mac:
 +
dd if=/dev/zero of=/Volumes/Media/big_file_full_of_zeros bs=1024
 +
rm /Volumes/Media/big_file_full_of_zeros
 +
 
 +
Compress it with <code>gzip</code> (will take a couple of hours):
 +
umount /Volumes/Media/
 +
dd if=/dev/disk4 bs=1024 | gzip > appleTV.img.gz
 +
 
 +
Compress it more (will take about twice the time):
 +
umount /Volumes/Media/
 +
dd if=/dev/disk4 bs=1024 | bzip2 -9 > appleTV.img.bz2
 +
 
 +
=Partitionwise backup (OS X)=
 +
 
 +
This has only been tested on Mac OS X.
 +
 
 +
===Phoem's fast method===
 +
 
 +
Phoem suggests a [http://phoem.com/appletv.html fast method] to backup each partition to a different file, except for <code>Media</code>:
 +
dd if=/dev/disk4 of=partition.img bs=1024k count=100
 +
dd if=/dev/disk4s1 of=EFI.img
 +
dd if=/dev/disk4s2 of=os.img
 +
dd if=/dev/disk4s3 of=OSBoot.img
 +
 
 +
The restoring process is similar:
 +
dd if=partition.img of=/dev/disk4 bs=1024k count=100
 +
dd if=EFI.img of=/dev/disk4s1
 +
dd if=OS.img of=/dev/disk4s2
 +
dd if=OSBoot.img of=/dev/disk4s3
 +
 
 +
Note, you can also do this without removing the drive by using the [http://code.google.com/p/atv-bootloader/wiki/ATVBackup LinuxUSBPenBoot].  --[[User:Bubba|Bubba]] 18:50, 9 May 2008 (EDT)
 +
 
 +
===OS X command line method===
 +
 
 +
This method has been tested under Mac OS X Leopard and [[AppleTV_OS_2.1]].
 +
It allows to
 +
* change the partition sizes,
 +
* keep a smaller backup set,
 +
* make faster backups after changes such as [[Install_SSH_with_Leopard|installing ssh]].
 +
 
 +
As the recovery partition is not mountable in Mac OS X, we'll copy it using Phoem's method:
 +
diskutil eject /dev/disk4
 +
dd if=/dev/disk4s2 of=recovery.img
 +
 
 +
The next partitions in turn will be saved as Mac OS disk images:
 +
hdiutil create -srcdevice /dev/disk4s3 osBoot.dmg
 +
hdiutil create -srcdevice /dev/disk4s4 media.dmg
 +
asr -imagescan osBoot.dmg
 +
asr -imagescan media.dmg
 +
 
 +
After this, the drive can be cleared and repartitioned:
 +
diskutil eject /dev/disk4
 +
gpt show /dev/disk4
 +
gpt destroy /dev/disk4
 +
gpt create /dev/disk4
 +
gpt add -i 1 -b 40 -s 409600 -t efi /dev/disk4
 +
gpt add -i 2 -b 409640 -s 819152 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk4
 +
gpt add -i 3 -b 1228792 -s 1843192 -t hfs /dev/disk4
 +
 
 +
At times, you will be greeted by a message telling that a new drive has appeared and you could format it. Click on ''ignore''.
  
Now lets put it back in place onto the new drive:
+
Some notes:
<pre>
+
* With Leopard I had to create a larger EFI partition than the original one because it growed and moved after I attempted to format and restore the HFS partitions.
dd if=Partition.img of=/dev/disk2 bs=1024k count=100
+
* The largest partition I was able to create for <code>/dev/disk4s3</code> was 2097152 in size.
dd if=EFI.img of=/dev/disk2s1
+
* Leopard created a secondary GPT at the end of the disk.
dd if=OS.img of=/dev/disk2s2
 
dd if=OSBoot.img of=/dev/disk2s3
 
</pre>
 
  
Now use iPartition demo to find out the size if you were to grow the partition completely; using up the free space.<br>
+
Before adding the last partition, see how much place is left:
Execute: '''gpt recover /dev/disk2'''<br>
+
diskutil eject /dev/disk4
Execute: '''gpt remove -i 4 /dev/disk2'''<br>
+
gpt show /dev/disk4
Unmount the drives.<br>
 
Execute: '''gpt add -s 309849759 -i 4 /dev/disk2'''<br>
 
NOTE: 309849759 represents the # of blocks iPartition menti
 
4B0
 
oned.<br>
 
Finally, open '''diskutility''' and format just the media partition. (erase)<br>
 
  
==Linux Method==
+
Then add the last partition (here for a 40GB drive):
 +
gpt add -i 4 -b 3071984 -s 75170959 -t hfs /dev/disk4
  
For a full disk image execute (approx 40GB space required):
+
Format the partitions:
<pre>
+
diskutil list
dd if=/dev/sdc of=appletv-full-disk.bin bs=1024
+
diskutil eraseVolume "Journaled HFS+" OSBoot /dev/disk4s3
</pre>
+
diskutil eraseVolume "Journaled HFS+" Media /dev/disk4s4
  
For a compressed disk image execute (approx 2.5GB, roughly 1-3hrs):
+
Restore the partitions:
<pre>
+
dd if=recovery.img of=/dev/disk4s2
dd if=/dev/sdc bs=1024 | gzip > appletv-full-disk.bin.gz
+
asr restore -s osBoot.dmg -t /dev/disk4s3 --erase --noprompt
</pre>
+
asr restore -s media.dmg -t /dev/disk4s4 --erase --noprompt
  
For partition-specific backups execute:
+
Eject the disk:
<pre>
+
diskutil eject /dev/disk4
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
 
</pre>
 
  
To perform a full drive restore (takes a long time, 18 hours in one case, but a sure thing from a whole disk), execute:
+
Place it back in the AppleTV and let it boot.
<pre>
 
dd if=appletv-full-disk.bin of=/dev/sdc bs=1024
 
</pre>
 
  
'''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 c
+
=Linux info=
5A8
 
an 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!
+
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!
  
 
<pre>
 
<pre>
Line 80: Line 138:
  
  
'''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)
+
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)
  
 
<pre>
 
<pre>
Line 91: Line 149:
 
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:
 
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:
 
<pre>
 
<pre>
mount -t hfsplus -o force /dev/sdc3 /mnt/applet
+
mount -t hfsplus -o force /dev/sdc3 /mnt/appletv
5A8
 
v
 
</pre>
 
 
 
==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.<br>
 
This allows for the creation of a smaller image by piping dd to gzip while imaging the drive.
 
 
 
<pre>
 
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
 
</pre>
 
 
 
'''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.
 
<pre>
 
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/
 
 
</pre>
 
</pre>
Maybe the same effect can be obtained using macintosh Disk Utility -> Erase -> Erase Free Space ... -> Zero Out Deleted Files
 
  
 
[[Category:How-to]]
 
[[Category:How-to]]
 +
[[Category:2.0]]
 +
[[Category:2.0.1]]
 +
[[Category:2.0.2]]
 +
[[Category:2.1]]
 +
[[Category:2.3]]

Latest revision as of 12:50, 27 July 2010

Assumptions

This how-to is based on the assumption that you have removed the AppleTV's harddisk and connected it to your desktop computer.

I also did my tests logged as root in order to have all necessary permissions...

Device name

It is assumed that the drive shows up as /dev/disk4. It could have another drive number on your Mac. It could read /dev/hdc or /dev/sdb or something similar on a Linux PC.

So be sure to replace the /dev/disk4 in the following code by the proper device name.

The partitions will also change from e.g. /dev/disk4s3 to something like /dev/sdc3 on Linux.

Device mount point

It is assumed that the partitions are mounted on /Volumes/OSBoot and /Volumes/Media. This will be different on a Linux PC. So again replace the mount point names with the proper ones.

Full drive backup

Full drive backup to a file

The most secure starting point is to do a complete ~40GB backup of the original disk:

umount /Volumes/Media/
dd if=/dev/disk4 of=appleTV.img bs=1024

The only good backup is the tested one:

dd if=appleTV.img of=/dev/disk4 bs=1024

Full drive backup with compression

The backup file will have the size of the disk. If you want to save space, you can compress it on the fly. Before doing so, you might want to fill the Media partition with zeroes. On a Mac:

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

Compress it with gzip (will take a couple of hours):

umount /Volumes/Media/
dd if=/dev/disk4 bs=1024 | gzip > appleTV.img.gz

Compress it more (will take about twice the time):

umount /Volumes/Media/
dd if=/dev/disk4 bs=1024 | bzip2 -9 > appleTV.img.bz2

Partitionwise backup (OS X)

This has only been tested on Mac OS X.

Phoem's fast method

Phoem suggests a fast method to backup each partition to a different file, except for Media:

dd if=/dev/disk4 of=partition.img bs=1024k count=100
dd if=/dev/disk4s1 of=EFI.img
dd if=/dev/disk4s2 of=os.img
dd if=/dev/disk4s3 of=OSBoot.img

The restoring process is similar:

dd if=partition.img of=/dev/disk4 bs=1024k count=100
dd if=EFI.img of=/dev/disk4s1
dd if=OS.img of=/dev/disk4s2 
dd if=OSBoot.img of=/dev/disk4s3 

Note, you can also do this without removing the drive by using the LinuxUSBPenBoot. --Bubba 18:50, 9 May 2008 (EDT)

OS X command line method

This method has been tested under Mac OS X Leopard and AppleTV_OS_2.1. It allows to

  • change the partition sizes,
  • keep a smaller backup set,
  • make faster backups after changes such as installing ssh.

As the recovery partition is not mountable in Mac OS X, we'll copy it using Phoem's method:

diskutil eject /dev/disk4
dd if=/dev/disk4s2 of=recovery.img

The next partitions in turn will be saved as Mac OS disk images:

hdiutil create -srcdevice /dev/disk4s3 osBoot.dmg
hdiutil create -srcdevice /dev/disk4s4 media.dmg
asr -imagescan osBoot.dmg
asr -imagescan media.dmg

After this, the drive can be cleared and repartitioned:

diskutil eject /dev/disk4
gpt show /dev/disk4
gpt destroy /dev/disk4
gpt create /dev/disk4
gpt add -i 1 -b 40 -s 409600 -t efi /dev/disk4
gpt add -i 2 -b 409640 -s 819152 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk4
gpt add -i 3 -b 1228792 -s 1843192 -t hfs /dev/disk4

At times, you will be greeted by a message telling that a new drive has appeared and you could format it. Click on ignore.

Some notes:

  • With Leopard I had to create a larger EFI partition than the original one because it growed and moved after I attempted to format and restore the HFS partitions.
  • The largest partition I was able to create for /dev/disk4s3 was 2097152 in size.
  • Leopard created a secondary GPT at the end of the disk.

Before adding the last partition, see how much place is left:

diskutil eject /dev/disk4
gpt show /dev/disk4

Then add the last partition (here for a 40GB drive):

gpt add -i 4 -b 3071984 -s 75170959 -t hfs /dev/disk4

Format the partitions:

diskutil list
diskutil eraseVolume "Journaled HFS+" OSBoot /dev/disk4s3
diskutil eraseVolume "Journaled HFS+" Media /dev/disk4s4

Restore the partitions:

dd if=recovery.img of=/dev/disk4s2
asr restore -s osBoot.dmg -t /dev/disk4s3 --erase --noprompt
asr restore -s media.dmg -t /dev/disk4s4 --erase --noprompt

Eject the disk:

diskutil eject /dev/disk4

Place it back in the AppleTV and let it boot.

Linux info

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


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