Difference between revisions of "Booting from a USB Thumbdrive"

From AwkwardTV
Jump to: navigation, search
m (reverting spammed page)
Line 1: Line 1:
[http://midwestman.50webs.com/view/www-modelle/ www modelle ur] [http://queenbabypie.freehostia.com/html/fair-attimo/ fair attimo] [http://offleeewild1.50webs.com/library/bellon/ bellon] [http://eaes7.freehostia.com/lib/alien-logic.htm alien logic] [http://vlano.50webs.com/styles/nokia-/ nokia 6670 gps] [http://eaes7.freehostia.com/lib/rex-frigo3.htm rex frigo rc 185] [http://vlano.50webs.com/styles/key-sat/ key sat team] [http://someoddgalaxy.freehostia.com/articles/villa-montes/ villa montes] [http://celare.freehostia.com/description/stm/ stm] [http://vlano.50webs.com/styles/asus-palmari/ asus palmari gsm] [http://superhank.freehostia.com/content/nolo-party/ nolo party san giorgio] [http://krasniioktyabr.50webs.com/hammerpurgstall-joseph/ hammerpurgstall joseph von] [http://njoka.freehostia.com/small/impedenza-amplificatori.htm impedenza amplificatori] [http://rathchavady.freehostia.com/description/breakdow/ breakdow] [http://someoddgalaxy.freehostia.com/articles/programma-mixa/ programma mixa cd] [http://ag666.50webs.com/view/mexxxico-com/ mexxxico com] [http://pticaja-ptica.freehostia.com/directory/finger-eleven.htm finger eleven] [http://runnyn.freehostia.com/library/milanesi-porno/ milanesi porno] [http://superhank.freehostia.com/content/konica-minolta100/ konica minolta accessori] [http://pticaja-ptica.freehostia.com/directory/suoneria-hit1.htm suoneria hit motorola] [http://commodore-guff.freehostia.com/styles/tik-tak.htm tik tak] [http://offleeewild1.50webs.com/library/mop-spinal/ mop spinal] [http://vlano.50webs.com/styles/volo-pioltello/ volo pioltello] [http://leshji.50webs.com/data/tutto-qua/ tutto qua] [http://someoddgalaxy.freehostia.com/articles/frasi-divertenti1/ frasi divertenti] [http://danikrv.50webs.com/small/blutooth-compact/ blutooth compact flash] [http://ag666.50webs.com/view/log-di/ log di aggirnamento] [http://heartlessfriend.freehostia.com/library/www-evirazione1/ www evirazione] [http://celare.freehostia.com/description/evviva-romagna/ evviva romagna] [http://midwestman.50webs.com/view/lancia-giornali/ lancia giornali] [http://celare.freehostia.com/description/compensato/ compensato] [http://krasniioktyabr.50webs.com/basilica-palladio/ basilica palladio] [http://deharte.angelfire.com/data/ls-/ ls 633 kodak] [http://ag666.50webs.com/view/porno-americano/ porno americano] [http://queenbabypie.freehostia.com/html/cuoco-chef/ cuoco chef] [http://vlano.50webs.com/styles/natalie-wood/ natalie wood] [http://blind9justice.50webs.com/il-volo/ il volo del calabrone] [http://pticaja-ptica.freehostia.com/directory/crezi.htm crezi] [http://ag666.50webs.com/view/choppy-maxi/ choppy maxi ariete] [http://krasniioktyabr.50webs.com/decapitazione-/ decapitazione 21 settembre] [http://blind9justice.50webs.com/volo-aereo/ volo aereo maceio] [http://heartlessfriend.freehostia.com/library/il-giardino25/ il giardino segreto del signor lopez] [http://midwestman.50webs.com/view/dts-standard/ dts standard sui nuovi supporti di registrazione] [http://pticaja-ptica.freehostia.com/directory/clk-7.htm clk 200 tps] [http://vlano.50webs.com/styles/hp-ipaq/ hp ipaq hw 6515 messenger] [http://blind9justice.50webs.com/vendita-computer/ vendita computer usato] [http://krasniioktyabr.50webs.com/iso/ iso] [http://queenbabypie.freehostia.com/html/shiseido-profumi/ shiseido profumi] [http://midwestman.50webs.com/view/auto-noleggio/ auto noleggio san gimignano] [http://heartlessfriend.freehostia.com/library/un-sito9/ un sito per gli animali acquatici] [http://heartlessfriend.freehostia.com/library/pistol-grip/ pistol grip live at the glasshouse] [http://eaes7.freehostia.com/library/il-processo10.htm il processo di verona] [http://midwestman.50webs.com/view/na-sere/ na sere e maggio] [http://rathchavady.freehostia.com/description/mary-j/ mary j blige when we] [http://ag666.50webs.com/view/mercedes-cls/ mercedes cls] [http://stbillin.angelfire.com/web/gigione-midi.htm gigione midi] [http://ag666.50webs.com/view/awt/ awt 9120] [http://njoka.freehostia.com/small/unopiu.htm unopiu] [http://keokepa.50webs.com/library/master-globe/ master globe s] [http://ag666.50webs.com/view/donne-in/ donne in hotel] [http://keokepa.50webs.com/library/test-quoziente/ test quoziente intellettivo] [http://midwestman.50webs.com/view/seychelles/ seychelles] [http://pothomse.angelfire.com/guerra-giovanni/ guerra giovanni] [http://celare.freehostia.com/description/erbolario-shampoo1/ erbolario shampoo olio] [http://eaes7.freehostia.com/library/irak-hostage.htm irak hostage murder] [http://eaes7.freehostia.com/lib/ex-legge.htm ex legge 219 oggi legge 32 1992] [http://ag666.50webs.com/view/nomi-di/ nomi di uomo] [http://superhank.freehostia.com/content/mature-gratis/ mature gratis] [http://eaes7.freehostia.com/lib/adventure-sonic.htm adventure sonic] [http://queenbabypie.freehostia.com/html/dolce-gabbana71/ dolce gabbana orologi] [http://ag666.50webs.com/view/assistenza-brescia/ assistenza brescia] [http://anubis8.50webs.com/library/marley-jungle/ marley jungle] [http://danikrv.50webs.com/small/testo-della/ testo della canzone dei blue a chi mi di] [http://queenbabypie.freehostia.com/html/enrique-iglesais/ enrique iglesais] [http://anubis8.50webs.com/library/trendnet-/ trendnet 802 11g] [http://superhank.freehostia.com/content/profumi-e1/ profumi e balocchi] [http://smfarrowik.angelfire.com/small/legnano-ciclismo/ legnano ciclismo] [http://celare.freehostia.com/description/assicurazione-pinerolo/ assicurazione pinerolo] [http://anubis8.50webs.com/library/semprom/ semprom 3000] [http://anubis8.50webs.com/library/roma-bene/ roma bene] [http://queenbabypie.freehostia.com/html/cura-del/ cura del tempo] [http://eaes7.freehostia.com/library/victor-victoria.htm victor victoria] [http://eaes7.freehostia.com/library/dfdf.htm dfdf] [http://pticaja-ptica.freehostia.com/directory/forio.htm forio] [http://danikrv.50webs.com/small/piccola-e/ piccola e fragile] [http://runnyn.freehostia.com/library/mattoni/ mattoni] [http://ag666.50webs.com/view/lucy-cabrera/ lucy cabrera] [http://runnyn.freehostia.com/library/ciofu/ ciofu] [http://alfrizie.angelfire.com/content/canon-lbp1.htm canon lbp a3] [http://queenbabypie.freehostia.com/html/lcd39/ lcd 2] [http://someoddgalaxy.freehostia.com/articles/simon-paul/ simon paul youre the one] [http://pticaja-ptica.freehostia.com/directory/deanna-brooks.htm deanna brooks] [http://someoddgalaxy.freehostia.com/articles/john-richmond10/ john richmond] [http://midwestman.50webs.com/view/aerio/ aerio] [http://offleeewild1.50webs.com/library/guerlain-profumi/ guerlain profumi pour homme] [http://anubis8.50webs.com/library/giornali-tedeschi/ giornali tedeschi] [http://blind9justice.50webs.com/datawrite-/ datawrite 400 cd] [http://blind9justice.50webs.com/chieti-calcio/ chieti calcio] [http://runnyn.freehostia.com/library/tema-svolto33/ tema svolto giovane] [http://pticaja-ptica.freehostia.com/directory/girotondo-giro.htm girotondo giro intorno al mondo] [http://celare.freehostia.com/description/miele-lavastoviglie/ miele lavastoviglie incasso nero] [http://anubis8.50webs.com/library/ordine-avvocati/ ordine avvocati imperia] [http://someoddgalaxy.freehostia.com/articles/bragi-boddason/ bragi boddason] [http://midwestman.50webs.com/view/temi-svolti/ temi svolti it] [http://eaes7.freehostia.com/lib/lustbader-libri.htm lustbader libri] [http://ag666.50webs.com/view/lg-lp/ lg l1920p] [http://danikrv.50webs.com/small/double-booble/ double booble] [http://queenbabypie.freehostia.com/html/camera-legnago/ camera legnago] [http://offleeewild1.50webs.com/library/blue-breath/ blue breath easy mp3] [http://runnyn.freehostia.com/library/palma-de7/ palma de maiorca] [http://krasniioktyabr.50webs.com/don-camillo/ don camillo monsignore ma non troppo] [http://njoka.freehostia.com/small/beethoven-s.htm beethoven s 5th symphony] [http://leshji.50webs.com/data/biglietto-augurio/ biglietto augurio 18 anno] [http://commodore-guff.freehostia.com/styles/inglesina-carrozzine.htm inglesina carrozzine] [http://ag666.50webs.com/view/la-gatta/ la gatta sul tetto giorgia] [http://ag666.50webs.com/view/gallette-riso/ gallette riso cioccolato] [http://eaes7.freehostia.com/library/time-goes.htm time goes by] [http://commodore-guff.freehostia.com/styles/michelle-vieth21.htm michelle vieth videos porno] [http://njoka.freehostia.com/small/corrente-continua.htm corrente continua] [http://krasniioktyabr.50webs.com/fax-ppf/ fax ppf 585] [http://leshji.50webs.com/data/ergo/ ergo 365] [http://heartlessfriend.freehostia.com/library/hotel-artemis/ hotel artemis] [http://pticaja-ptica.freehostia.com/directory/manga-eros.htm manga eros gratis] [http://runnyn.freehostia.com/library/elementi-di/ elementi di economia aziendale] [http://someoddgalaxy.freehostia.com/articles/wolfgang-amadeus10/ wolfgang amadeus mozart il flauto magico] [http://blind9justice.50webs.com/tiempo-y/ tiempo y silencio] [http://anubis8.50webs.com/library/pod/ pod 2 0] [http://wosligersy.angelfire.com/cantv-com/ cantv com] [http://deharte.angelfire.com/data/forno-combinato/ forno combinato da incasso] [http://keokepa.50webs.com/library/phantom-planet/ phantom planet big brat] [http://nejoaus.angelfire.com/riccioli-ebrei.htm riccioli ebrei] [http://rathchavady.freehostia.com/description/graetz/ graetz 2710] [http://krasniioktyabr.50webs.com/scx-samsung/ scx4100 samsung] [http://blind9justice.50webs.com/bijelo-dugme/ bijelo dugme] [http://heartlessfriend.freehostia.com/library/hostess-modelle/ hostess modelle] [http://queenbabypie.freehostia.com/html/higiene-y/ higiene y control de calidad del pescado] [http://keokepa.50webs.com/library/programma-per/ programma per nokia 6630] [http://runnyn.freehostia.com/library/esecuzione-quattrocchi/ esecuzione quattrocchi video] [http://njoka.freehostia.com/small/www-cinemeccanica.htm www cinemeccanica it] [http://queenbabypie.freehostia.com/html/un-solo/ un solo grande amore] [http://runnyn.freehostia.com/library/chirurgia-plastica/ chirurgia plastica] [http://pticaja-ptica.freehostia.com/directory/celebrita-senza2.htm celebrita senza slip] [http://vlano.50webs.com/styles/nicola/ nicola] [http://maheinze.angelfire.com/chiappe.htm chiappe] [http://someoddgalaxy.freehostia.com/articles/il-traditore1/ il traditore] [http://rathchavady.freehostia.com/description/meridijan-kladionica/ meridijan kladionica] [http://ag666.50webs.com/view/baesecke-georg/ baesecke georg] [http://queenbabypie.freehostia.com/html/bicicletta/ bicicletta 22] [http://midwestman.50webs.com/view/santa-ana/ santa ana (dipartimento di el] [http://raguerla.angelfire.com/articles/modena-hotel/ modena hotel] [http://celare.freehostia.com/description/classifica-eserciti/ classifica eserciti warhammer] [http://runnyn.freehostia.com/library/nikkor-mm8/ nikkor 50mm f 1 8 nikon ai] [http://keokepa.50webs.com/library/ivete-sangalo/ ivete sangalo poeira] [http://rathchavady.freehostia.com/description/festivalbar-blue/ festivalbar blue 2002] [http://wosligersy.angelfire.com/www-federica/ www federica] [http://someoddgalaxy.freehostia.com/articles/linarite/ linarite] [http://someoddgalaxy.freehostia.com/articles/gei/ gei] [http://rathchavady.freehostia.com/description/dalcin/ dalcin] [http://stbillin.angelfire.com/web/guida-apertura.htm guida apertura conto corrente] [http://pothomse.angelfire.com/avent-scaldabiberon/ avent scaldabiberon] [http://stbillin.angelfire.com/web/sony-dcrpc.htm sony dcrpc 1000] [http://danikrv.50webs.com/small/pirates-of/ pirates of caribbean] [http://queenbabypie.freehostia.com/html/wolkswagen-touareg/ wolkswagen touareg] [http://danikrv.50webs.com/small/sweet-years/ sweet years tshirt uomo] [http://pticaja-ptica.freehostia.com/directory/dvd-dikom.htm dvd dikom lettori e divx] [http://superhank.freehostia.com/content/nec-e45/ nec e616 auricolare] [http://runnyn.freehostia.com/library/nad-c8/ nad c162] [http://blind9justice.50webs.com/episodi-orange/ episodi orange county] [http://offleeewild1.50webs.com/library/extra-da/ extra da un altro mondo] [http://someoddgalaxy.freehostia.com/articles/japan-gay/ japan gay] [http://leshji.50webs.com/data/vecchia-roma/ vecchia roma claudio villa] [http://runnyn.freehostia.com/library/caledonie/ caledonie] [http://queenbabypie.freehostia.com/html/sash/ sash] [http://offleeewild1.50webs.com/library/sisqo/ sisqo] [http://blind9justice.50webs.com/vacanza-mare/ vacanza mare italia] [http://njoka.freehostia.com/small/masterizzatore-dvd108.htm masterizzatore dvd esterno firewire] [http://eaes7.freehostia.com/lib/temi-di10.htm temi di italiano 3 media] [http://krasniioktyabr.50webs.com/maraya/ maraya] [http://pothomse.angelfire.com/ceretta/ ceretta] [http://danikrv.50webs.com/small/audizioni-provini/ audizioni provini] [http://leshji.50webs.com/data/volvo-s/ volvo s80] [http://blind9justice.50webs.com/rally/ rally 1 8] [http://ag666.50webs.com/view/hp-deskjet/ hp deskjet 9300 cartucce] [http://pticaja-ptica.freehostia.com/directory/vidoe-sexo.htm vidoe sexo gratis] [http://someoddgalaxy.freehostia.com/articles/canon-dig/ canon dig ixus 50] [http://njoka.freehostia.com/small/atlantis-adventure.htm atlantis adventure] [http://heartlessfriend.freehostia.com/library/piccola-ladra/ piccola ladra] [http://ag666.50webs.com/view/home-pioneer/ home pioneer dcs323] [http://eaes7.freehostia.com/library/hp228.htm hp 2312] [http://keokepa.50webs.com/library/olivetti-jp/ olivetti jp 190] [http://keokepa.50webs.com/library/turion/ turion 64] [http://celare.freehostia.com/description/famiglia-coniglio/ famiglia coniglio castiglione sicilia] [http://midwestman.50webs.com/view/jpegfree-com/ jpeg4free com] [http://eaes7.freehostia.com/library/dani-venezia.htm dani venezia david] [http://blind9justice.50webs.com/lcd-dvd/ lcd dvd] [http://krasniioktyabr.50webs.com/james-naismith/ james naismith] [http://offleeewild1.50webs.com/library/senza-dubbio/ senza dubbio] [http://krasniioktyabr.50webs.com/titi/ titi] [http://commodore-guff.freehostia.com/styles/virgilio-traduzione.htm virgilio traduzione georgica iv] [http://eaes7.freehostia.com/library/ool-fr.htm ool fr] {{Template:Banner}}

Revision as of 18:33, 22 September 2007


Not Patchstick

This page is not about Patchstick. I repeat: this page is not about Patchstick. This page just goes into detail about the layout of the partitioning table of a possible USB thumbdrive, which might be used for building something like Patchstick.

The image linked in this article is an empty image. No files. Really.

You have been warned.

A bit of info on how the boot process works

Background reading:

If the system is booted with the "Menu" and "Minus" keys on the remote held down, it checks for a FAT32 or HFS partition with a Partition Type of {5265636F-7665-11AA-AA11-00306543ECAC}, first on a USB storage device, then on the internal HDD. If such a partition is found, it's mounted and a file called "boot.efi" is read from the root folder and executed.

A bit of info about the image

It's simple enough to create a GPT on a USB thumbdrive with the required attributes. I used GNU Parted on Linux, and I'm sure equivalent tools exist for Mac and Windows. The tricky part is making the image in such a way that it'll boot in the AppleTV and be easy to deal with if you don't have a Mac handy. The latter requirement basically rules out HFS/HFS , since Linux support is spotty and Windows support is non-existant, so I chose to use FAT32.

Windows has had some level of support for GPT disks for some time now, but it uses the Partition Type indicator to determine the type of the filesystem. Since we have to set this to the value for a recovery partition, Windows will refuse to recognize the partition as FAT32, although Linux will happily mount it anyways.

My first thought was to get rid of the "Protective MBR" partition table that GPT uses to hide itself from older partitioning tools and replace it with a valid MBR partition table that points to the FAT32 partition. Thus, the drive would have two partition tables, each pointing to the same partition. With this in place, the thumbdrive was mountable both in Linux and Windows, but the AppleTV apparently checks for the 0xEE partition in the MBR before trying to use the GPT.

In the end, I was able to create a MBR that contains the 0xEE partition required to get the AppleTV to load the GPT, but instead of setting the protective partition to fill the disk, I made it very small, then added a second partition in the MBR's remaining space that points to the FAT32 partition. Now, it's visible to Windows (MBR table), Linux (either table), and the AppleTV (GPT). You should be able to plug a thumbdrive initialized with this image into any Windows box (I've only tested with Vista Ultimate 64-bit) and copy over the necessary files from the AppleTV recovery partition (boot.efi, com.apple.Boot.plist, BootLogo.png, and mach_kernel.prelink). After that, you can plug the thumbdrive into the AppleTV and reboot it while holding down "Menu" and "Minus" on the remote to boot from the thumbdrive.

Note that as is, the recovery partition image won't boot completely from USB, since the kernel basically cuts its own head off when it disables USB.

The image itself (sized for 256MB Flash)

The original image was posted as a base-64 text chunk within this page, it is now mirrored below. The complete image is only about 6K compressed. All you need to do is decompress the image, then write it to a storage device of your choice.

Note: This is a raw disk image, and will expand to 257,949,696 bytes. Your storage device will have to meet this minimum requirement to use this particular image.

Writing the Image

Mac OS X and other *NIX or *NIX like Operating Systems

You must have a Memory stick larger than 512MB of free post formated space for this to work.

Insert your storage device / thumb-drive / USB stick but don't mount it. If your OS automounts the image (like OS X does) you'll need to unmount before you write to it.

$ mount
/dev/disk1s1 on /Volumes/UNTITLED (local, nodev, nosuid) <-- mounted partition on the thumb drive.  /dev/disk1 would be the thumbdrive itself.  See note below!

Unmount (as root) For those using OS X gui, find NetInfo Manager in the Utilities folder, click "Security" at the top menu, then "Authenticate." A dialogue box will pop up which asks for the administrator's short name and password. Notice the command for un-mounting is UMOUNT with no 'n' after the 'U.' This is the command, not a typo. Unmount with:-

 # umount /Volumes/UNTITLED 

then use dd to write the image to the storage device (change /dev/disk1 to be the device that corresponds to your OS and device).

 $ dd if=Hybrid.img of=/dev/disk1 bs=1m

Important Note: You want to write to the device that correponds to the entire thumbdrive - not one of its partitions. If you write the image to an existing partition, the all-important partition tables won't be written properly. On Mac OS / Darwin, this will be something like /dev/diskX rather than dev/diskXs1. On Linux, the device will probably be /dev/sdX for a USB device. (Note that SATA hard drives will probably also appear as /dev/sdX - use fdisk -l /dev/sdX to make sure you have the right device before writing to it!)

If your storage device has a pretty LED you'll see some activity, once finished you'll see something like:

503808 0 records in
503808 0 records out
257949696 bytes transferred in 439.220493 secs (587290 bytes/sec)

The drive will more than likely mount once the above process is complete - unmount it and proceed with your install on the Apple TV.


Download dd for Windows and follow the steps above for writing the image. You don't need to worry about the unmounting part. Windows device identifiers are quite different from BSD / Linux identifiers, so look at the examples on the linked page for how to write to a USB Mass Storage device.

With dd.exe and the Hybrid.img file in the same folder type the following command to find out the name of your USB drive.

dd --list

You should see a bunch of output similiar to:

 link to \\?\Device\HarddiskVolume1
 fixed media
 Mounted on \\.\c:

 link to \\?\Device\CdRom0 CD-ROM
 Mounted on \\.\r:
 link to \\?\Device\Harddisk1\DP(1)0-0 3 removable media
 Mounted on \\.\d:

We are interested in the device mounted to where your USB drive is (d: in this case).

We then do:

dd if=Hybrid.img of=\\?\Device\Harddisk1\Partition0 bs=1M --size --progress

The important part is writing to the Partition0 part of the drive.

You could also just download a Linux LiveCD.

Download the image (Mirrors)

Here - dobedobedoh

Here - anourkey

Here - Galphanet (Swiss server)

Here (choose right click, save as) - MrZarquon

Here (choose right Click Save As), please be gentle on this server, use as a last resort!

MD5: a00685206de5cf5a313ec62594d2ff9e Hybrid.img.bz2 (compressed)

MD5: 1533fdfb2503851a545cf1955c2daea6 Hybrid.img (uncompressed)