Difference between revisions of "Booting from a USB Thumbdrive"

From AwkwardTV
Jump to: navigation, search
m
m (spamdunk)
Line 1: Line 1:
[http://splucind.airsofthost.com/content/view/duck-tales/ duck tales] [http://polar-axn.firethro.info polar axn] [http://hdurian.airsofthost.com/view/new/mazda-.htm mazda 3 hot speed] [http://maheinze.airsofthost.com/data/queste-maledette.htm queste maledette vacanze] [http://www-deaprofessionale.giantlau.info www deaprofessionale it] [http://lejenny.airsofthost.com/library/html/carbo.htm carbo] [http://r-g.monbrenno.info r g v] [http://rumote.airsofthost.com/lib/descent-maximum.htm descent maximum] [http://remayfuy.airsofthost.com/images/small/sala-giochi/ sala giochi gratis] [http://rumote.airsofthost.com/lib/olympus-.htm olympus 5060 wide zoom] [http://video-dell.otrev4ro.info video dell attentato in america dell 11] [http://lejenny.airsofthost.com/library/html/fax-multifunzione.htm fax multifunzione laser colori] [http://kate-moss.otrev4ro.info kate moss nude pic] [http://lejenny.airsofthost.com/library/html/bacpac-mission.htm bacpac mission] [http://splucind.airsofthost.com/content/view/volkswagen-touareg/ volkswagen touareg 3 0] [http://gt-turbo.otrev4ro.info gt turbo] [http://laortiz.airsofthost.com/view/new/inno-francese/ inno francese] [http://ragazze-da.monbrenno.info ragazze da marito] [http://keys-tps.monbrenno.info keys tps viaccesse] [http://a-gilardi.cleric4u.info a gilardi storia sociale della] [http://maheinze.airsofthost.com/data/www-autogerma.htm www autogerma it] [http://alpaddy.airsofthost.com/img/styles/dvd-rw/ dvd rw vari accessori] [http://le-nuove.cleric4u.info le nuove veline] [http://hdurian.airsofthost.com/view/new/sbea.htm sbea] [http://remayfuy.airsofthost.com/images/small/bvon/ bvon] [http://archos-.monbrenno.info archos  gmini 402 multimedia center 20] [http://remayfuy.airsofthost.com/images/small/fif/ fif 2005] [http://hdurian.airsofthost.com/view/new/fighe-rosse.htm fighe rosse] [http://splucind.airsofthost.com/content/view/portabottiglie/ portabottiglie] [http://maheinze.airsofthost.com/data/bigfish.htm bigfish] [http://banzlees.airsofthost.com/description/lib/la-piccola.htm la piccola amica] [http://realizzazione-bomboniere.otrev4ro.info realizzazione bomboniere] [http://banzlees.airsofthost.com/description/lib/roma-los.htm roma los angeles] [http://carlos-mona.cleric4u.info carlos mona jimenez] [http://banzlees.airsofthost.com/description/lib/golf-ferri.htm golf ferri] [http://banzlees.airsofthost.com/description/lib/the-last.htm the last doctor] [http://culla-piccoletto.giantlau.info culla piccoletto] [http://batteria-panasonic.firethro.info batteria panasonic gd70] [http://rendi-ingerman.otrev4ro.info rendi ingerman] [http://lejenny.airsofthost.com/library/html/www-phlips.htm www phlips com] [http://residence-mare.giantlau.info residence mare italia] [http://banzlees.airsofthost.com/description/lib/field-knife.htm field knife 78] [http://laortiz.airsofthost.com/view/new/maybe-amazed/ maybe amazed] [http://mappa-teramo.giantlau.info mappa teramo] [http://aiptek.cleric4u.info aiptek] [http://quotazioni-ford.giantlau.info quotazioni ford] [http://banzlees.airsofthost.com/description/lib/ultime-foto.htm ultime foto di serena williams] [http://frgrossm.airsofthost.com/topic/knot-card/ knot card] [http://alpaddy.airsofthost.com/img/styles/televisori-radio/ televisori radio fm] [http://frgrossm.airsofthost.com/topic/hotel-/ hotel 2 stelle] [http://frgrossm.airsofthost.com/topic/www-sat/ www sat key] [http://alpaddy.airsofthost.com/img/styles/mimi-rogers/ mimi rogers] [http://radio-estere.giantlau.info radio estere online] [http://chodza-ludzie.otrev4ro.info chodza ludzie ulicami] [http://frgrossm.airsofthost.com/topic/video-biagio/ video biagio antonacci] [http://splucind.airsofthost.com/content/view/il-crotonese/ il crotonese] [http://remayfuy.airsofthost.com/images/small/giorgia-velina/ giorgia velina] [http://lejenny.airsofthost.com/library/html/meteo-ansa.htm meteo ansa] [http://remayfuy.airsofthost.com/images/small/someday-we/ someday we ll know] [http://alpaddy.airsofthost.com/img/styles/volo-termoli/ volo termoli] [http://laortiz.airsofthost.com/view/new/volante-pedaliera/ volante pedaliera xbox] [http://alpaddy.airsofthost.com/img/styles/grasse-/ grasse 45 over] [http://remayfuy.airsofthost.com/images/small/nicholas-bergh/ nicholas bergh] [http://alpaddy.airsofthost.com/img/styles/usb-sim/ usb sim card reader] [http://lejenny.airsofthost.com/library/html/osdi.htm osdi] [http://frgrossm.airsofthost.com/topic/yordano/ yordano] [http://hdurian.airsofthost.com/view/new/jam-spon.htm jam spon] [http://laortiz.airsofthost.com/view/new/funny-pictures/ funny pictures] [http://remayfuy.airsofthost.com/images/small/radiatori-in/ radiatori in acciaio] [http://splucind.airsofthost.com/content/view/frasi-r/ frasi r] [http://notebook-masterizzatore.giantlau.info notebook masterizzatore dvd interno] [http://hdurian.airsofthost.com/view/new/barzelletta-piccanti.htm barzelletta piccanti] [http://laortiz.airsofthost.com/view/new/appartamenti-in/ appartamenti in val badia] [http://alpaddy.airsofthost.com/img/styles/my-firewall/ my firewall plus] [http://alpaddy.airsofthost.com/img/styles/mercatone-del/ mercatone del mobile] [http://rumote.airsofthost.com/lib/king-mec.htm king mec] [http://alpaddy.airsofthost.com/img/styles/primo-viaggio/ primo viaggio peg perego pliko] [http://rumote.airsofthost.com/lib/nino-d.htm nino d angelo sensa giaca e cravata] [http://intel-processori.otrev4ro.info intel processori dual core] [http://splucind.airsofthost.com/content/view/rs-mmc/ rs mmc memory] [http://frgrossm.airsofthost.com/topic/littmann-classic/ littmann classic] [http://laortiz.airsofthost.com/view/new/un-dottore/ un dottore in alto mare] [http://alpaddy.airsofthost.com/img/styles/worms-forts/ worms forts under siege xbox] [http://codes-de.giantlau.info codes de tps] [http://palmare-qtek.otrev4ro.info palmare qtek] [http://banzlees.airsofthost.com/description/lib/olivia-de.htm olivia de treville] [http://frgrossm.airsofthost.com/topic/km-bmw/ km0 bmw serie 1 diesel auto km 0] [http://laortiz.airsofthost.com/view/new/la-carica/ la carica dei quattromila] [http://nikon-af.giantlau.info nikon af s dx 55 200] [http://el-tv.giantlau.info el tv] [http://frgrossm.airsofthost.com/topic/velocity/ velocity] [http://splucind.airsofthost.com/content/view/les-paul/ les paul standard] [http://banzlees.airsofthost.com/description/lib/sony-ps.htm sony ps2 70004 silver] [http://alpaddy.airsofthost.com/img/styles/code-di/ code di capelli veri] [http://laortiz.airsofthost.com/view/new/humping-games/ humping games] [http://frgrossm.airsofthost.com/topic/fucoides/ fucoides] [http://kit-antifurto.giantlau.info kit antifurto] [http://alpaddy.airsofthost.com/img/styles/v/ v 70] [http://www-adnetwork.giantlau.info www adnetwork com] [http://banzlees.airsofthost.com/description/lib/immagini-porno.htm immagini porno xxx] [http://lejenny.airsofthost.com/library/html/wooden-chiedermi.htm wooden chiedermi] [http://citizen-orologio.cleric4u.info citizen orologio] [http://lejenny.airsofthost.com/library/html/riassunto-libro.htm riassunto libro treno della speranza] [http://mitar.cleric4u.info mitar] [http://banzlees.airsofthost.com/description/lib/matrox.htm matrox 100] [http://splucind.airsofthost.com/content/view/salernobynight/ salernobynight] [http://reggio-emilia.giantlau.info reggio emilia elezioni 2004] [http://gotica.monbrenno.info gotica] [http://diablo-lod.firethro.info diablo2 lod] [http://frankston.otrev4ro.info frankston] [http://remayfuy.airsofthost.com/images/small/fax-con/ fax con telefono segreteria carta comune] [http://frgrossm.airsofthost.com/topic/memory-stick/ memory stick mp3 sony] [http://humberside.firethro.info humberside] [http://splucind.airsofthost.com/content/view/yamaha/ yamaha 1500] [http://alpaddy.airsofthost.com/img/styles/sesso-tantrico/ sesso tantrico] [http://laortiz.airsofthost.com/view/new/asrock-kvta/ asrock k7vt4a pro kt400a] [http://alpaddy.airsofthost.com/img/styles/c-ethernet/ c1100 ethernet] [http://remayfuy.airsofthost.com/images/small/testo-italiano/ testo italiano ave maria di schubert] [http://numa-nie.monbrenno.info numa nie] [http://banzlees.airsofthost.com/description/lib/cavo-toslink.htm cavo toslink] [http://www-centro.cleric4u.info www centro estetica bahia it] [http://alpaddy.airsofthost.com/img/styles/power-point/ power point free download] [http://laortiz.airsofthost.com/view/new/microfono-chitarra/ microfono chitarra] [http://lejenny.airsofthost.com/library/html/permaflex.htm permaflex] [http://remayfuy.airsofthost.com/images/small/asus-scheda/ asus scheda madre ata] [http://michael-redgrave.otrev4ro.info michael redgrave] [http://legend-of.monbrenno.info legend of aladdin] [http://www-horseland.cleric4u.info www horseland com] [http://negative-romanesti.otrev4ro.info negative romanesti] [http://sesso-donne.firethro.info sesso donne con cavalli] [http://splucind.airsofthost.com/content/view/la-suola/ la suola della musica] [http://alpaddy.airsofthost.com/img/styles/dvd-hdd/ dvd hdd panasonic] [http://banzlees.airsofthost.com/description/lib/locchio-del.htm locchio del gatto] [http://whirlpool-avm.monbrenno.info whirlpool avm 119] [http://lejenny.airsofthost.com/library/html/naso-olfatto.htm naso olfatto] [http://maheinze.airsofthost.com/data/il-gamecube.htm il gamecube parla con tutti] [http://pure-love.firethro.info pure love] [http://kitt.monbrenno.info kitt] [http://maheinze.airsofthost.com/data/germignaga.htm germignaga] [http://lacie-hard.giantlau.info lacie hard disk divx] [http://laortiz.airsofthost.com/view/new/nikon-sb/ nikon sb] [http://frgrossm.airsofthost.com/topic/www-chilavisto/ www chilavisto it] [http://rumote.airsofthost.com/lib/audio-video.htm audio video trasmettitore] [http://registrazione-alice.giantlau.info registrazione alice adsl] [http://frgrossm.airsofthost.com/topic/ucds-download/ ucds download] [http://maheinze.airsofthost.com/data/cavo-qtek.htm cavo qtek] [http://frgrossm.airsofthost.com/topic/izbasa/ izbasa] [http://rumote.airsofthost.com/lib/rama.htm rama] [http://rumote.airsofthost.com/lib/nikon-slim.htm nikon slim] [http://frgrossm.airsofthost.com/topic/ragazze-publiweb/ ragazze publiweb] [http://banzlees.airsofthost.com/description/lib/testo-della.htm testo della canzone funk it] [http://splucind.airsofthost.com/content/view/cimcity/ cimcity] [http://laortiz.airsofthost.com/view/new/eruzione-etna/ eruzione etna in diretta] [http://maheinze.airsofthost.com/data/foto-olocausto.htm foto olocausto] [http://mbx.cleric4u.info mbx] [http://splucind.airsofthost.com/content/view/dimmi-che/ dimmi che non hai paura di me] [http://lejenny.airsofthost.com/library/html/aziende-tessili.htm aziende tessili a mantova] [http://splucind.airsofthost.com/content/view/driver-modem/ driver modem] [http://be-faithful.giantlau.info be faithful] [http://banzlees.airsofthost.com/description/lib/www-caballeros.htm www caballeros del zodiaco com mx] [http://amplificatore-orion.otrev4ro.info amplificatore orion] [http://plextor-px.otrev4ro.info plextor px 130a] [http://alpaddy.airsofthost.com/img/styles/lp/ lp 250] [http://nanotubi.giantlau.info nanotubi] [http://lejenny.airsofthost.com/library/html/msc.htm 3msc] [http://remayfuy.airsofthost.com/images/small/dopo-il/ dopo il viaggio] [http://scuola-corsi.monbrenno.info scuola corsi] [http://remayfuy.airsofthost.com/images/small/torinosalerno/ torinosalerno] [http://orecchini-a.firethro.info orecchini a clip] [http://lejenny.airsofthost.com/library/html/vecchia-nude.htm vecchia nude] [http://hdurian.airsofthost.com/view/new/programma-scaricare.htm programma scaricare giochi] [http://maheinze.airsofthost.com/data/lavorazioni-meccaniche.htm lavorazioni meccaniche cnc] [http://alpaddy.airsofthost.com/img/styles/todays-people/ todays people] [http://stampante-a.cleric4u.info stampante a3 carta in rotolo] [http://iceberg-twice.monbrenno.info iceberg twice homme] [http://lejenny.airsofthost.com/library/html/x-bmw.htm x5 bmw] [http://alpaddy.airsofthost.com/img/styles/milleuna-tim/ milleuna tim] [http://rumote.airsofthost.com/lib/the-grudge.htm the grudge collector edition] [http://remayfuy.airsofthost.com/images/small/prenotazione-viaggi/ prenotazione viaggi] [http://volo-boston.giantlau.info volo boston] [http://maheinze.airsofthost.com/data/xerox-phaser.htm xerox phaser 8200] [http://hdurian.airsofthost.com/view/new/i-giorni.htm i giorni di clichy] [http://remayfuy.airsofthost.com/images/small/je-vais/ je vais me les faire dans le poulailler] [http://salute-donna.otrev4ro.info salute donna di torino] [http://remayfuy.airsofthost.com/images/small/the-brady/ the brady bunch] [http://remayfuy.airsofthost.com/images/small/opel-combo/ opel combo tour] [http://rumote.airsofthost.com/lib/nuove-confezioni.htm nuove confezioni speciali per la playstation 2] [http://banzlees.airsofthost.com/description/lib/fernandes.htm fernandes] [http://il-racconto.firethro.info il racconto di bombay] [http://aramo-pasquale.otrev4ro.info aramo pasquale] [http://laortiz.airsofthost.com/view/new/got-recon/ got recon] [http://canon-scanner.otrev4ro.info canon scanner a3] [http://remayfuy.airsofthost.com/images/small/cazuza/ cazuza] [http://pokemon-rosso.giantlau.info pokemon rosso fuoco game boy] [http://remayfuy.airsofthost.com/images/small/l-uomo/ l uomo tigre vol 09] [http://laortiz.airsofthost.com/view/new/il-puttaniere/ il puttaniere] [http://hdurian.airsofthost.com/view/new/video-player.htm video player portable] [http://laortiz.airsofthost.com/view/new/braun-oral/ braun oral b 8500] [http://www-nawaiwaqt.firethro.info www nawaiwaqt com pk] [http://sick-and.otrev4ro.info sick and tired di anastacia] {{Template:Banner}}
+
{{Template:Banner}}
  
  

Revision as of 04:36, 1 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)