2010-10-12, 05:58
A few months back I promised I would post my notes on how to lose the boot stick at the end of the install. I think most people only use the apple for XBMC so it’s nice to have the USB port for a Bluetooth transmitter for the keyboard and mouse or a remote. I just finished this on my second Apple TV and though I would document it and post for everybody since I could never get any good info on this topic and one externally hosted site that had any is gone
Assumtions
You Have followed the guide on installing XBMC on the AppleTV
http://wiki.xbmc.org/index.php?title=HOW...he_AppleTV
and have modified the Apples Partition and installed ubuntu and XBMC.
You currently leave the USB Thumbdrive\Stick in the Apple TV for it to boot.
See http://code.google.com/p/atv-bootloader/...USBPenBoot
and you would like to loose the USB stick and use the port for another device.
Theory
On The Apple:
1) In the root is the apple kernel "mach_kernel"
2) In System/Library/CoreServices is the Apple logo file "BootLogo.png"
On The USB-Thumb:
1) In the root is the kernel "mach_kernel"
2) In the root is the penguin logo file "BootLogo.png"
To Boot the Apple:
In System/Library/CoreServices is the com.apple.Boot.plist file which is an XML file which the apple tv uses to determine which kernel to start.
So if we move our kernel to the root and put our trusty penguin in place we can completely loose the stick and our thumb image will boot off the hard drive and then transfer to the real linux kernel on the newer partition.
To not delete or change the original files, if we rename our kernel file and logo file, we can place our files next to the originals - now it's totally up to the plist files data on how the apple will boot
To make things cool we could have Three plist files (actual,Apple,Linux) and if we copy over the "Actual" one with either the Apple or Linux version - the apple TV will show either logo and boot either kernel.
So let’s preserve the original Plist file copying it to a plist.atv and then copy it again to a plist.linux which we can then edit with nano or vi to change the parameters
Boot the AppleTV from USB-Thumb and SSH in as root account (not xbmc)
Mount the apple os (typically sda3)
mkdir /tmp/atv
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
The Above mount might fail depending on how the iTV was shut down. OSx Journal must be in a clean state for Linux to force mount it. For me the "Parted" command fixed the journal when the partitions were resized, others who have followed this guide disabled the journaling by following http://www.ehow.com/how_2061559_enab...ng-mac-os.html
I hope that it mounts cleanly if not, you can also try booting the apple tv again and try to shut it down again.
If any other Linux wizards know any other cheats to clean the filesystem under ubuntu like "Parted" please let me know.
Create two copies of the original Plist file
cd /tmp/atv/System/Library/CoreServices
sudo cp com.apple.Boot.plist com.apple.Boot.plist.atv
sudo cp com.apple.Boot.plist com.apple.Boot.plist.linux
cd
Now Edit the .linux version
sudo nano /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux
change mach_kernel.prelink to mach_kernel_linux (All Lower Case - note the _ )
change BootLogo.png to BootLogoLinux.png (Note Capital L)
change <string></string> to <string>atv-boot=auto video=vesafb</string>
(exit and save)
Mount the patch USB-Thumb(typically sbd2)
mkdir /tmp/thumb
sudo mount /dev/sdb2 /tmp/thumb
Move the Thumbs kernel and logo to atv root under new names
sudo cp /tmp/thumb/mach_kernel /tmp/atv/mach_kernel_linux
sudo cp /tmp/thumb/BootLogo.png /tmp/atv/System/Library/CoreServices/BootLogoLinux.png
cd
Lets now copy the modified plist.linux over the actual
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist
Close our mount points
sudo umount /tmp/thumb
sudo umount /tmp/atv
If you pull the USB-Thumb and reboot the Apple TV should boot Directly into Linux\XBMC
Now I have some scripts both for XBMC and ATV to automate the switching using the GUIs which I will try to post,
While I finish the scripts and decide how to post them public, here is how to switch the boot
To Boot Linux\XBMC
(Using USB-Thumb boot)
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist
sudo umount /tmp/atv
(Using a cracked appletv, telnet\ssh into osx)
cp /System/Library/CoreServices/com.apple.Boot.plist.linux /System/Library/CoreServices/com.apple.Boot.plist
To Boot Apple TV - (ssh \ telnet into linux)
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.atv /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist
sudo umount /tmp/atv
Hope it helps
Mike Pisano
Assumtions
You Have followed the guide on installing XBMC on the AppleTV
http://wiki.xbmc.org/index.php?title=HOW...he_AppleTV
and have modified the Apples Partition and installed ubuntu and XBMC.
You currently leave the USB Thumbdrive\Stick in the Apple TV for it to boot.
See http://code.google.com/p/atv-bootloader/...USBPenBoot
and you would like to loose the USB stick and use the port for another device.
Theory
On The Apple:
1) In the root is the apple kernel "mach_kernel"
2) In System/Library/CoreServices is the Apple logo file "BootLogo.png"
On The USB-Thumb:
1) In the root is the kernel "mach_kernel"
2) In the root is the penguin logo file "BootLogo.png"
To Boot the Apple:
In System/Library/CoreServices is the com.apple.Boot.plist file which is an XML file which the apple tv uses to determine which kernel to start.
So if we move our kernel to the root and put our trusty penguin in place we can completely loose the stick and our thumb image will boot off the hard drive and then transfer to the real linux kernel on the newer partition.
To not delete or change the original files, if we rename our kernel file and logo file, we can place our files next to the originals - now it's totally up to the plist files data on how the apple will boot
To make things cool we could have Three plist files (actual,Apple,Linux) and if we copy over the "Actual" one with either the Apple or Linux version - the apple TV will show either logo and boot either kernel.
So let’s preserve the original Plist file copying it to a plist.atv and then copy it again to a plist.linux which we can then edit with nano or vi to change the parameters
Boot the AppleTV from USB-Thumb and SSH in as root account (not xbmc)
Mount the apple os (typically sda3)
mkdir /tmp/atv
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
The Above mount might fail depending on how the iTV was shut down. OSx Journal must be in a clean state for Linux to force mount it. For me the "Parted" command fixed the journal when the partitions were resized, others who have followed this guide disabled the journaling by following http://www.ehow.com/how_2061559_enab...ng-mac-os.html
I hope that it mounts cleanly if not, you can also try booting the apple tv again and try to shut it down again.
If any other Linux wizards know any other cheats to clean the filesystem under ubuntu like "Parted" please let me know.
Create two copies of the original Plist file
cd /tmp/atv/System/Library/CoreServices
sudo cp com.apple.Boot.plist com.apple.Boot.plist.atv
sudo cp com.apple.Boot.plist com.apple.Boot.plist.linux
cd
Now Edit the .linux version
sudo nano /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux
change mach_kernel.prelink to mach_kernel_linux (All Lower Case - note the _ )
change BootLogo.png to BootLogoLinux.png (Note Capital L)
change <string></string> to <string>atv-boot=auto video=vesafb</string>
(exit and save)
Mount the patch USB-Thumb(typically sbd2)
mkdir /tmp/thumb
sudo mount /dev/sdb2 /tmp/thumb
Move the Thumbs kernel and logo to atv root under new names
sudo cp /tmp/thumb/mach_kernel /tmp/atv/mach_kernel_linux
sudo cp /tmp/thumb/BootLogo.png /tmp/atv/System/Library/CoreServices/BootLogoLinux.png
cd
Lets now copy the modified plist.linux over the actual
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist
Close our mount points
sudo umount /tmp/thumb
sudo umount /tmp/atv
If you pull the USB-Thumb and reboot the Apple TV should boot Directly into Linux\XBMC
Now I have some scripts both for XBMC and ATV to automate the switching using the GUIs which I will try to post,
While I finish the scripts and decide how to post them public, here is how to switch the boot
To Boot Linux\XBMC
(Using USB-Thumb boot)
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.linux /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist
sudo umount /tmp/atv
(Using a cracked appletv, telnet\ssh into osx)
cp /System/Library/CoreServices/com.apple.Boot.plist.linux /System/Library/CoreServices/com.apple.Boot.plist
To Boot Apple TV - (ssh \ telnet into linux)
sudo mount -t hfsplus -o rw,force /dev/sda3 /tmp/atv
sudo cp /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist.atv /tmp/atv/System/Library/CoreServices/com.apple.Boot.plist
sudo umount /tmp/atv
Hope it helps
Mike Pisano