Difference between revisions of "Booting from a USB Thumbdrive"

From AwkwardTV
Jump to: navigation, search
m
m (spam booted)
Line 1: Line 1:
[http://blueeyedgirl.ifrance.com/content/view/bottle/ bottle] [http://luna-breze.ifrance.com/web/dior-eclat/ dior eclat satin] [http://imperfection425.ifrance.com/img/styles/display/ display 3330] [http://oddchickie.ifrance.com/topic/keyboard-palm/ keyboard palm] [http://jedi2287.ifrance.com/content/view/bpu.htm bpu] [http://jedi2287.ifrance.com/content/view/router-adsl.htm router adsl wireless rj11] [http://dekabrskiil.ifrance.com/topic/k-amaro/ k amaro femme like u] [http://blog-ench.ifrance.com/view/new/lg-ls.htm lg l1930s] [http://lilypadcmk.ifrance.com/data/tefal-minute.htm tefal minute] [http://fatfeministi.ifrance.com/web/air-technology.htm air technology 2ii] [http://blog-ench.ifrance.com/view/new/webcam.htm webcam 640 480] [http://fatfeministi.ifrance.com/web/dyland.htm dyland] [http://imperfection425.ifrance.com/img/styles/cimitero-vivente/ cimitero vivente] [http://just15more.ifrance.com/web/pitcairn.htm pitcairn] [http://lilypadcmk.ifrance.com/data/riassunto-nono.htm riassunto nono capitolo promessi sposi] [http://lantanoch.ifrance.com/lib/guta-baiat.htm guta baiat de baiat] [http://noson.ifrance.com/lib/bugo/ bugo] [http://oddchickie.ifrance.com/topic/mp-iaudio/ mp3 i-audio] [http://blog-ench.ifrance.com/view/new/online-game.htm online game] [http://dekabrskiil.ifrance.com/topic/xvid-ps/ xvid ps2] [http://oddchickie.ifrance.com/topic/logo/ logo] [http://lilypadcmk.ifrance.com/data/traduzione-testi.htm traduzione testi e canzoni inglesi] [http://just15more.ifrance.com/web/fax-con.htm fax con telefono] [http://just15more.ifrance.com/web/ospedali-di.htm ospedali di ancona] [http://cleel927.ifrance.com/lib/cd-cover/ cd cover archive] [http://noson.ifrance.com/lib/l-uomo/ l uomo che sussurava hai cavalli] [http://demonessphoenix.ifrance.com/web/vendita-camper.htm vendita camper] [http://noson.ifrance.com/lib/hotel-/ hotel 3 stelle granada] [http://oddchickie.ifrance.com/topic/giardinaggio-passiflora/ giardinaggio passiflora] [http://oddchickie.ifrance.com/topic/kates/ kates] [http://jedi2287.ifrance.com/content/view/berlingo-d.htm berlingo d] [http://lantanoch.ifrance.com/lib/sony-cineprese.htm sony cineprese] [http://potterlover456.ifrance.com/web/lao-fiume/ lao (fiume)] [http://noson.ifrance.com/lib/albergo-/ albergo 3 stelle nizza] [http://blueeyedgirl.ifrance.com/content/view/forni-incasso/ forni incasso da 90] [http://ouglova.ifrance.com/topic/canzone-vasco/ canzone vasco rossi] [http://oddchickie.ifrance.com/topic/snurken/ snurken] [http://lilypadcmk.ifrance.com/data/www-astra.htm www astra ro] [http://ouglova.ifrance.com/topic/dada-porta/ dada porta in italia ragnarok online] [http://limey-flavored.ifrance.com/web/viaggiatore.htm viaggiatore] [http://limey-flavored.ifrance.com/web/hdd-sata.htm hdd sata 120] [http://just15more.ifrance.com/web/trucchi-per.htm trucchi per gran turismo a spec] [http://ouglova.ifrance.com/topic/kawasaki-verona/ kawasaki verona] [http://potterlover456.ifrance.com/web/jojo/ jojo] [http://blog-ench.ifrance.com/view/new/saremo-felici.htm saremo felici] [http://cleel927.ifrance.com/lib/lichen/ lichen] [http://blog-ench.ifrance.com/view/new/ram-.htm ram 256 184-pin ddr 400 pc3200] [http://photontorpedo.ifrance.com/data/dj-sammy.htm dj sammy feat do] [http://photontorpedo.ifrance.com/data/toner-laserjet.htm toner laserjet 1015] [http://jedi2287.ifrance.com/content/view/loudness.htm loudness] [http://just15more.ifrance.com/web/casting-grande.htm casting grande fratello] [http://potterlover456.ifrance.com/web/song-song/ song song blue live] [http://luna-breze.ifrance.com/web/roma-luxor/ roma luxor biglietti aerei] [http://cleel927.ifrance.com/lib/mia-la/ mia la hii listen] [http://ouglova.ifrance.com/topic/battaglia-navale/ battaglia navale di navi] [http://lantanoch.ifrance.com/lib/bob-dylan.htm bob dylan greatest hits] [http://ouglova.ifrance.com/topic/www-horoscopos/ www horoscopos com] [http://imperfection425.ifrance.com/img/styles/aliens-versus/ aliens versus predator 2] [http://lantanoch.ifrance.com/lib/rs-mmc.htm rs mmc card telefonia] [http://rowanashe.ifrance.com/resources/articles/fiat-stilo.htm fiat stilo abarth] [http://blueeyedgirl.ifrance.com/content/view/ht-wp/ ht wp30] [http://ouglova.ifrance.com/topic/viticoltura/ viticoltura] [http://dekabrskiil.ifrance.com/topic/netgear-usb/ netgear usb adapter] [http://jedi2287.ifrance.com/content/view/veramente-molto.htm veramente molto bello] [http://lilypadcmk.ifrance.com/data/aritmetica.htm aritmetica] [http://just15more.ifrance.com/web/vivir-sin.htm vivir sin] [http://luna-breze.ifrance.com/web/hobby-carta/ hobby carta] [http://photontorpedo.ifrance.com/data/immagini-stilizzate.htm immagini stilizzate] [http://natalienewst.ifrance.com/view/new/fi-c/ fi 4530c] [http://cleel927.ifrance.com/lib/viewsonic-ve/ viewsonic ve910] [http://fatfeministi.ifrance.com/web/codec-windows.htm codec windows media player] [http://ouglova.ifrance.com/topic/samsung-mph/ samsung mp0804h - 80 gb] [http://rowanashe.ifrance.com/resources/articles/elisee.htm elisee] [http://ouglova.ifrance.com/topic/bosc/ bosc] [http://potterlover456.ifrance.com/web/mirko-bb/ mirko bb] [http://oddchickie.ifrance.com/topic/charlie-hunnam/ charlie hunnam] [http://ouglova.ifrance.com/topic/lesbo-kiss/ lesbo kiss] [http://dekabrskiil.ifrance.com/topic/amstrad-tft/ amstrad tft lcd monitor tv] [http://fatfeministi.ifrance.com/web/disegna-facce.htm disegna facce] [http://dekabrskiil.ifrance.com/topic/decreto-ministeriale/ decreto ministeriale 12 07 2000] [http://ouglova.ifrance.com/topic/samsung-/ samsung 19 v] [http://demonessphoenix.ifrance.com/web/escort-svizzera.htm escort svizzera] [http://natalienewst.ifrance.com/view/new/pc-e/ pc 1000e] [http://dekabrskiil.ifrance.com/topic/monitor-philips/ monitor philips 170b6cs 17] [http://natalienewst.ifrance.com/view/new/copertina-cd/ copertina cd veline] [http://lilypadcmk.ifrance.com/data/muzik.htm muzik] [http://dekabrskiil.ifrance.com/topic/jovanotto/ jovanotto] [http://demonessphoenix.ifrance.com/web/scatole-di.htm scatole di plastica] [http://oddchickie.ifrance.com/topic/the-servant/ the servant testo orchestra] [http://luna-breze.ifrance.com/web/nikon-af/ nikon af 70-300 4-5 6 d] [http://limey-flavored.ifrance.com/web/signos.htm signos] [http://fatfeministi.ifrance.com/web/comicsex.htm comicsex] [http://jedi2287.ifrance.com/content/view/incontro-perugia.htm incontro perugia] [http://oddchickie.ifrance.com/topic/www-tuffi/ www tuffi it] [http://imperfection425.ifrance.com/img/styles/incontrare-gesu/ incontrare gesu] [http://lilypadcmk.ifrance.com/data/la-notte.htm la notte antonioni] [http://potterlover456.ifrance.com/web/firenze-s/ firenze s maria novella] [http://limey-flavored.ifrance.com/web/consolate-il.htm consolate il mio popolo] [http://fatfeministi.ifrance.com/web/ancient-empires.htm ancient empires] [http://jedi2287.ifrance.com/content/view/sesso-con.htm sesso con cugine] [http://just15more.ifrance.com/web/alexandra-diamond.htm alexandra diamond] [http://demonessphoenix.ifrance.com/web/kobetai.htm kobetai] [http://limey-flavored.ifrance.com/web/intel-p.htm intel p4 3 0] [http://just15more.ifrance.com/web/flex-on.htm flex on line] [http://potterlover456.ifrance.com/web/champagne-dom/ champagne dom perignon 1996] [http://cleel927.ifrance.com/lib/cavi-segnale/ cavi segnale bilanciati] [http://imperfection425.ifrance.com/img/styles/okipage-im/ okipage 8im] [http://limey-flavored.ifrance.com/web/lagente-speciale.htm lagente speciale mackintosh] [http://blueeyedgirl.ifrance.com/content/view/giacomo-puccini/ giacomo puccini. tosca] [http://oddchickie.ifrance.com/topic/agriturismo-abruzzo/ agriturismo abruzzo] [http://blog-ench.ifrance.com/view/new/hot-couple.htm hot couple] [http://dekabrskiil.ifrance.com/topic/micenei/ micenei] [http://limey-flavored.ifrance.com/web/oreja-de.htm oreja de van] [http://photontorpedo.ifrance.com/data/pioneer-hdj.htm pioneer hdj 1000] [http://imperfection425.ifrance.com/img/styles/rigoletto-e/ rigoletto e la sua tragedia] [http://fatfeministi.ifrance.com/web/mandy-moore.htm mandy moore cry] [http://noson.ifrance.com/lib/shall-we/ shall we dance soundtrack] [http://limey-flavored.ifrance.com/web/tv.htm tv 28 16 9] [http://ouglova.ifrance.com/topic/if-american/ if american hi fi] [http://blog-ench.ifrance.com/view/new/pirelli-re.htm pirelli re] [http://dekabrskiil.ifrance.com/topic/turn-me/ turn me on kevin lyttle] [http://dekabrskiil.ifrance.com/topic/logitech-quickcam/ logitech quickcam communicate stx] [http://ouglova.ifrance.com/topic/juliana-paes/ juliana paes nua na playboy] [http://lilypadcmk.ifrance.com/data/feltrinelli-international.htm feltrinelli international] [http://imperfection425.ifrance.com/img/styles/nuova-xbox/ nuova xbox] [http://blueeyedgirl.ifrance.com/content/view/the-big/ the big brother and the holding co. with janis joplin. nine hundred nights] [http://potterlover456.ifrance.com/web/relatos-de/ relatos de sexo] [http://blog-ench.ifrance.com/view/new/dissipatore-per.htm dissipatore per ram] [http://imperfection425.ifrance.com/img/styles/annunciato-il/ annunciato il nuovo wenders] [http://demonessphoenix.ifrance.com/web/bermude-antes.htm bermude antes] [http://dekabrskiil.ifrance.com/topic/video-player/ video player] [http://just15more.ifrance.com/web/la-cripta.htm la cripta papi chulo] [http://limey-flavored.ifrance.com/web/prenotazione-cinema.htm prenotazione cinema milano] [http://blog-ench.ifrance.com/view/new/thomson-plasma.htm thomson plasma] [http://natalienewst.ifrance.com/view/new/i-collage/ i collage] [http://oddchickie.ifrance.com/topic/comune-di/ comune di potenza risultati elezioni] [http://lilypadcmk.ifrance.com/data/tarjetas-com.htm tarjetas com] [http://potterlover456.ifrance.com/web/itrip/ itrip] [http://cleel927.ifrance.com/lib/flexible/ flexible] [http://cleel927.ifrance.com/lib/lexmark/ lexmark 615] [http://lilypadcmk.ifrance.com/data/rem.htm rem] [http://natalienewst.ifrance.com/view/new/palace-hotel/ palace hotel palermo] [http://rowanashe.ifrance.com/resources/articles/haert.htm haert] [http://fatfeministi.ifrance.com/web/mimouni-rachid.htm mimouni, rachid] [http://oddchickie.ifrance.com/topic/batteria-imate/ batteria i-mate pda2k] [http://luna-breze.ifrance.com/web/scug/ scug] [http://jedi2287.ifrance.com/content/view/la-neuvaine.htm la neuvaine] [http://photontorpedo.ifrance.com/data/aspirapolveri-con.htm aspirapolveri con bidone] [http://luna-breze.ifrance.com/web/stanos/ stanos] [http://rowanashe.ifrance.com/resources/articles/cd-beethoven.htm cd beethoven 9 sinfonia] [http://luna-breze.ifrance.com/web/quanti-amori/ quanti amori gigi d alessio] [http://jedi2287.ifrance.com/content/view/sito-ufficiale.htm sito ufficiale giorgia] [http://natalienewst.ifrance.com/view/new/www-nipple/ www nipple com] [http://noson.ifrance.com/lib/luca-laurenti/ luca laurenti] [http://limey-flavored.ifrance.com/web/sanfedisti.htm sanfedisti] [http://rowanashe.ifrance.com/resources/articles/amd-athlon.htm amd athlon xp barton] [http://potterlover456.ifrance.com/web/videotelefono-cellulari/ videotelefono cellulari] [http://imperfection425.ifrance.com/img/styles/fifa-/ fifa 2006 calcio] [http://lantanoch.ifrance.com/lib/sex-vree.htm sex vree live and watch] [http://potterlover456.ifrance.com/web/frere-severina/ frere severina] [http://just15more.ifrance.com/web/emporio-armani.htm emporio armani accessori donna] [http://just15more.ifrance.com/web/tvc-lcd.htm tvc lcd panasonic] [http://jedi2287.ifrance.com/content/view/cuffie-panasonic.htm cuffie panasonic] [http://noson.ifrance.com/lib/impastatrici-pane/ impastatrici pane] [http://noson.ifrance.com/lib/la-c/ la c2] [http://ouglova.ifrance.com/topic/run-baby/ run baby run] [http://cleel927.ifrance.com/lib/disperato-addio/ disperato addio] [http://dekabrskiil.ifrance.com/topic/tavolo-stiga/ tavolo stiga] [http://just15more.ifrance.com/web/decoder-tv.htm decoder tv digitale terrestre pci] [http://luna-breze.ifrance.com/web/televisori-lcd/ televisori lcd lg l173st] [http://oddchickie.ifrance.com/topic/inno-inter/ inno inter] [http://cleel927.ifrance.com/lib/fotocamere-digitali/ fotocamere digitali konica z3] [http://potterlover456.ifrance.com/web/toyota-it/ toyota it] [http://cleel927.ifrance.com/lib/mercedes-c/ mercedes c 220 station wagon] [http://jedi2287.ifrance.com/content/view/calciomercato-della.htm calciomercato della roma] [http://imperfection425.ifrance.com/img/styles/fuga-senza/ fuga senza scampo] [http://dekabrskiil.ifrance.com/topic/corretta-alimentazione/ corretta alimentazione] [http://limey-flavored.ifrance.com/web/hard-disk.htm hard disk maxtor 120gb] [http://oddchickie.ifrance.com/topic/plasma-lg/ plasma lg 42px3rv] [http://jedi2287.ifrance.com/content/view/alfa-gtv.htm alfa gtv 1998] [http://limey-flavored.ifrance.com/web/holly-willoughby.htm holly willoughby breast] [http://jedi2287.ifrance.com/content/view/champagne-magnum.htm champagne magnum] [http://cleel927.ifrance.com/lib/my-baby/ my baby shot me down] [http://ouglova.ifrance.com/topic/reconciliation/ reconciliation] [http://photontorpedo.ifrance.com/data/tell-him.htm tell him vonda] [http://blueeyedgirl.ifrance.com/content/view/porsche-boxster/ porsche boxster 3.2 s] [http://fatfeministi.ifrance.com/web/kareen-antonn.htm kareen antonn] [http://ouglova.ifrance.com/topic/duele-elamor/ duele elamor] [http://lilypadcmk.ifrance.com/data/mrs-santa.htm mrs. santa claus] [http://fatfeministi.ifrance.com/web/puddle-of.htm puddle of mudd] [http://ouglova.ifrance.com/topic/bandi-di/ bandi di gara potature alberi] [http://oddchickie.ifrance.com/topic/software-per/ software per calcolo climatizzatori] [http://luna-breze.ifrance.com/web/lubrificante-profilattico/ lubrificante profilattico] [http://rowanashe.ifrance.com/resources/articles/hinh-sex.htm hinh sex nguyen hong nhung] [http://natalienewst.ifrance.com/view/new/titan-calzature/ titan calzature uomo] [http://potterlover456.ifrance.com/web/le-foto/ le foto di lauri dei the rasmus] [http://natalienewst.ifrance.com/view/new/sei-forte/ sei forte pap] [http://oddchickie.ifrance.com/topic/piscina-sciorba/ piscina sciorba genova] [http://limey-flavored.ifrance.com/web/trucchi-per.htm trucchi per ps2] [http://jedi2287.ifrance.com/content/view/my-cousin.htm my cousin vinny] {{Template:Banner}}
+
{{Template:Banner}}
  
  

Revision as of 14:18, 5 September 2007

<Google>WIKI</Google>


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.

Windows

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:


\\.\Volume{5cd94d2c-3251-11d9-9444-806d6172696f}\
 link to \\?\Device\HarddiskVolume1
 fixed media
 Mounted on \\.\c:

\\.\Volume{129b1243-3252-11d9-b167-806d6172696f}\
 link to \\?\Device\CdRom0 CD-ROM
 Mounted on \\.\r:
 
\\.\Volume{e3429891-0eb9-11da-b18f-000d60dc98cd}\
 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)