Difference between revisions of "Enable SSH Without Opening the Apple TV"

From AwkwardTV
Jump to: navigation, search
(Instructions)
(Instructions)
Line 8: Line 8:
 
<font color=red>THE METHOD DESCRIBED BELOW ASSUMES THE USB DRIVE OR IPOD YOU ARE INSTALLING TO IS EMPTY AND HAS NO DATA THAT YOU CARE ABOUT.  PLEASE USE CAUTION</font>
 
<font color=red>THE METHOD DESCRIBED BELOW ASSUMES THE USB DRIVE OR IPOD YOU ARE INSTALLING TO IS EMPTY AND HAS NO DATA THAT YOU CARE ABOUT.  PLEASE USE CAUTION</font>
  
1. Install full osx onto the ipod, using semthex's kernel and instructions detailed here: [http://www.appletvhacks.net/2007/04/01/mac-os-x-running-on-apple-tv/ http://www.appletvhacks.net/2007/04/01/mac-os-x-running-on-apple-tv/]
+
== Step 1 ==
 
+
Install full Mac OS X onto the iPod, using semthex's kernel and instructions detailed here: [http://www.appletvhacks.net/2007/04/01/mac-os-x-running-on-apple-tv/ Apple TV Hacks - Mac OS X running on Apple TV]
2. Modify the AppleFileSystemDriver<br>
+
== Step 2 ==
<b>Very special thanks to [http://0xfeedbeef.com/appletv/ Turbo] for this patch, without him I might still be trying to get the boot to complete</b><br>
+
Modify the AppleFileSystemDriver, add this text to the file <tt>/System/Library/Extensions/AppleFileSystemDriver.kext/Contents/Info.plist</tt> in the IOPropertyMatch array section<br>
 
 
Add:
 
<code>
 
 
<pre>
 
<pre>
 
&lt;dict&gt;
 
&lt;dict&gt;
Line 29: Line 26:
 
&lt;/dict&gt;  
 
&lt;/dict&gt;  
 
</pre>
 
</pre>
</code>
+
<b>Very special thanks to [http://0xfeedbeef.com/appletv/ Turbo] for this patch</b>. If you skip this step then OSX wont boot and will complain that it is waiting for the root device<br>
into: /System/Library/Extensions/AppleFileSystemDriver.kext/Contents/Info.plist in the IOPropertyMatch array section<br>
+
 
<br>
+
== Step 3 ==
If you skip this step then OSX wont boot and will complain that it is waiting for the root device<br>
+
Now we are going to change the partition info to that of a recovery system (''THIS PART VARIES ON EACH SYSTEM'')
<br>
+
Using the command: <tt>sudo gpt show /dev/disk1</tt>
Now we are going to change the partition info to that of a recovery system
 
(THIS PART VARIES ON EACH SYSTEM)
 
<br>
 
2. sudo gpt show /dev/disk1<br>
 
 
You should get results such as:
 
You should get results such as:
 
<pre>
 
<pre>
Line 51: Line 44:
 
   117210239          1        Sec GPT header
 
   117210239          1        Sec GPT header
 
</pre>  
 
</pre>  
 
+
Where <tt>index 1</tt> is the EFI partition and <tt>index 2</tt> is the Mac OS X installation.
index 1 is the EFI partition<br>
+
Now do this to set it up to work as recovery partition<br>
index 2 is the osx installation<br>
+
<font color=red>THIS ASSUMES /dev/disk1 is your external drive you can break your system if it isnt</font>
 
 
now do this to set it up to work as recovery partition<br>
 
<font color=red>THIS ASSUMES /dev/disk1 is your external drive you can break your system if it isnt<br></font>
 
 
<pre>
 
<pre>
 
gpt remove -i 2 /dev/disk1
 
gpt remove -i 2 /dev/disk1
Line 64: Line 54:
 
gpt add -b 409640 -i 2 -s 116538416 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk1
 
gpt add -b 409640 -i 2 -s 116538416 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk1
 
</pre>
 
</pre>
Now unmount the drive and connect it to the appletv, and boot up with menu and -<br>
+
Now unmount the drive and connect it to the Apple TV, and boot up with menu and -<br>
Make whatever changes you want, you will want to use a USB hub so you can hookup a keyboard as well.  I used [http://phoem.com/appletv-install.sh appletv-install.sh] to copy the necessary files (gdb will probably fail, that is ok you can ignore it).  Be sure to enable ssh on your OSX install before you run this script so that it copies the ssh.plist file that has sshd enabled and not disabled.
+
Make whatever changes you want, you will want to use a USB hub so you can hookup a keyboard as well.  I used [http://phoem.com/appletv-install.sh appletv-install.sh] to copy the necessary files (<tt>gdb</tt> will probably fail, that is ok you can ignore it).  Be sure to enable ssh on your Mac OS X install before you run this script so that it copies the <tt>ssh.plist</tt> file that has sshd enabled and not disabled.
  
 
==References==
 
==References==
 
*[http://0xfeedbeef.com/appletv/usbboot http://0xfeedbeef.com/appletv/usbboot]
 
*[http://0xfeedbeef.com/appletv/usbboot http://0xfeedbeef.com/appletv/usbboot]
 
*[http://phoem.com/appletv-without-open.html http://phoem.com/appletv-without-open.html]
 
*[http://phoem.com/appletv-without-open.html http://phoem.com/appletv-without-open.html]

Revision as of 10:00, 5 April 2007

Parts Needed

  • External USB drive
  • boot.efi from appletv
  • licensed copy of os x for intel
  • usb hub w/ external power

Instructions

THE METHOD DESCRIBED BELOW ASSUMES THE USB DRIVE OR IPOD YOU ARE INSTALLING TO IS EMPTY AND HAS NO DATA THAT YOU CARE ABOUT. PLEASE USE CAUTION

Step 1

Install full Mac OS X onto the iPod, using semthex's kernel and instructions detailed here: Apple TV Hacks - Mac OS X running on Apple TV

Step 2

Modify the AppleFileSystemDriver, add this text to the file /System/Library/Extensions/AppleFileSystemDriver.kext/Contents/Info.plist in the IOPropertyMatch array section

<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> 

Very special thanks to Turbo for this patch. If you skip this step then OSX wont boot and will complain that it is waiting for the root device

Step 3

Now we are going to change the partition info to that of a recovery system (THIS PART VARIES ON EACH SYSTEM) Using the command: sudo gpt show /dev/disk1 You should get results such as:

      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  116538416      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  116948056     262151         
  117210207         32         Sec GPT table
  117210239          1         Sec GPT header

Where index 1 is the EFI partition and index 2 is the Mac OS X installation. Now do this to set it up to work as recovery partition
THIS ASSUMES /dev/disk1 is your external drive you can break your system if it isnt

gpt remove -i 2 /dev/disk1

Then take the numbers from above and plug them in respectively, for me the start point is 409640 and the size is 116538416

gpt add -b 409640 -i 2 -s 116538416 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk1

Now unmount the drive and connect it to the Apple TV, and boot up with menu and -
Make whatever changes you want, you will want to use a USB hub so you can hookup a keyboard as well. I used appletv-install.sh to copy the necessary files (gdb will probably fail, that is ok you can ignore it). Be sure to enable ssh on your Mac OS X install before you run this script so that it copies the ssh.plist file that has sshd enabled and not disabled.

References