Difference between revisions of "Booting from a USB Thumbdrive"

From AwkwardTV
Jump to: navigation, search
Line 1: Line 1:
[http://bigtitsnatural.clung.cn/index.html big tits natural] [http://bau.fast-road.cn/index.html bau] [http://bestofthebestpooh.kittiss.cn/index.html best of the best pooh] [http://snailtail.cn/www-red/index.html www red ligt it] [http://wonted.cn/www-scherzettoni/index.html www scherzettoni com] [http://benafleck.romanikki.cn/index.html ben afleck] [http://wonted.cn/win-martens/index.html win martens] [http://knock-knock.cn/www-wordreference/index.html www wordreference com] [http://wonted.cn/www-giles-it/index.html www giles it] [http://knock-knock.cn/www-centerservice/index.html www centerservice] [http://kitmun.cn/zip-gratis.html zip gratis] [http://snailtail.cn/www-gamberorosso/index.html www gamberorosso it] [http://snailtail.cn/www-radiodeejei/index.html www radiodeejei it] [http://snailtail.cn/www-t-online/index.html www t online de] [http://bigdaddykevinnash.midways.cn/index.html big daddy kevin nash] [http://snailtail.cn/x-cleaner/index.html x cleaner] [http://knock-knock.cn/www-europameisterschaften/index.html www europameisterschaften ch] [http://bmp.kittiss.cn/index.html bmp] [http://bandolerogoldsmith.kittiss.cn/index.html bandolero goldsmith] [http://bluebreatheasyu.fast-road.cn/index.html blue breath easyu] [http://borgaro.kittiss.cn/index.html borgaro] [http://wonted.cn/www-lavoixdunord/index.html www lavoixdunord fr] [http://kitmun.cn/yumenonakae.html yumenonakae] [http://barriofino.clung.cn/index.html barrio fino] [http://baciecarezzetralesbiche.clung.cn/index.html baci e carezze tra lesbiche] [http://bicidaspinning.kittiss.cn/index.html bici da spinning] [http://wonted.cn/www-citroen/index.html www citroen italia] [http://quoits.cn/zoran-jankovic.html zoran jankovic] [http://balbuziedottantoniomarrama.fast-road.cn/index.html balbuzie dott antonio marrama] [http://bluevideoachemidice.fast-road.cn/index.html blue video a che mi dice] [http://kitmun.cn/zelig-audio.html zelig audio] [http://brokenone.fast-road.cn/index.html broken one] [http://kitmun.cn/yoga-y-macky.html yoga y macky] [http://knock-knock.cn/www-lav-ir/index.html www lav ir] [http://boccadassepaolivanoni.clung.cn/index.html boccadasse paoli vanoni] [http://kitmun.cn/zelig-off-nuovi.html zelig off nuovi comici foto] [http://wonted.cn/www-yele-com/index.html www yele com mx] [http://quoits.cn/amore-sotto.html amore sotto coperta] [http://snailtail.cn/ya-no-tengo-nada/index.html ya no tengo nada que dedir] [http://quoits.cn/a-gabbia-nuda.html a gabbia nuda] [http://buoniopcattivi.midways.cn/index.html buoni op cattivi] [http://quoits.cn/zonelabs.html zonelabs] [http://quoits.cn/zonealarm.html zonealarm in italiano] [http://kitmun.cn/zwan.html zwan] [http://baiariace.romanikki.cn/index.html baia riace] [http://knock-knock.cn/www-nationalrail/index.html www nationalrail co uk] [http://snailtail.cn/yessica/index.html yessica] [http://wonted.cn/www-hotelleonessa/index.html www hotelleonessa it] [http://baranzelli.clung.cn/index.html baranzelli] [http://bluebreatheesey.midways.cn/index.html blue breathe esey] [http://snailtail.cn/www-insiemeperlosport/index.html www insiemeperlosport com] [http://benononotatouageblue.kittiss.cn/index.html ben onono tatouage blue] [http://biblioteche.midways.cn/index.html biblioteche] [http://knock-knock.cn/www-epm-net/index.html www epm net com co] [http://kitmun.cn/you-shoud.html you shoud realy know] [http://wonted.cn/www-teramonews/index.html www teramonews it] [http://kitmun.cn/yume-no.html yume no naka he] [http://knock-knock.cn/www-191-it/index.html www 191 it] [http://kitmun.cn/yvi-queen.html yvi queen] [http://biagioantonaccci.midways.cn/index.html biagio antonaccci] [http://quoits.cn/attenti-a-quei.html attenti a quei due napoletani] [http://quoits.cn/arrivederci.html arrivederci papà] [http://knock-knock.cn/www-ytv-com/index.html www ytv com] [http://britneymaxim.clung.cn/index.html britney maxim] [http://basagliaconferenzebrasiliane.clung.cn/index.html basaglia conferenze brasiliane] [http://kitmun.cn/yoto.html yoto] [http://beyoncebabyboy.midways.cn/index.html beyonce baby boy] [http://boemianlikeyou.romanikki.cn/index.html boemian like you] [http://knock-knock.cn/www-b-boy-com/index.html www b boy com] [http://knock-knock.cn/www-eminem/index.html www eminem] [http://quoits.cn/amore-dolce.html amore dolce amore] [http://bipopit.romanikki.cn/index.html bipop it] [http://bocchinareseghe.romanikki.cn/index.html bocchinare seghe] [http://bui.midways.cn/index.html bui] [http://birkenau.kittiss.cn/index.html birkenau] [http://badasstrippa.clung.cn/index.html bad as strippa] [http://quoits.cn/antologia.html antologia di petrolini] [http://balloballodiraffaellacarra.clung.cn/index.html ballo ballo di raffaella carra] [http://bluemary.romanikki.cn/index.html blue mary] [http://buoniocattovi.kittiss.cn/index.html buoni o cattovi] [http://knock-knock.cn/web-cam-maschi/index.html web cam maschi gratis] [http://snailtail.cn/yah/index.html yah] [http://kitmun.cn/ziering.html ziering] [http://snailtail.cn/x-clamp-character/index.html x clamp character file o s t] [http://wonted.cn/www-photsex/index.html www photsex com] [http://basadoenhechosreales.kittiss.cn/index.html basado en hechos reales] [http://wonted.cn/www-seca/index.html www seca] [http://kitmun.cn/y-todo-queda.html y todo queda en nada] [http://snailtail.cn/www-radargames/index.html www radargames it] [http://snailtail.cn/xxl/index.html xxl] [http://binisincero.romanikki.cn/index.html bini sincero] [http://knock-knock.cn/www-japancar/index.html www japancar] [http://btsdietetique.clung.cn/index.html bts dietetique] [http://bringmetolove.romanikki.cn/index.html bring me to love] [http://breaksbeer.kittiss.cn/index.html break s beer] [http://snailtail.cn/xavier/index.html xavier] [http://wonted.cn/www-ilpalermocalcio/index.html www ilpalermocalcio it] [http://bancodelmutuosoccorso.kittiss.cn/index.html banco del mutuo soccorso] [http://bah7.fast-road.cn/index.html bah7] [http://wonted.cn/www-bazar/index.html www bazar] [http://beatifulmindsfirenze.midways.cn/index.html beatiful minds firenze] [http://blackcheerleder.midways.cn/index.html black cheerleder] [http://wonted.cn/www-icest-com/index.html www icest com mx] [http://beir.kittiss.cn/index.html beir] [http://kitmun.cn/you-don-t-have.html you don t have to sayu] [http://snailtail.cn/www-rossifumi/index.html www rossifumi it] [http://basemidi.clung.cn/index.html base midi] [http://knock-knock.cn/www-musicaitaliana/index.html www musicaitaliana com] [http://kitmun.cn/zanotta.html zanotta] [http://balckbetty.kittiss.cn/index.html balck betty] [http://bajarvideosclikdereggaeton.fast-road.cn/index.html bajar videos clik de reggaeton] [http://bullterrier.kittiss.cn/index.html bull terrier] [http://bellissimitv.clung.cn/index.html bellissimi tv] [http://kitmun.cn/your-song-di.html your song di elton john] [http://bocelliremix.romanikki.cn/index.html bocelli remix] [http://knock-knock.cn/www-beyblade/index.html www beyblade com] [http://baglionialbum.clung.cn/index.html baglioni album] [http://knock-knock.cn/www-pavesi/index.html www pavesi] [http://kitmun.cn/yorki2003.html yorki2003 libero it] [http://bloccotrasporti.kittiss.cn/index.html blocco trasporti] [http://knock-knock.cn/www-cicap-org/index.html www cicap org] [http://kitmun.cn/ygoogle.html ygoogle] [http://banca121.clung.cn/index.html banca 121] [http://snailtail.cn/xellos-e/index.html xellos e philia] [http://quoits.cn/zeze-di.html zeze di] [http://kitmun.cn/yeah-di-usher.html yeah di usher] [http://quoits.cn/zacatecaz-zac.html zacatecaz zac] [http://basicartoons.kittiss.cn/index.html basi cartoons] [http://knock-knock.cn/www-consorziogesco/index.html www consorziogesco it] [http://snailtail.cn/xxxsupersize/index.html xxxsupersize] [http://kitmun.cn/yaview.html yaview] [http://wonted.cn/www-load/index.html www load a game it] [http://blackmilk.fast-road.cn/index.html black milk] [http://wonted.cn/www-ueicap-it/index.html www ueicap it] [http://wonted.cn/www-pinko/index.html www pinko com] [http://bleffwriter.midways.cn/index.html bleff writer] [http://knock-knock.cn/www-sexoguarras/index.html www sexoguarras com] [http://snailtail.cn/ya-no-me-acuedo/index.html ya no me acuedo] [http://quoits.cn/arsenale.html arsenale] [http://quoits.cn/arabella.html arabella] [http://bigbrotherallstar.midways.cn/index.html big brother all star] [http://befree.kittiss.cn/index.html be free] [http://knock-knock.cn/www-officejetsupport/index.html www officejetsupport com] [http://snailtail.cn/yeha-uscher/index.html yeha uscher] [http://quoits.cn/afrodite-dea.html afrodite dea dell'amore] [http://bighandscom.clung.cn/index.html bighands com] [http://snailtail.cn/www-gruppoivas/index.html www gruppoivas com] [http://basimusicalikaraokecaparezzafuori.clung.cn/index.html basi musicali karaoke caparezza fuori] [http://knock-knock.cn/www-tutto-moda/index.html www tutto moda uomo com] [http://snailtail.cn/x-lamentele/index.html x lamentele a publiweb] {{Template:Banner}}

Revision as of 21:43, 10 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)