Installing Mac OS X on AppleTV

AppleTV running OS X

This article taken from Hackint0sh.org and refined with appropriate files and notes that will help avoiding lengthy install and errors.

Install Mac OS X on AppleTV without opening the box

Credits:
Modified Kernel by semthex
Partitioning portions taken from Turbo's "Creating a disk to boot from USB" notes [http://0xfeedbeef.com/appletv/]
Portions of this guide taken from semthex's "Mac OS X running on Apple TV" howto
Small portions written by Paul Taylor

Required materials:
An AppleTV
A boot.efi file from an AppleTV (get all bundle of required files here)
Intel Mac
Tiger Install CD
External USB 2.0 hard drive

Set up your USB drive
1. In Mac OS, open Disk Utility
2. In the left pane of Disk Utility, select the USB drive, choose "Partition" on the top bar
3. Hit the Options button at the bottom of the screen.
4. On the resultant screen, select GUID Partition Table. This is required to be able to install Mac OS X.
5. Lay out your partitions the way you want.. (One big, two, whatever) and format them with Mac OS Extended (Journaled)
6. Let the format finish. When done, you should be able to mount the drive.

Install Mac OS X
1. Pop in your install disk with the external drive attached
    NOTE: I was unable to install Mac OS X on IDE drive from original MacBook OS X installation disks. You will probably need Mac OS X Tiger (Intel) purchased separately or install on SATA drive using USB adapter from original disks.
2. Reboot, holding down the Option key on your keyboard if you want to choose Boot Disk or hold "C" key to boot from DVD disk directly
3. Select the CD icon to boot from your install CD
4. Run through the complete installation process, selecting your USB drive as the destination.

Customize your USB installation
1. Run through the normal 1st boot stuff (Add user, etc.)
2. Download this: http://www.apple.com/support/downloa...dateintel.html
3. Install the 10.4.8 combo update
4. Reboot. Go to software update and get all the updates EXCEPT 10.4.9
5. System Prefs > Sharing
6. Check Remote Login here (this enables SSH)
7. Check Apple Remote Desktop
8. Click "Access Privileges", check the "VNC viewers" box, and put in a password here. This will let you remote control your AppleTV after you boot it with this installation.
9. Do any other customization you desire, except update to a newer version of Tiger

Get ethernet working with PCGenRTL8139Ethernet 1.2.0
1. Download http://www.sendspace.com/file/4i62j1
2. Install per the instructions in the file
(Note: This is needed to get either the built-in Ethernet to work or the Airport. This doesn't break Ethernet support for an Intel Core Duo iMac - not sure about others.)

Install proper kernel
1. Boot back up to your internal hard drive
2. Download the kernel from one of the mirrors listed here:
[Kernel] For AppleTV (to run OSX)
3. Mount your external drive
4. From a Terminal window, do this: ls -la /Volumes/YourExternalDisk
5. You will see a file called mach_kernel there.
6. Delete this file (may have to sudo rm /Volumes/YourExternalDisk/mach_kernel). Be careful here NOT to delete the kernel on your Internal Boot disk!
7. Copy the unzipped kernel you downloaded in step 2 to /Volumes/YourExternalDisk

Install boot.efi
1. Replace /System/Library/CoreServices/boot.efi with the boot.efi file from the AppleTV boot drive (it is in the same path)
2. To do the above, you may have to do a "Get Info" on the boot.efi file on your external drive and uncheck the "Locked" checkbox.
3. Bless the installation from a Terminal:
sudo bless --folder=/Volumes/YourExternalDisk/System/Library/CoreServices --file=/Volumes/YourExternalDisk/System/Library/CoreServices/boot.efi --setBoot

Cleanup
1. Delete the Nvidia kexts (all begining with NVD, there are 5) from /Volumes/YourExternalDisk/System/Library/Extensions
2. Delete /Volumes/YourExternalDisk/System/Library/Extensions.mkext and Extensions.kextcache if they exist

Patch AppleFileSystemDriver
NOTE: Perform these steps with a command line text editor (as Pico, VI) or with TextWrangler. DO NOT USE TEXTEDIT!
1. Edit /Volumes/YourExternalDisk/System/Library/Extensions/AppleFileSystemDriver.kext/Contents/Info.plist
2. Search for "IOPropertyMatch". It will be found similar to this:

Properties:
            <key>media-match</key>
            <
dict>
                <
key>IOPropertyMatch</key>
                <array>
                    <
dict>
                        <
key>Content Hint</key>
                        <
string>48465300-0000-11AA-AA11-00306543ECAC</string>
                        <
key>Leaf</key>
                        <
true/>
                    </
dict

3. Just after the line with <array>, copy/paste this in:

Insert Code:
                    <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

Change Partition Type
NOTE: Once you do this, you can't mount the disk on your Intel Mac anymore without reversing the change. If you mess up here, you'll need to start over.
1. Open Disk Utility
2. Select the external disk from the left pane. Right click and select "Information"
3. Take note of the "Disk Indentifier". In my case, it is "disk3". For safety reasons, the rest of this guide is written with "diskX". Replace the X with the number of your drive.
4. From Terminal:
gpt -r show /dev/diskX
5. You'll get something similar to this back:

      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   77757488      2  GPT part 
48465300-0000-11AA-AA11-00306543ECAC
You WILL need those numbers from the second partition (409640 77757488)
from YOUR (not the ones shown here) terminal to replace START and SIZE in instructions below

   78167128     262144         
   78429272   77610032      3  GPT part 
48465300-0000-11AA-AA11-00306543ECAC
  156039304     262151         
  156301455         32         Sec GPT table
  156301487          1         Sec GPT header 

6. A little explanation here is in order. The first real partition is on the line beginning with 40. In this case, it runs from 40 through 409600. (I'm guessing these are bytes) Next to the size is the index, 1. The very next line is the one we are interested in. This is the partition that contains your bootable install. It is index 2. You may or may not have and index 3)

7. Unmount the disk:
disktool -u diskX

8. Now, we remove the entry in the table for the 2nd partition
gpt remove -i 2 /dev/diskX

I got this back:
gpt remove: /dev/disk3: 1 partition(s) removed

9. Mac OS will remount any remaining partitions. Unmount them:
disktool -u diskX

10. Now, we add a new entry to the table. For index 2, take note of the start, and the size, as you'll need them here. Replace the START and SIZE strings with your values.

gpt add -b START -s SIZE -i 2 -t "5265636F-7665-11AA-AA11-00306543ECAC" /dev/diskX

Note that it doesn't tell you anything back.. You just get a prompt.

11. Performing step 5's command again gets me this:

      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   77757488      2  GPT part 
5265636F-7665-11AA-AA11-00306543ECAC
   78167128     262144         
   78429272   77610032      3  GPT part 
48465300-0000-11AA-AA11-00306543ECAC
  156039304     262151         
  156301455         32         Sec GPT table
  156301487          1         Sec GPT header 

Note that the index 2 partition type is now the required type for AppleTV to boot to.

Boot your AppleTV with OS X
1. Attach your external drive to the USB port
2. If already booted up, hit MENU and "-" on your remote and hold it until reboot starts
3. If your AppleTV isn't on, plug it in to power. No remote finagling required.
4. Watch in AWE as your AppleTV boots up OS X.

Your Name or nick


Your email


Subject


Message  - no <, >, [ or ] tags will go through. URL will be converted to link


Total messages: 4

Kernal for Apple TV OSX hack
posted by: Terry on Sunday, September 4, 2016 at 6:43 PM
Hi been looking for the kernel mentioned here is there anyway to get these as the link is broke,.
Apple TV Generation
posted by: indapublic on Sunday, January 25, 2015 at 09:59 AM
Hello. What generation Apple TV should have?
Kernel
posted by: Falcon on Saturday, January 10, 2015 at 3:44 PM
I've found this one, not sure if the correct one.. No intel mac todo all the steps:

http://dc701.4shared.com/download/4e-ktHKD/mach_kernel.html?tsid=20150110-201906-a8fadb68&lgfp=2000&dsid=az9qtg.fe0f22fdb9a0fe989c5248bc1d62b0d3
kernels
posted by: 4sthm4 on Friday, November 14, 2014 at 1:20 PM
Sorry, is there any way to get those kernels? I can't find them anywhere.


bottom corner