Installing MythFrontend on an AppleTV
This guide is work in progress
Contents
Warning/Disclaimer
This HOWTO describes the process of installing MythFrontend on an AppleTV. As this procedure requires opening up the AppleTV and removing the harddrive it will almost certainly void your warranty. Do not attempt this procedure unless you are comfortable with this. You do this at your own risk, and I take no responsibility if you kill your AppleTV etc etc.
Requirements
- An AppleTV
- An OSX build of MythFrontend. I used 0.20-fixes from http://padilla.net/mythtv-osx, or you can build your own
- An Intel Mac to connect the harddrive to
- A 2.5" IDE drive to firewire converter
- Torx T8 and T10 screwdrivers
Backup your AppleTV and install SSH
Backing up
I followed the instructions here http://www.engadget.com/2007/03/23/how-to-upgrade-the-drive-in-your-apple-tv/
Basically, you need to open the AppleTV and remove the hard drive. Connect it to your Intel Mac (do not use a PPC Mac or you'll risk damaging the GUID partition) using the 2.5" IDE to firewire adaptor.
Use the diskutil command to determine which is the AppleTV disk. You'll see something like this:
y:~ n$ diskutil list /dev/disk0 #: type name size identifier 0: GUID_partition_scheme *149.1 GB disk0 1: EFI 200.0 MB disk0s1 2: Apple_HFS Macintosh HD 148.7 GB disk0s2 /dev/disk1 0: GUID_partition_scheme *37.3 GB disk1 1: EFI 34.0 MB disk1s1 2: Apple_Recovery 400.0 MB disk1s2 3: Apple_HFS OSBoot 900.0 MB disk1s3 4: Apple_HFS Media 35.8 GB disk1s4
In this case the AppleTV drive is /dev/disk1. Make a backup of the drive using the following command:
dd if=/dev/disk1 of=AppleTV.img bs=1024k
Install SSH
I followed the instructions here http://wiki.awkwardtv.org/wiki/Install_SSH
Copy ssh from /usr/sbin to the AppleTV drive and make sure it's executable:
cp /usr/sbin/sshd /Volumes/OSBoot/usr/sbin/ chmod +x /Volumes/OSBoot/usr/sbin/sshd
Ensure /Volumes/OSBoot/System/Library/LaunchDaemons/ssh.plist contains the following:
<?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>Disabled</key> <false/> <key>Label</key> <string>com.openssh.sshd</string> <key>Program</key> <string>/usr/libexec/sshd-keygen-wrapper</string> <key>ProgramArguments</key> <array> <string>/usr/sbin/sshd</string> <string>-i</string> </array> <key>SessionCreate</key> <true/> <key>Sockets</key> <dict> <key>Listeners</key> <dict> <key>Bonjour</key> <array> <string>ssh</string> <string>sftp-ssh</string> </array> <key>SockServiceName</key> <string>ssh</string> </dict> </dict> <key>StandardErrorPath</key> <string>/dev/null</string> <key>inetdCompatibility</key> <dict> <key>Wait</key> <false/> </dict> </dict> </plist>
Test SSH access
Return the drive to the AppleTV and start it up. Rather than start up normally it may bring up a menu asking if you want to do a restore. If this happens, run the diagnostics, this should be fine, and then select restart. Choosing restore will wie out the work done in the previous steps.
Once it's started up, try and connect using ssh:
mac# ssh -1 frontrow@<appletv ip address>
the password is also frontrow
Install vi and su
Copy vim and su to the AppleTV:
mac# scp -1 /usr/bin/vim frontrow@<appletv ip address>:~ mac# scp -1 /usr/bin/su frontrow@<appletv ip address>:~
Disable watchdog
Instructions are from http://wiki.awkwardtv.org/wiki/Watchdog