Difference between revisions of "Take 2 Full Update"
(→5) Install AFP: added info on manual vs automatic success and clarified 1.1 or later section..) |
(→5) Install AFP: - added line to On AppleTV to clarify for version 1.0 AppleTV) |
||
Line 120: | Line 120: | ||
<br>Name it "hostconfig" (no quotes, no extension) and place it in your AppleTVUpdate folder on your desktop. | <br>Name it "hostconfig" (no quotes, no extension) and place it in your AppleTVUpdate folder on your desktop. | ||
scp -1 -r ~/Desktop/AppleTVUpdate/hostconfig frontrow@AppleTV.local:~ | scp -1 -r ~/Desktop/AppleTVUpdate/hostconfig frontrow@AppleTV.local:~ | ||
− | On AppleTV: | + | On AppleTV (Must be a AppleTV Version1.0 Factory box to work - if yours came with 1.1 or 2.0 pre-installed, you may need to do the steps 15 lines below): |
sudo mount -uw / | sudo mount -uw / | ||
sudo touch /.readwrite | sudo touch /.readwrite |
Revision as of 17:48, 8 April 2008
includes updates for 2.0.1
What follows are step by step instructions for upgrading your Apple TV to the 2.0 (Take 2) software, and then loading back on all the "extras". First thing to do is grab all the required files and put them in a folder called AppleTVUpdate which is located on your desktop.
Contents
- 1 Required Hardware
- 2 Required Files
- 3 Steps
- 3.1 1) Install Apple TV Take 2 update from your Apple TV
- 3.2 2) Install SSH
- 3.3 3) Install ATVFiles
- 3.4 4 Install Perian and other Quicktime Components
- 3.5 5) Install AFP
- 3.6 6) Reboot AppleTV
- 3.7 7) Install USB
- 3.8 8) Install MacFUSE/sshfs
- 3.9 9) Install mount_smbfs
- 3.10 10) Create rc.local
- 3.11 11) Enable VNC
- 3.12 12) Disable Updates
- 3.13 13) Reboot the AppleTV
- 4 Watchdog
- 5 Aftermath
Required Hardware
- Apple TV running the Take2 update firmware version 1, since version 1.1 doesn't have AFP and VNC support.
- Intel Mac - there are ways to do this on PC's and PPC Macs, and we have tried to cover them as much as we can
- USB "thumb drive" of at least 128 MB. Some users have reported problems with drives with more than 2 GB.
Required Files
- ATVFiles-1.0.take2a2.run
- turbo_kext_enabler.bin
From Perian:
- AC3MovieImport.component - provides ac3 sound for perian (bundled in perian install)
- A52Codec.component - (bundled in perian install)
- Perian.component - provides divx, xvid, flv,mkv, srt support
From Flip4Mac:
- Flip4Mac WMV Import.component - provides windows media support
Note: The above files (with exception of the .DMG) can be found under /Library/Audio/Plug-Ins/Components and /Library/QuickTime, if you have Perian (and Flip4Mac) installed on your Intel Mac.
From MacOS X 10.4.9 Combo Updater (Download and mount, open the pkg with Pacifist):
- IOUSBMassStorageClass.kext
- IOSCSIArchitectureModelFamily.kext
- IOStorageFamily.kext
- msdosfs.kext
- ntfs.kext
- smbfs.kext
- udf.kext
Note: The above files can be found inside /System/Library/Extensions inside the package mentioned above using Pacifist.
- mount_smbfs
Note: The above files can be found inside /sbin inside the package mentioned above using Pacifist.
Steps
NOTE: All commands are to be run one at a time, do not try pasting everything in and running all at once
1) Install Apple TV Take 2 update from your Apple TV
2) Install SSH
Either use a Patchstick (see Take2patch) or install by physically removing the AppleTV's hard drive from the AppleTV, mounting the drive on another computer, and copying over the appropriate files (see Install SSH, including Install SSH / Notes for Take 2). For windows systems, see ATV 4 windows
3) Install ATVFiles
a) on Mac:
scp -1 -r ~/Desktop/AppleTVUpdate/ATVFiles-1.0.take2b1.run frontrow@AppleTV.local:~
b) on AppleTV
sudo sh ~/ATVFiles-1.0.take2b1.run
Alternate 3 to 8
a) Copy MacOS X 10.4.9 Combo Updater to ~/Documents folder on AppleTV
b) Install nitoTV http://forum.awkwardtv.org/viewtopic.php?f=6&t=1262
c) Once on the menu, install (from the nitoTV installer menu)
c1) Perian, say NO when asked to use Perian h.264 instead of Quicktime's
c2) mplayer codecs
c3) Turbo's Kextloader
c4) Smart Installer (not the updater)
d) jump to step 9
- Note: added c3 and moved Smart Installer to c4! otherwise the Smart Installer will throw errors at the end, and the kextloader is needed for the USB patch anyway.
4 Install Perian and other Quicktime Components
a) on Mac:
scp -1 -r ~/Desktop/AppleTVUpdate/AC3MovieImport.component frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/Flip4Mac\ WMV\ Import.component frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/Perian.component frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/A52Codec.component frontrow@AppleTV.local:~
b) on AppleTV
sudo mount -uw / sudo mv ~/AC3MovieImport.component /Library/Quicktime/ sudo mv ~/Flip4Mac\ WMV\ Import.component /Library/Quicktime/ sudo mv ~/Perian.component /Library/Quicktime/ sudo mv ~/A52Codec.component /Library/Audio/Plug-Ins/Components/
5) Install AFP
Both the processes listed below (Auto and Manual) presume a 1.0 recovery partition on the AppleTV, and have been tailed towards that. Many of the files can likely be gotten from the 10.4.9 combo updater, but probably not all (this needs to be verified)--BonesSK 03:16, 9 April 2008 (CEST). A full install of 10.4.9 on an Intel Mac would also do nicely, but both the script and the manual process would need to be tweaked in order to properly get and place the files.
If you are running leopard 10.5+, you may want to install 10.4 onto an external drive (USB drive, firewire, iPod etc) to get files. --BonesSK 03:30, 9 April 2008 (CEST)
At this time there seems to be more success with the manual process, than with the automatic process. --BonesSK 03:30, 9 April 2008 (CEST)
a) Automatic Process:
On Mac:
Download the script.
scp -1 -r ~/Desktop/AppleTVUpdate/afpinstall.sh frontrow@AppleTV.local:~
On AppleTV:
sudo sh afpinstall.sh
b) Manual Process:
Because the sed command wasn't working, we'll just create out own hostconfig file.
On Mac:
Create a text file with the following contents:
AFPSERVER=-YES- AUTHSERVER=-NO- AUTOMOUNT=-YES- CUPS=-AUTOMATIC- NFSLOCKS=-AUTOMATIC- NISDOMAIN=-NO- TIMESYNC=-YES- QTSSERVER=-NO- WEBSERVER=-NO- SMBSERVER=-NO- SNMPSERVER=-NO- SPOTLIGHT=-YES-
Name it "hostconfig" (no quotes, no extension) and place it in your AppleTVUpdate folder on your desktop.
scp -1 -r ~/Desktop/AppleTVUpdate/hostconfig frontrow@AppleTV.local:~
On AppleTV (Must be a AppleTV Version1.0 Factory box to work - if yours came with 1.1 or 2.0 pre-installed, you may need to do the steps 15 lines below):
sudo mount -uw / sudo touch /.readwrite cd ~ sudo dd if=/dev/disk0s2 of=recovery.dmg bs=1m hdiutil mount recovery.dmg hdiutil attach -owners on /Volumes/Recovery/OS.dmg sudo cp -pRvn /Volumes/OSBoot\ 1/* / echo -ne 'Installing the Filesystem Extensions...\n' sudo ln -s /System/Library/Filesystems/AppleShare/afpfs.kext /System/Library/Filesystems/afpfs.fs echo -ne 'Installing into /usr/sbin...\n' sudo ln -s /System/Library/CoreServices/AppleFileServer.app/Contents/MacOS/AppleFileServer /usr/sbin/AppleFileServer echo -ne 'Updating /etc/hostconfig to start AFP at boot...\n' echo -en 'AFPSERVER=-YES-\nAUTHSERVER=-NO-\nAUTOMOUNT=-YES-\nCUPS=-AUTOMATIC-\nNFSLOCKS=-AUTOMATIC-\nNISDOMAIN=-NO-\nTIMESYNC=-YES-\nQTSSERVER=-NO-\nWEBSERVER=-NO-\nSMBSERVER=-NO-\nSNMPSERVER=-NO-\nSPOTLIGHT=-YES-' sudo mv hostconfig /etc/hostconfig sudo chown root:wheel /etc/hostconfig echo -ne 'Done!\n'
For Apple TV OTB 1.1 or later: If you have a recovery partition of 1.1 or later, look for OS.dmg from a factory 1.0 AppleTV (find a friend with one) and copy it into the same folder as afpinstall.sh and comment out these:
cd ~ sudo dd if=/dev/disk0s2 of=recovery.dmg bs=1m sudo hdiutil mount recovery.dmg
Make sure the path to OS.dmg is correct, then run sudo sh afpinstall.sh
--Yargok 18:49, 5 March 2008 (CET) Does anyone have a similar procedure for those who have a recovery partition of 1.1?
--pheno 14:20, 12 March 2008 (CET) Please note if you will use the command "sudo cp -pRvn /Volumes/OSBoot\ 1/* /" to run aftwards "/usr/sbin/diskutil repairPermissions"
--Elchubi 09:10, 6 April 2008 (CEST) With the "owners on" flag when attaching the OS.dmg, the repairPermissions it is no longer required. Take 2 plus all the 1.0 files ! :)
6) Reboot AppleTV
a) on AppleTV:
sudo reboot
7) Install USB
a) on Mac:
Download Take 2 DMG and mount it.
If you are using 2.0.1 then Download 2.0.1 DMG
Download the kernel patcher for intel mac (or follow similar steps using kernel patcher for windows), and extract the three files into a folder
Copy the file mach_kernel.prelink from the mounted image (it is in the root directory) and place it in the same folder as the kernel patcher files you just extracted.
Open up terminal and do the following:
cd (to the directory you have the kernel patching files) ./do_usb_patch.sh
--Bloo 08:49, 9 March 2008 (CET) Running ./prelink_tool -d mach_kernel.prelink mach_kernel_patched.bin fails with: Bus error.. thoughts?
--blues 08:46, 16 March 2008 (CET) Problem occurs because of binary incompatibility with the tools. One solution is to recompile source on your system.
2.0.1 Note: the offsets have changed in the 2.0.1 prelink, thanks to some notes from jphelp32 on the forum the following will be sufficient changes to the do_usb_patch.sh script
# # ==== patch the decompressed kernel # echo ======== patch kernel ========= ./poke mach_kernel_patched.bin 0x52055e 0x75:0x75 0x34:0x30 if [ $? -ne 0 ]; then exit 1; fi
./poke mach_kernel_patched.bin 0x52123E 0x75:0x75 0x34:0x30 if [ $? -ne 0 ]; then exit 1; fi
./poke mach_kernel_patched.bin 0x520576 0x75:0x75 0x1c:0x18 if [ $? -ne 0 ]; then exit 1; fi
./poke mach_kernel_patched.bin 0x521256 0x75:0x75 0x1c:0x18 if [ $? -ne 0 ]; then exit 1; fi
The 2.0.1 patch is tested and works! --Nito 12:28, 1 April 2008 (CEST)
Once the kernel is patched, rename it to mach_kernel.prelink and place it in your AppleTVUpdate folder on your desktop
scp -1 -r ~/Desktop/AppleTVUpdate/mach_kernel.prelink frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/turbo_kext_enabler.bin frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/IOUSBMassStorageClass.kext frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/smbfs.kext frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/udf.kext frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/msdosfs.kext frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/ntfs.kext frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/IOStorageFamily.kext frontrow@AppleTV.local:~ scp -1 -r ~/Desktop/AppleTVUpdate/IOSCSIArchitectureModelFamily.kext frontrow@AppleTV.local:~
b) on AppleTV:
sudo mv /mach_kernel.prelink /mach_kernel.prelink.bak sudo mv ~/mach_kernel.prelink /mach_kernel.prelink sudo mv ~/turbo_kext_enabler.bin /sbin/ sudo mv ~/IOUSBMassStorageClass.kext /System/Library/Extensions/ sudo mv ~/smbfs.kext /System/Library/Extensions/ sudo mv ~/udf.kext /System/Library/Extensions/ sudo mv ~/msdosfs.kext /System/Library/Extensions/ sudo mv ~/ntfs.kext /System/Library/Extensions/ sudo mv ~/IOStorageFamily.kext /System/Library/Extensions/ sudo mv ~/IOSCSIArchitectureModelFamily.kext /System/Library/Extensions/ sudo chown -R root:wheel /System/Library/Extensions/*.kext sudo chmod -R 755 /System/Library/Extensions/*.kext sudo chmod 755 /sbin/turbo_kext_enabler.bin sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true
8) Install MacFUSE/sshfs
This will allow you to access appletv files from your mac. If you have an external hard disk, instead of attaching it to your machine, attach it to your apple tv. Your apple tv can access the media and your laptop can access the files wirelessly from anywhere. Also avoids using the command line and good for copying files back to your laptop from your apple tv.
Install macfuse on Mac from here
Restart machine
Install sshfs on Mac from here
One problem with Take 2 is that installing kerberos is a big pain, so you always need to use ssh v1. To make sure sshfs understands this, edit your ~/.ssh/config (or create it) and add
Host appletv.local HostName appletv.local User frontrow Protocol 1
After that, you can run sshfs and in connect dialog, put in hostname as AppleTV.local, password as frontrow. I put in the optional root dir as / but you can leave it empty and it will default to the home dir on apple tv.
9) Install mount_smbfs
a) on Mac:
scp -1 -r ~/Desktop/AppleTVUpdate/mount_smbfs frontrow@AppleTV.local:~
b) on AppleTV:
sudo mv ~/mount_smbfs /sbin/ sudo chown root:wheel /sbin/mount_smbfs sudo chmod +s /sbin/mount_smbfs
10) Create rc.local
a) on Mac:
Create a text file with the following contents:
# rc.local # enable USB /sbin/turbo_kext_enabler.bin /sbin/kextload -v /System/Library/Extensions/IOUSBMassStorageClass.kext /sbin/kextload -v /System/Library/Extensions/smbfs.kext /sbin/kextload -v /System/Library/Extensions/udf.kext /sbin/kextload -v /System/Library/Extensions/msdosfs.kext /sbin/kextload -v /System/Library/Extensions/ntfs.kext # enable cron /usr/sbin/cron
Name it "rc.local" (no quotes) and place it in your AppleTVUpdate folder on your desktop.
scp -1 -r ~/Desktop/AppleTVUpdate/rc.local frontrow@AppleTV.local:~ scp -1 /usr/bin/crontab frontrow@AppleTV.local:~ scp -1 /usr/bin/nano frontrow@AppleTV.local:~ scp -1 /usr/sbin/cron frontrow@AppleTV.local:~
b) on AppleTV:
sudo mv ~/rc.local /etc/ sudo chown root:wheel /etc/rc.local sudo mv ~/crontab /usr/bin sudo mv ~/nano /usr/bin sudo mv ~/cron /usr/sbin sudo chown root:wheel /usr/bin/crontab sudo chown root:wheel /usr/bin/nano sudo chown root:wheel /usr/sbin/cron sudo chmod 4555 /usr/bin/crontab sudo chmod 555 /usr/bin/nano sudo chmod 555 /usr/sbin/cron
11) Enable VNC
a) on AppleTV:
echo 71463E00FFDAAA95FF1C39567390ADCA > /Library/Preferences/com.apple.VNCSettings.txt
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \ -configure -clientopts -setvnclegacy -vnclegacy yes
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \ -activate -configure -access -on -users frontrow -privs -all -restart -agent -menu
--PatentBoy 01:15, 28 March 2008 (CET) Where can I grab the ARDAgent.app? From Tiger or Leopard install, for example?
--Kheops 18:22, 28 March 2008 (GMT+7) You can copy the RemoteManagement folder from the recovery.dmg:
sudo mount -uw / sudo touch /.readwrite cd ~ sudo dd if=/dev/disk0s2 of=recovery.dmg bs=1m sudo hdiutil mount recovery.dmg sudo hdiutil mount /Volumes/Recovery/OS.dmg sudo cp -pr /Volumes/OSBoot\ 1/System/Library/CoreServices/RemoteManagement/ /System/Library/CoreServices/ sudo cp -pr /Volumes/OSBoot\ 1/System/Library/Perl/ /System/Library/Perl/ sudo cp -pr /System/Library/Perl/Extras/5.8.6/ /System/Library/Perl/5.8.6/
Then you will be able to run the 'kickstart' commands above, but still I didn't succeed to connect (the ARDAgent is running, but I have "connection refused(16001)" from my VNC client
12) Disable Updates
To prevent future updates from breaking your custom Apple TV don't forget to add the Apple update site to your hosts file as a loop back:
a) on AppleTV:
sudo bash -c 'echo "127.0.0.1 mesu.apple.com" >> /etc/hosts'
13) Reboot the AppleTV
a) on AppleTV:
sudo reboot
Watchdog
--Elchubi 09:55, 6 April 2008 (CEST) Success! Watchdog is on the kernel... Just replace /mach_kernel.prelink with the one from 1.0 and follow the same steps from that version. Some things stop working like AirTunes, so it is a tradeoff
Aftermath
At this point your AppleTV should come back up with full 1080i/1080p support, AirTunes working, HD Rentals working, AFP running, USB working (and the drive should automount), ATVFiles should be running, and ssh should be working. You can access your apple tv from your laptop just like some other shared disk.