• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 8
[ATV1] HOW-TO install Sam's image to internal Apple TV harddrive
#1
This guide is basicly the install guide for pin87a's image which you can find here:

http://forum.xbmc.org/showthread.php?tid=86108

So kudos to Bandit Kaine. It is slightly adjusted to work for Sam's image. Feel free to correct any mistakes you see, I know this worked for me.
First you need to create a bootable usb stick. You can download sam's image here:

http://code.google.com/p/crystalhd-for-a...253Dclosed

You can use usbit on windows to restore it to a usb stick. On a mac you extract the image to your user folder (\username\) open the terminal and use this command (make sure that disk1 is indeed your usb drive, you can check via the diskutility):

Code:
dd if=usb.img of=/dev/disk1 bs=8192

#for me it took a really long time, but it worked after all (+30 min)
Insert the usb stick in the apple tv and see if it boots, this can take a long time since sam's image downloads the latest stable release of xbmc and the broadcom drivers. If XBMC starts up you should check your ip adress (hold the menu button on your apple remote in the main menu and choose system info, you'll find it there somewhere).

Now use a ssh client to connect to your apple tv, the easiest to use on windows is putty (google it), on the mac I think you can use the terminal (not sure how) or download another client.
The password and username are both 'atv'.#

#This guide is only if you want to erase the complete hdd, if you want to keep the apple tv OS and still install to your hdd you should check http://forum.xbmc.org/showpost.php?p=682...tcount=152 where Feikenberg explains how its done without removing the Apple tv OS.
Anything that is after a # sign are comments anything that DOES NOT start with a # is commands you have to enter in the putty SSH window. You can copy and right click paste them into the window. Whenever it asks for password remember its xbmc.

After entering a command do not continue to the next one until you have
"atv@appleTV:~$" indicating the previous command is finished. Some commands take time and will look like this while it is executing them.#

#Zero Apple TV Hard Drive, This will Wipe All Partitions from the drive#

Code:
sudo dd if=/dev/zero of=/dev/sda bs=4096 count=1M

#Install Patched Parted, HFS Tools#

Code:
sudo apt-get install build-essential patch
wget [url]http://atv-bootloader.googlecode.com/files/hfs_support-1.0.tar.gz[/url]
tar -xzf hfs_support-1.0.tar.gz
cd hfs_support/
sudo ./build_diskdev_cmds.sh
cd
sudo /usr/bin/apt-get remove parted
wget [url]http://atv-bootloader.googlecode.com/files/parted-1.8.8-atv.tar.gz[/url]
tar -xzf parted-1.8.8-atv.tar.gz
cd parted

#Read the Comment after this command#
Code:
sudo nano ./install_parted.sh

###Scroll through the text and find the line that says "./configure --enable-static and change it to


./configure CFLAGS="-fgnu89-inline" --enable-static=yes


, CTRL O to Write Out and then CTRL X to exit###

Code:
sudo ./install_parted.sh
sudo ln -s /usr/local/sbin/parted /sbin/parted

#Verify you have parted version 1.8.8 If yes continue, if anything else repeat steps from "Install Patched parted"#

Code:
parted --version

##Initiate GPT Partition##
Code:
sudo parted -s /dev/sda mklabel gpt

##Check Drive Names using parted print all##

Code:
sudo parted
print all
#I got a warning with the question to fix the partion table here, instead of later according to other guides. I just went ahead and fixed it. After that you should 3 partitions: nr1: hfs+, nr2: swap, nr3: ext3 partition.#

#In order to use this guide further I had to make a few adjustments, since Sam's image only has 3 partitions and the second partition is the swap partition.##

Code:
quit

#Clone USB Drive to Apple TV Hard Drive, This Clones the USB Drive and all partitions to the Internal Apple TV Hard Drive, This May take a few minutes#
Code:
sudo dd if=/dev/sdb of=/dev/sda bs=4096
#takes a long time

Code:
sudo reboot

#AFTER REBOOT the connection will close, close the putty window, check your TV, once its back to the XBMC Home Screen Re-Open putty and recconect using the same IP Address as before, user is the same as password (xbmc)#

Code:
sudo fsck.hfsplus /dev/sda1
sudo mkdir tmp
sudo mount /dev/sda1 tmp

#Read Comment after this command to know what to do#
Code:
sudo nano tmp/com.apple.Boot.plist
###Change the line near the bottom that says /dev/sdbX to /dev/sdaX, Just change the b to an a, leave the number the same. press CTRL X to exit, make sure you choose Yes to save changes###
#You also need to edit your /etc/fstab, it doesnt really matter when you do it, since you copy it to the hdd later anyway
Code:
sudo nano /etc/fstab
###Same as before , change /dev/sdbX to /dev/sdaX (4 times in the file, 2 are only comments though), Just change the b to an a, leave the number the same. press CTRL X to exit, make sure you choose Yes to save changes###
Code:
sudo reboot
###If you are not using the internal hard drive for storage you can stop now and remove the USB stick from the Apple TV, The apple tv will now boot from the hard drive and no longer needs the USB Stick. The Hard Drive will be recognized as a total of 4GB since we cloned it from the USB stick.
If you want all the space of your Apple TV Hard Drive LEAVE THE USB STICK PLUGGED IN and continue below after reboot, Close the putty window and re-open/reconnect using the same IP Address and user/password as before once its back to the XBMC Home Screen###
Code:
sudo parted
sudo select /dev/sda
#Parted might give you a message saying the GPT Partition table needs to be fixed, type "fix" and press enter, I had this message earlier#
Code:
sudo parted
sudo rm 3
quit
##Since we removed partition 3 (with most of the files) we need to make a new partition, only now its a lot bigger. You need to put 40GB if you have a 40GB drive on the end of the line, for 160GB you use 160GB Tongue, etc. After we do that we copy the contents of our third partition on the usb drive to the new partition and we make it ready to use.

Code:
sudo parted -s /dev/sda mkpart primary ext3 573m 40GB
sudo cp /dev/sdb3 /dev/sda3
sudo e2fsck -f /dev/sda3
sudo resize2fs /dev/sda3
sudo tune2fs -j /dev/sda3
sudo reboot

#When the Apple TV Starts Rebooting wait until the screen turns black and remove the USB Drive and it should boot from the Internal Hard Drive and you will have the full size of your hard drive available to you for files, you can now also close putty or any other ssh terminal you are using#

If your not comfortable to install it to your hdd you can wait a few weeks, since Sam will come up with a fully automatic way to install it. Its not really hard though Smile
Reply
#2
Although there are some other guides to be found I thought I'd still share this, since for me (as linux noob) it was a lot of work figuring everything out and maybe I help some of you guys with it.

The playback with Sam's image for me is a lot better then dharma 10 (final) and broadcom drivers 3.80 on pin87a's image. Since it's installed to my hdd I have also a much smoother experience with navigating all the menu's. I did edit my advancesettings.xml to enable dds:

Code:
<advancedsettings>
  <useddsfanart>true</useddsfanart>
</advancedsettings>

<gputempcommand>
echo "$(nvidia-settings -tq gpuCoreTemp) C"
</gputempcommand>
Reply
#3
Thanks for writing this guide, I hope to give it a go this week. Do you know if there is any way to put the Apple TV OS back at a later date in case I wanted to sell it for example?
Reply
#4
can you tell me which image it is exactly to download? i click your link but i only see installer.img.gz which is 10.3 MB. a few days ago i put this image xbmc-r28256-crystalHD-1.0.3-alsa-1.019-nvidia100.14.19-hardy-cust_machkernel-2.6.24.27.img onto an 8GB usb drive but have had no luck installing it to hdd. i got XBMC updated on it no problem and had to recompile atvclient from source to get my Harmony (PLEX setttings ) working So I have a USB stick with settings pristine for me that i would like to put down to the HDD. i created an image from my USB using USBINIT just in case i mess things I have a good one to go back to. also, as a side note: that image i wrote to my usb has 4 partitions. i've tried using Bandits tut for the 4 partitions adjusting accordingly and always fails to boot looking for a rootfs.

so i guess i'm pretty lost Smile

here's what my partition tables look like:

Quote:Number Start End Size File system Name Flags
1 20.5kB 210MB 210MB fat32 EFI System Partition boot
2 210MB 236MB 26.1MB hfs+ Recovery atvrecv
3 236MB 2736MB 2500MB ext3
4 2736MB 3248MB 512MB linux-swap

so instead of sudo fsck.hfsplus /dev/sda1, i'm doing sudo fsck.hfsplus /dev/sda2 etc.

i think i burnt myself out just getting my remote working and i'm probably missing some crucial step.
Reply
#5
ok so after some very heavy modifications to the guide i was able to install sams older image to my hdd. what i did was ended up deleting all partitions except the one with the bootflag. afterwards i just replaced all instances of sda3 with my ext partition that i created. i just needed to create the swap now. but it's all working. when it's all said and done i enjoy all this Smile i can't wait for the new image with the hdd installer Smile but i do enjoy all the command line stuff.

Quote:Disk /dev/sda: 40.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
2 210MB 236MB 26.1MB hfs+ Recovery atvrecv
1 573MB 40.0GB 39.4GB ext3 primary

question: how important is the fstab? all my lines are commented out but my install is working just fine (just need to recreate the swap partition.)
Reply
#6
Roders Wrote:Thanks for writing this guide, I hope to give it a go this week. Do you know if there is any way to put the Apple TV OS back at a later date in case I wanted to sell it for example?

Here is a guide to backup and restore the ATV. It even claims that it would be possible to restore when you forgot to backup!

http://code.google.com/p/atv-bootloader/wiki/ATVBackup
Reply
#7
so i decided to redo the entire process, this time erasing partitions 3 and 4 only. then recreating partition 3, copying over all the data and editing files accordingly. after which i just created partition 4. everything working perfectly, with partitions numbered as they should. you're guide was extremely helpful in my finally getting this image up and running on my hdd.

thanks again!


Quote:Partition Table: gpt

Number Start End Size File system Name Flags
1 20.5kB 210MB 210MB fat32 EFI System Partition boot
2 210MB 236MB 26.1MB hfs+ Recovery atvrecv
3 573MB 38.0GB 37.4GB ext3 primary
4 38.0GB 40.0GB 2008MB linux-swap
Reply
#8
Thanks for the guide Metasdah.

I was fiddeling with upgrading the Ubuntu packages and something happened (I think the Kernel got upgraded) and my Apple TV Lost sound the the display was pink/Purple.

Anyway I tried to fix it but no go since I do not have time s the whole family uses the apple TV all the time.

I used your guide which was helpful. I though I might add something about this though.

It is better to create a 4th partition with the video files in it. It takes a long time to copy the files to an external media and back again.

If you use 4 partitions (and fiddle like me), it will be easier to just restore the 3rd partition which is the main system and it should not take long.

Just a thought though. I am still in the process of doing this.

K.
Reply
#9
Thanks for the great guide.

I'm stuck with a blank screen though.

I successfully made the USB stick, and the ATV successfully boots and scrolls through the entire Linux-y process, but then it stops on the "network information" screen for quite a while - like 10 minutes.

Finally it goes away and all I've got is a blank screen and a flashing amber light with no sign that anything's going on.

I can't SSH in or anything. It's hard-wired with 100Mbps Ethernet, and I've got an IP address and everything.

I'm plugged-in via component, in case that matters.

Doesn't the flashing amber light mean it's trying to boot?

Any suggestions?

-Wes
Reply
#10
Are you using a 4 GB stick? If yes, try a bigger one.
Reply
#11
feikenberg Wrote:Are you using a 4 GB stick? If yes, try a bigger one.

Using 16GB stick Sad

It does boot, and seems to go through the Linux motions fine, for a while...

I see "by Sam Nazarko" and all that jazz.
Reply
#12
My software version is 1.0.

Does that matter?
Reply
#13
@waldo22

http://download.stmlabs.com/atv-images/u...ardy/core/

Changed the project URL. The images here are updated.
Reply
#14
Metsadah Wrote:
Code:
sudo parted
print all
#I got a warning with the question to fix the partion table here, instead of later according to other guides. I just went ahead and fixed it.

Just so no one else does the stupid thing I did, I didn't read the parted prompts carefully enough. There were TWO of them.

One asked me if I wanted to move the GPT table to the front of the drive, and the SECOND asked if I wanted to "fix" the drive so that it took up the entire drive space.

I said "fix" without thinking.

What I actually did was make my 4096MB drive into a 8GB drive, when we set the internal hard drive to 4096 MB in the first step.

This made it too small to accept the clone from the USB disk, and I had to start all over.

Stoopid me.

-Wes
Reply
#15
Sam.Nazarko Wrote:@waldo22

http://download.stmlabs.com/atv-images/u...ardy/core/

Changed the project URL. The images here are updated.

Much appreciated Sam, everything went well with this one...

-Wes
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
[ATV1] HOW-TO install Sam's image to internal Apple TV harddrive2