Patchstick/Testing

From AwkwardTV
Revision as of 11:00, 15 September 2007 by LhsYzv (talk | contribs)
Jump to: navigation, search
compito di matematica sagre campania annuncio incontro lombardia donna lose my friend halifax shopping galapagos tesi di storia moderna e sistema stai eu brandl johann britney spears music box biographical collection testo breath easy blue scienza unitaria sito e video da resident evil outbreak file 2 peugeot 106 13 raf sei la piu bella del mondo onkyo htc 501 e voli per moldova barra norte logistica industriale www talos com fiera di capo d orlando server ibm xseries 206 labelwriter twin turbo accessori per palmari fujitsu innamorati in blue jeans lcd hd ready sony jadis ja 200 geforce 6600 ho sposato un fantasma vasco generale turbine di sangue tubercolosi cutaneo dj tatanka nokia 7110 nec e616 cellulari sow donne centro servizi mercury sas www laura pausini it cambiamenti nelle organizzazioni snc hybrid t flash digitale lungo abiti donna abbigliamento impianto elettrico hqc 888 video trombate gratis supporti casse acustiche golf2 benq t701 auto nos super screensaver sabrina ferilli aggiornamenti siena le vendite mondiali di nintendo toupie nokia hs 4w www freemail hu expert negozi elettrodomestici domingues cerete dinenr party registratori telefonici se ci sarai que es renacimiento rsmmc da 256 mb eaby it remember me crepe ludus fiesta studio beyonce video billy bevan nan ling olympus memorie pompini con sborra stampante hp designjet 130nr gta4 tubo per giardino mirpur khas processore p4 630 www miniclip ro bangang fattura software steven seagal action collection carte palmare mio elmi rebelat moki duello a durango figa vip speedy gonzales demo primus amore e guai e bay freed trama luneur programma fantacalcio download jeep roma kracauer libri batterie cellulare samsung a800 hp compaq media center rumori ed effetti lanterna martin mistery blu chat estafet kung fu monkeys preteens models lcd 17 acer teen tgp ethnic flower mp3 1gb odys s9 www sexs zoo www fimp it km0 fiat punto benzina auto km 0 picchiaduro ps2 videogiochi decathlon il barmen nero camicie uomo norton security citta di bronte ericsson communicam Uci cinema Palco esibizioniste Alba parietti nuda Rivenditori converse Yulia nova Divafutura com Americane nude Hegre-art com Autobus lirosi Www divafutura tv Orge gratis Sandy westgate video Sexanimal Www ogrish com Preteen model Bulma porno Hantai gratis Marge simpson xxx Sex toon Nude boys Sfondami gratis Www louis vuitton com Melita toniolo calendario 2008 Lecca la figa Pornostar gratis Dragonball hentai fumetti Video giovani lesbiche Www pornoyoutube com Donne anziane che scopano Ospedale san raffaele Video parto naturale Youporno com Foto porno naruto Www you tube it You porno Escortforumit com Cartina geografica italia Modello curriculum vitae Gameshark smeraldo Sesso con aimali Preteen model Video cicciolina con cavallo Kamehasutra italiano Tette grosse foto gratis Nere gratis Simpson xxx Madri troie Melita foto calendario Preteen models Belle puttane Tsunade nuda Tattoo farfalle Prezzi porte scrigno Telegrammi telecom Xstreamsat Oldspunkers com Wipped ass Fotostorie di incesto Alexis amore Aebncom Fakes italiane Scoreland Trucchi pokemon smeraldo Virgilioeros Calciatori nudi gratis Sex tube Daemon tool v4 Fumetti manga porno Cinesine xxx Cicciolina nuda Racconti di zia tettona Porno spagnoli Programmi per scaricare film Video giovani lesbiche Winx enchantix colorare Troie che scopano con animali Indirizzo email san giorgio lavatrici Ww tgcom it Dragonball xxx videl Attrici italiane nude Porno zia nipote Blondie porno star Emoticon sex Thumbzilla Amber di diva futura Rita rusic nuda Storie incesti Emoticon sex Stir zucchetti Escort forum it Scritte glitter Video porno animal Teen troie Sedi inps a roma Foto porno di emma watson Dragonballx gratis Madri troie Videosexy Iomilu Vechie troie puttane over 50 Fotoracconti erotici incesti Daphne rosen Www escortforum it Tugjob Tatuaggio farfalla Www csa napoli bdp it Tette grosse foto gratis Bambole da vestire Puttane casalinghe Indirizzo email san giorgio lavatrici Calcolo stipendio lordo Pps sexi Susanna messaggio nuda Gohan videl hentai Foto porno manga naruto Doctoradventures Thehun Figa aperta Sesso negre Www freesexzone tv
KEEP THINGS ABSOLUTELY LEGITIMATE, PLEASE
Links to illegal warez, etc. will be removed, and your access will be blocked. (Details)

Apparently, there are some copies of patchstick images in the wild. Most likely, these will not work. Also, THEY ARE ILLEGAL! Also, some people report that the patchstick erased their AppleTV, resulting in a non-recoverable AppleTV. This is actually quite credible, since all Patchstick does is run some shell scripts as root. If this happened to you: GOOD FOR YOU!! Don't count on Apple to help you.



This page describes how to make a Patch stick using OSX/Intel binaries, and therefor is not legally distributable. Therefor, no support whatsoever is given to anyone.

However, I think this process is important enough to document, so we can see what steps are needed to build an open, free and 100% legal version of Patchstick. - Mactijn 23:56, 8 April 2007 (CEST)

Pre-requisites, All versions

  • USB flashdrive or disk (USB mass storage compatible) (for PatchStick.1.0.zip, a 512Meg stick is sufficient -- has anyone succeeded with a smaller stick?)
  • an Intel machine running Mac OS X 10.4.x (won't work on non-intel machines, kext files not compatible; have a look at Install SSH without an Intel Mac in this case)
  • boot.efi from OS.dmg, mount it from the latest software update

Pre-requisites, Manual way

Full Working Version

zip file mirrored here: Patchstick.zip

I (HenryLaxen) downloaded this on July 23, 2007, and found that this line in the createPatchstick file was commented out:

	cp /usr/sbin/sshd /Volumes/Patchstick/ssh/

which prevents sshd from working on the AppleTV. After uncommenting this line, I was able to log into my AppleTV with ssh -1 -v frontrow@xx.xx.xx.xx Also, I consistantly get a kernel panic when launchd executes /sbin/reboot, however by this time the ssh files have already been installed. Do not worry that the first time you log in via ssh that it takes a long time, as the AppleTV must generate its host keys. HenryLaxen July 25, 2007

Actually, there are three ssh-related lines commented in the createPatchstick script, and it worked well for me to uncomment all three. But the "sed" in the DYLD_FRAMEWORK_PATH mumble isn't found when booting from the stick, which is why I believe only "ssh -1" works so far. Also, I see no reason why the Perian lines are commented out, and restoring them allowed Perian to be installed, which is quite useful of course. clrelay 2007-08-06

I was able to use it free of any changes noted above. After installation, I used the Enable SSH Server item in the AwkwardTV frappliance to gain shell access. postman August 12, 2007

Manually: Partitioning and formatting the USB disk

based on Turbo's excellent guide here.

Update: Changed to use only one partition!

  • hook up the USB drive to your Mac
  • Re-partition it using DiskUtility: Format: Mac OS Extended (Journaled), Options: GUID table, Partition Name: Patchstick-root

If you only have one disk, your USB disk will be /dev/disk1, otherwise

  • check what disk it is:
hostname:~ user$ df -h
/dev/disk0s2               74G    72G   1.9G    97%    /
devfs                     100K   100K     0B   100%    /dev
fdesc                     1.0K   1.0K     0B   100%    /dev
<volfs>                   512K   512K     0B   100%    /.vol
automount -nsl [205]        0B     0B     0B   100%    /Network
automount -fstab [219]      0B     0B     0B   100%    /automount/Servers
automount -static [219]     0B     0B     0B   100%    /automount/static
/dev/diskX                499M    40K   499M     0%    /Volumes/NO NAME

NOTE: if you see something like /dev/disk1s1, /dev/diskX means /dev/disk1, not /dev/disk1s1!

  • Now get the partition information which is required later to change the GUID:
gpt -r show /dev/diskX

results in:

   start    size  index  contents
      0       1         PMBR
      1       1         Pri GPT header
      2      32         Pri GPT table
     34       6         
     40  511920      1  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
 511960       7         
 511967      32         Sec GPT table
 511999       1         Sec GPT header

Note the start and size of the partition - use this at the bottom of these instructions as the -b -s parameters (in this case -b 40 -s 511920)

Creating the patchstick boot-environment

this part is, for now, based on copying OSX binaries, and needs to be replaced ASAP

After performing the steps in the previous chapter, the USB drive's primary partition should have mounted itself as /Volumes/Patchstick-root. If you named it differently, please substitute all occurences of /Volumes/Patchstick-root with the correct one.

  • in a shell, as root, change the current directory to the patchstick root FS:
hostname:~ root# cd /Volumes/Patchstick-root
  • create the directory structure:
hostname:/Volumes/Patchstick-root root# mkdir -p sbin usr/lib/system System/Library/Extensions stuff etc dev OSBoot
hostname:/Volumes/Patchstick-root root# ln -s sbin bin
  • copy semthex's kernel (named mach_kernel) to /Volumes/Patchstick-root/
  • create /Volumes/Patchstick-root/com.apple.Boot.plist with your favourite text editor (vi/pico/joe/...) and make it look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Background Color</key>
        <integer>0</integer>
        <key>Boot Fail Logo</key>
        <string></string>
        <key>Boot Logo</key>
        <string>BootLogo.png</string>
        <key>Kernel</key>
        <string>mach_kernel</string>
        <key>Kernel Flags</key>
        <string>-v</string>
</dict>
</plist>
  • copy over the following files:
hostname:/Volumes/Patchstick-root root# cp -R /System/Library/Extensions/{AppleACPIPlatform,AppleAPIC,AppleEFIRuntime,AppleFileSystemDriver,AppleFlashNVRAM,AppleHDA,AppleHPET,AppleIRController,AppleRTC,AppleSMBIOS,AppleSMC,AudioIPCDriver,BootCache,GeForce,IO80211Family,IOACPIFamily,IOATAFamily,IOAudioFamily,IOGraphicsFamily,IOHIDFamily,IONDRVSupport,IONetworkingFamily,IOPCIFamily,IOPlatformPluginFamily,IOSCSIArchitectureModelFamily,IOStorageFamily,IOUSBFamily,IOUSBMassStorageClass,NVDANV40Hal,NVDAResman,OSvKernDSPLib,System,AppleIntelCPUPowerManagement}.kext /Volumes/Patchstick-root/System/Library/Extensions/
hostname:/Volumes/Patchstick-root root# cp /bin/bash /bin/chmod /usr/sbin/chown /bin/cp /sbin/mount /sbin/mount_hfs /sbin/mount_devfs /bin/sleep /sbin/umount /bin/sync /bin/mkdir /usr/bin/sed /usr/sbin/installer /Volumes/Patchstick-root/sbin/
hostname:/Volumes/Patchstick-root root# cp /usr/lib/dyld /usr/lib/libSystem.B.dylib /usr/lib/libncurses.5.4.dylib /usr/lib/libgcc_s.1.dylib /Volumes/Patchstick-root/usr/lib/
hostname:/Volumes/Patchstick-root root# cp /usr/lib/system/libmathCommon.A.dylib /Volumes/Patchstick-root/usr/lib/system/
  • Patch the AppleFileSystemDriver and add the following section to the file /Volumes/Patchstick-root/System/Library/Extensions/AppleFileSystemDriver.kext/Contents/Info.plist in the IOPropertyMatch array:
                        <key>media-match</key>
                        <dict>
                                <key>IOPropertyMatch</key>
                                <array>
                                        <dict>
                                                <key>Content Hint</key>
                                                <string>5265636F-7665-11AA-AA11-00306543ECAC</string>
                                                <key>Leaf</key>
                                                <true/>
                                        </dict>
                                        <dict>
                                                <key>Content Hint</key>
                                                <string>Apple_Recovery</string>
                                                <key>Leaf</key>
                                                <true/>
                                        </dict>
                                        <dict>
                                                <key>Content Hint</key>
                                                <string>48465300-0000-11AA-AA11-00306543ECAC</string>
                                                <key>Leaf</key>
                                                <true/>
                                        </dict> 


  • now, create /Volumes/Patchstick-root/sbin/launchd with your favourite text editor (vi/pico/joe/...) and make it look like this:
#!/sbin/bash

exec 2>/dev/console
exec 1>/dev/console

echo
echo "        --- AppleTV Patchstick ---"
echo '        (please ignore the "invalid destination port\" errors)'

# echo "        * remounting / r/w"
# /sbin/mount -uw /

echo "        * mounting OSBoot partition r/o"
/sbin/mount -t hfs -r /dev/disk0s3 /OSBoot

echo "        * re-mounting OSBoot partition r/w"
/sbin/mount -uw /OSBoot

echo "        * mounting stuff partition r/o"
/sbin/mount -t hfs -r /dev/disk1s2 /stuff

echo "        * keeping the OSBoot partition r/w for plugins"
touch /OSBoot/.readwrite

if [ -d /OSBoot/dev/ ]; then

  for i in /stuff/installer.d/*; do
    echo "        --- ${i} ---"
    /sbin/bash "${i}"
  done

  /sbin/sync