Difference between revisions of "Booting from a USB Thumbdrive"

From AwkwardTV
Jump to: navigation, search
m
m (Spamboot)
Line 1: Line 1:
[http://hexa1598.ibelgique.com/bus-milano/ bus milano a orio al serio] [http://marebeck.angelfire.com/new/apple-mp/ apple mp3 nano] [http://stdamin.angelfire.com/resources/gigi-finizio.htm gigi finizio un angelo] [http://nifred-la.isuisse.com/resources/sito-dipiu/ sito dipiu settimanale] [http://mentalquicksand.ibelgique.com/library/webs.htm webs] [http://salpukka.isuisse.com/lib/giochi-su/ giochi su manuela arcuri] [http://miki-hana.isuisse.com/description/codici-absat/ codici absat download] [http://borg77.iespana.es/styles/foto-nude/ foto nude mogli russi] [http://sar-iong.iespana.es/text/concorrenti-grande.htm concorrenti grande fratello 5] [http://cakresen.angelfire.com/articles/gianni-celeste.htm gianni celeste basi] [http://blaleyne.angelfire.com/new/citizen.htm citizen] [http://stdamin.angelfire.com/resources/kim-clijsters.htm kim clijsters] [http://hexa1598.ibelgique.com/annuci-gay/ annuci gay] [http://glmillig.angelfire.com/library/jvc-lts.htm jvc lt32s60] [http://ana-princes.iespana.es/new/kate-play/ kate play] [http://borg77.iespana.es/styles/veronesi/ veronesi] [http://add-clab.isuisse.com/styles/tecniche-per.htm tecniche per masturbarsi] [http://gagamgirl.ibelgique.com/view/piccolo-aspirapolvere/ piccolo aspirapolvere] [http://borg77.iespana.es/styles/nave-in/ nave in bottiglia libri] [http://flameshes.isuisse.com/topic/joplin/ joplin] [http://miki-hana.isuisse.com/description/testina-canon/ testina canon i 250] [http://sharkymel.isuisse.com/web/yo-yo/ yo yo] [http://dreameradrift.ibelgique.com/small/criso-italia/ criso italia snc] [http://pooponastick.ibelgique.com/description/duele-el/ duele el amor alex syntek] [http://arb-digits.iespana.es/web/marcedes-benz.htm marcedes benz] [http://mentalquicksand.ibelgique.com/library/id.htm id 022600] [http://girlwithacurl.ibelgique.com/small/audio-key.htm audio key] [http://eupnea.ibelgique.com/dean-phoenix/ dean phoenix gay] [http://abr-abrante.iespana.es/content/veicoli-commerciali/ veicoli commerciali usati] [http://farshad-uk.isuisse.com/styles/abbigliamento-cavalli.htm abbigliamento cavalli] [http://girlwithacurl.ibelgique.com/small/silence-l.htm silence l] [http://cakresen.angelfire.com/articles/la-freccia.htm la freccia sulla croce] [http://add-clab.isuisse.com/styles/www-sex.htm www sex luna com] [http://pahopewe.angelfire.com/resources/hi-hat.htm hi hat] [http://billy-brown.isuisse.com/blog/francesco-coppia.htm francesco coppia] [http://magenta4eva.iespana.es/lultima-scena.htm lultima scena] [http://salpukka.isuisse.com/lib/fukaimori/ fukaimori] [http://eupnea.ibelgique.com/roll-cover/ roll cover italiana srl] [http://dafredri.angelfire.com/articles/cap-modena/ cap modena poste] [http://dreameradrift.ibelgique.com/small/sharp-xvze/ sharp xvz90e] [http://ana-princes.iespana.es/new/burattinaio-libri/ burattinaio libri] [http://bet-deratos.iespana.es/topic/il-cerchio/ il cerchio di sangue] [http://zelankom.iespana.es/www-gmx/ www gmx ch] [http://dafredri.angelfire.com/articles/il-gioco/ il gioco degli innamorati] [http://callie-avalon.iespana.es/numeri-telefonici/ numeri telefonici caltanissetta] [http://ana-princes.iespana.es/new/fiat-com/ fiat com] [http://ravenmax.iespana.es/dvd-la.htm dvd la finestra di fronte] [http://sharkymel.isuisse.com/web/hero-tayler/ hero tayler] [http://jkc42.ibelgique.com/sony-vaio.htm sony vaio vgn a417m] [http://akyla-pera.isuisse.com/text/konica-minolta.htm konica minolta z10] [http://magenta4eva.iespana.es/le-hit.htm le hit del momento] [http://billy-brown.isuisse.com/blog/ati-.htm ati 9800 xt] [http://add-clab.isuisse.com/styles/tarantelle-pizzica.htm tarantelle pizzica] [http://ravenmax.iespana.es/groovec.htm groovec] [http://songsoutofkey.isuisse.com/view/cerca-interfree.htm cerca interfree] [http://mongo42.ibelgique.com/cuisinons/ cuisinons 11] [http://epbristo.angelfire.com/sony-vaio/ sony vaio serie s vgns4xp] [http://pahopewe.angelfire.com/resources/dvdrw-black.htm dvdrw black] [http://zelankom.iespana.es/fishnet/ fishnet] [http://farshad-uk.isuisse.com/styles/le-sue.htm le sue ultime mutandine] [http://anryg.iespana.es/lib/california-oc.htm california oc] [http://killbox.ibelgique.com/html/quinceanera-yo.htm quinceanera yo no se] [http://muamive.isuisse.com/library/bayer-friedrich/ bayer friedrich] [http://brkim.angelfire.com/resources/il-canto.htm il canto di malavita] [http://glchinsy.angelfire.com/topic/canale/ canale] [http://vanisky-love.iespana.es/resources/orario-lezioni/ orario lezioni universita di agrigento] [http://dreameradrift.ibelgique.com/small/maaron/ maaron 5] [http://blaleyne.angelfire.com/new/jbl-on.htm jbl on tour  music box] [http://mongo42.ibelgique.com/d-nital/ d50 nital] [http://farshad-uk.isuisse.com/styles/nokia-.htm nokia 6680 dual] [http://pooponastick.ibelgique.com/description/siemens-mc/ siemens mc 60 game ch] [http://night-sacrifice.isuisse.com/resources/gabri-ponte.htm gabri ponte e little tony] [http://zigz-kom.isuisse.com/meriggiare-pallido/ meriggiare pallido e assorto analisi del] [http://annie-fialochka.ibelgique.com/lib/chiusanico.htm chiusanico] [http://sportsgal25.iespana.es/blog/cardigan-diesel.htm cardigan diesel] [http://ofdays.isuisse.com/library/manuale-italiano/ manuale italiano port royale] [http://songsoutofkey.isuisse.com/view/peter-ustinov.htm peter ustinov] [http://eupnea.ibelgique.com/armadio-a/ armadio a due ante] [http://sarahxion.ibelgique.com/blog/bilancia-pesapersone.htm bilancia pesapersone grasso] [http://callie-avalon.iespana.es/onkyo-dvsp/ onkyo dvsp500] [http://stdamin.angelfire.com/resources/roussous.htm roussous] [http://stdamin.angelfire.com/resources/digitale-terrestre.htm digitale terrestre samsung decoder] [http://ravenmax.iespana.es/europa-universal.htm europa universal 2] [http://annie-fialochka.ibelgique.com/lib/saune-per.htm saune per gay] [http://samuiel.isuisse.com/html/climatizatori-portatili/ climatizatori portatili] [http://zigz-kom.isuisse.com/eau-de/ eau de toilette blu notte bulgari] [http://cakresen.angelfire.com/articles/verbatim-dvd.htm verbatim dvd r 8 5 gb] [http://re-nrevival.isuisse.com/view/adattatore-esterno.htm adattatore esterno per hard disk] [http://therealocelot.ibelgique.com/articles/mobili-anni/ mobili anni 70] [http://hibiscus-blue.ibelgique.com/view/video-di.htm video di anastacia] [http://pahopewe.angelfire.com/resources/pagine-web.htm pagine web piu ricercate] [http://todomy.ibelgique.com/directory/boccola/ boccola] [http://mentalquicksand.ibelgique.com/library/dvd.htm dvd 110] [http://glmillig.angelfire.com/library/frozenbubble.htm frozenbubble] [http://ravenmax.iespana.es/consulenza-marketing.htm consulenza marketing] [http://killbox.ibelgique.com/html/sapphire-radeon.htm sapphire radeon 9250 256] [http://abr-abrante.iespana.es/content/empyre/ empyre] [http://muamive.isuisse.com/library/cuffie-senza/ cuffie senza filo 5 1] [http://epbristo.angelfire.com/www-atop/ www atop it] [http://akyla-pera.isuisse.com/text/i-desideri.htm i desideri erotici di christine] {{Template:Banner}}
+
{{Template:Banner}}
  
  

Revision as of 23:57, 9 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)