[LINUX] HOW-TO install Crustalbuntu minimal image to internal Apple TV harddrive
#1
Thumbs Up 
I decided to put this guide together for others who like me who wanted the image loading off the internal hard drive and not a USB. There may be an easier/faster way to do it then the way I did it, but it works and i posted all the commands and steps exactly step by step as i did it. I did it twice using this very same post to make sure i didn't miss anything.

FOLLOWING MY GUIDE WILL REMOVE THE APPLE TV OS FROM THE HARD DRIVE AND WILL ONLY LEAVE THE MINIMAL UBUNTU IMAGE. READ (GOOGLE) ATV-BOOTLOADER PAGE FOR INSTRUCTIONS ON HOW TO BACKUP OR RESTORE THE APPLE TV OS IF YOU EVER WANT TO GO BACK. I USED WINDOWS 7 AND WINSCP + PUTTY TO ENTER ALL THE COMMANDS. YOU CAN DO THE SAME IN AN SSH TERMINAL WINDOW ON UBUNTU OR ANY OTHER LINUX DISTRO WITH A TERMINAL WINDOW.

You will need a 4GB or bigger USB Flash Drive, some flash drives may not be bootable, I used a corsair voyager mini, my HP v125w did not work for this, patriot xporter XT 16GB also worked.

Read the thread about the image if you want to know what it includes. It is Crustalbuntu minimal image
http://forum.xbmc.org/showthread.php?tid=74992

#First thing you have to do is download pin87's image from any of the following links listed on the first page of this thread.
download:
http://www.surfanddestroy.org/resources/...256-R3.rar
http://meaninglesswebsite.com/atv-usbboo...256-R3.rar
http://stmlabs.com/resources/atv-usbboot...256-R3.rar

On windows download USB Image Tool to load the image into your 4gb or great USB drive.
Download USB Image Tool Link
http://www.alexpage.de/download/usbit/usbit.zip

1. Extract USB Image Tool Onto A Folder on your Desktop
2. Open USB Image Tool.exe
3. In the dropdown menu select Device Mode
4. Click on your device on the left hand side
Image

I Reccomend you make an initial backup image of your Unmodified USB Drive incase something goes wrong and you have to restore it after you put the Linux image on it to make it useable again.

4a. Click the Backup button, enter a name for the backup of your USB Drive and save it to your desktop.

5. Click the restore button and select the Minimal ubuntu image (atv-usbboot-xbmcbuntu-crystalhd-hdmi-28256-R3.img) that you downloaded earlier. Let it image to your USB device, this may take some time.
6. Your Linux Apple TV USB Drive is ready.
7. Connect the patchstick to your Apple TV and power it on (unplug, plug)
8. Let it do it's thing (may take a few moments)
9. Once you are at the XBMC Home Screen you are ready to begin copying the USB Image to your Apple TV Hard Drive
10. Leave the Apple TV On the XBMC Home Screen During the Entire Process.
11. Download Putty.exe (SSH Client for windows) from http://the.earth.li/~sgtatham/putty/late.../putty.exe
12. Open putty.exe and you will get the following screen
Image
13. Enter the IP Address of your Apple TV (You may have to look in your router Client list for this.
14. Click Open and you will get a command window saying "login as" enter xbmc for user and xbmc for password
so
xbmc
xbmc
15. If you logged in succesfully you should now have a window that looks like this
Image
16. You can continue following the instructions below.

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
"xbmc@appleTV:~$" indicating the previous command is finished. Some commands take time and will look like this while it is executing them
Image

Do NOT continue writing commands until it is done and the window looks like this:
Image

Each line is 1 command and must be entered by line. Some commands will ask for your input, such as do you want to continue, or some will ask you to press CTRL + O to save a file etc. Make sure you type "y" and press enter and CTRL + O + Enter and then CTRL + X to exit accordingly. You will see as you get to them.

################################################################################################################################################

#Copy Minimal Ubuntu to Apple TV Hard Drive. This will DELETE the Apple TV OS and leave ONLY the linux installation. Read ATV-BOOTLOADER page for instructions on backing up and restoring the original Apple TV OS and how to Restore if you didn't backup the Apple TV OS#

All the commands are inside command quotes line by line as you have to enter them into SSH, comments are outside the CODE marked with a #

#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 http://atv-bootloader.googlecode.com/files/hfs_support-1.0.tar.gz
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 http://atv-bootloader.googlecode.com/files/parted-1.8.8-atv.tar.gz
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
Code:
./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
##Here Check that the Apple TV Hard Drive is named /dev/sda and that the USB Stick is /dev/sdb, all the commands below this are based on apple tv hard drive being /dev/sda and usb stick being /dev/sdb##
Image

#Once you verify the names quit parted with the following command
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
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/sda2
sudo mkdir tmp
sudo mount /dev/sda2 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. CTRL O + Enter to write out and CTRL X to exit###

Code:
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 will give you a message saying the GPT Partition table needs to be fixed, type "fix" and press enter#
#quit parted using below command#
Code:
quit
sudo swapoff /dev/sda4
sudo parted
sudo rm 3
sudo rm 4
quit


##We are not going to create new partitions using the full size of the hard drive and copy the files from the USB partitions into the corresponding hard drive partitions.
The Below Examples are for 40GB Hard Drives. If you have 60GB You would put 58.9GB and 60.0GB Accordingly. 160GB Hard Drive would me 158.9GB and 160.0GB etc etc the first command is always from 236m as that is where the 2nd partition (Recovery) ends. the end sector is 1.1GB less then your hard drive. The 2nd Commands Starts where the first command left off and the final sector is the final size of your hard drive as you can see below##

Code:
sudo parted -s /dev/sda mkpart primary ext3 236m 38.9GB
sudo cp /dev/sdb3 /dev/sda3
sudo parted -s /dev/sda mkpart primary linux-swap 38.9GB 40.0GB
sudo cp /dev/sdb4 /dev/sda4
sudo e2fsck -f /dev/sda3
sudo resize2fs /dev/sda3
sudo tune2fs -j /dev/sda3
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#
Reply


Messages In This Thread
[LINUX] HOW-TO install Crustalbuntu minimal image to internal Apple TV harddrive - by Bandit_Kaine - 2010-11-25, 09:15
[No subject] - by thnmnt - 2010-11-25, 18:08
[No subject] - by xeonicxpression - 2010-11-26, 08:09
Resizing internal disk - by moonwalker - 2010-11-26, 19:18
[No subject] - by JDizzy - 2010-11-26, 19:33
[No subject] - by ddingle - 2010-11-26, 23:41
[No subject] - by DrPepper - 2010-11-27, 00:21
[No subject] - by ddingle - 2010-11-27, 02:39
[No subject] - by mbetter - 2010-11-27, 03:08
[No subject] - by mbetter - 2010-11-27, 03:45
[No subject] - by mbetter - 2010-11-27, 03:49
[No subject] - by ddingle - 2010-11-27, 04:17
[No subject] - by ddingle - 2010-11-27, 04:23
[No subject] - by davilla - 2010-11-27, 09:15
[No subject] - by kkillebrew - 2010-11-27, 19:32
[No subject] - by davilla - 2010-11-28, 02:44
[No subject] - by jthunder - 2010-11-28, 03:43
[No subject] - by JDizzy - 2010-11-28, 05:50
[No subject] - by mbetter - 2010-11-29, 02:34
[No subject] - by JDizzy - 2010-11-29, 02:44
[No subject] - by mbetter - 2010-11-29, 05:29
[No subject] - by basht - 2010-11-29, 20:33
[No subject] - by Sam.Nazarko - 2010-11-29, 21:43
[No subject] - by JDizzy - 2010-11-30, 01:22
[No subject] - by kevthemilkman - 2010-11-30, 05:34
[No subject] - by mbetter - 2010-11-30, 05:59
[No subject] - by JDizzy - 2010-11-30, 06:04
[No subject] - by jjhdtv - 2010-11-30, 06:41
[No subject] - by JDizzy - 2010-11-30, 08:14
[No subject] - by Philmatic - 2010-11-30, 08:50
[No subject] - by curlyjs - 2010-11-30, 12:47
[No subject] - by JDizzy - 2010-11-30, 18:04
[No subject] - by Ant1973 - 2010-11-30, 22:59
[No subject] - by JDizzy - 2010-11-30, 23:08
[No subject] - by Bandit_Kaine - 2010-12-01, 05:16
[No subject] - by jjhdtv - 2010-12-01, 06:19
[No subject] - by JDizzy - 2010-12-01, 06:48
[No subject] - by jjhdtv - 2010-12-01, 07:37
[No subject] - by jberriman - 2010-12-02, 13:46
[No subject] - by Sam.Nazarko - 2010-12-02, 17:02
[No subject] - by jberriman - 2010-12-03, 23:31
[No subject] - by kevthemilkman - 2010-12-06, 04:41
[No subject] - by Jimmer - 2010-12-06, 12:02
[No subject] - by kevthemilkman - 2010-12-06, 12:21
[No subject] - by sar_scarab - 2010-12-13, 06:43
[No subject] - by JDizzy - 2010-12-13, 18:21
[No subject] - by sar_scarab - 2010-12-13, 18:43
[No subject] - by sar_scarab - 2010-12-16, 19:59
[No subject] - by Syndicate - 2010-12-17, 17:55
[No subject] - by konan - 2010-12-20, 18:58
[No subject] - by waldo22 - 2010-12-22, 00:22
[No subject] - by menan - 2010-12-28, 18:56
[No subject] - by xbmc old school - 2010-12-30, 12:54
[No subject] - by Metsadah - 2011-01-01, 16:39
[No subject] - by brock_gonad - 2011-01-01, 18:58
[No subject] - by Metsadah - 2011-01-01, 19:48
[No subject] - by Metsadah - 2011-01-01, 20:37
[No subject] - by lailas-dad - 2011-01-01, 20:54
[No subject] - by xbmc old school - 2011-01-01, 20:57
[No subject] - by Metsadah - 2011-01-01, 21:27
[No subject] - by Goetterdaemmeru - 2011-01-01, 23:06
[No subject] - by dreary79 - 2011-01-02, 04:32
[No subject] - by xbmc old school - 2011-01-02, 08:42
[No subject] - by Metsadah - 2011-01-02, 14:17
[No subject] - by thnmnt - 2011-01-02, 19:16
[No subject] - by Goetterdaemmeru - 2011-01-02, 22:49
[No subject] - by JDizzy - 2011-01-03, 02:56
[No subject] - by Metsadah - 2011-01-03, 03:45
[No subject] - by Goetterdaemmeru - 2011-01-03, 07:18
[No subject] - by Metsadah - 2011-01-03, 11:10
[No subject] - by Goetterdaemmeru - 2011-01-05, 05:08
[No subject] - by goldfinger7476 - 2011-01-05, 06:45
[No subject] - by Metsadah - 2011-01-05, 18:34
[No subject] - by menan - 2011-01-05, 20:36
[No subject] - by Goetterdaemmeru - 2011-01-06, 07:48
[No subject] - by jadel - 2011-01-10, 11:16
[No subject] - by papampi - 2011-01-14, 12:24
[No subject] - by b00sted4fun - 2011-01-14, 15:01
[No subject] - by Andy S2K - 2011-01-15, 10:01
[No subject] - by fartulis - 2011-01-15, 19:01
[No subject] - by b00sted4fun - 2011-01-15, 23:37
[No subject] - by Andy S2K - 2011-01-16, 20:59
[No subject] - by Andy S2K - 2011-01-16, 21:25
Bandit is the man! - by chalk4 - 2011-01-16, 22:44
[No subject] - by Andy S2K - 2011-01-26, 00:55
[No subject] - by Maetrik - 2011-01-27, 17:53
[No subject] - by Andy S2K - 2011-02-14, 11:25
[No subject] - by superdust - 2011-02-19, 00:14
[No subject] - by Andy S2K - 2011-02-23, 10:53
[No subject] - by frumpy_uk - 2011-02-25, 21:32
[No subject] - by Andy S2K - 2011-03-02, 13:16
[No subject] - by Andy S2K - 2011-03-02, 17:36
[No subject] - by frumpy_uk - 2011-03-03, 00:04
[No subject] - by Andy S2K - 2011-03-03, 09:47
[No subject] - by Andy S2K - 2011-03-06, 11:59
[No subject] - by interceptor121 - 2011-03-06, 12:55
[No subject] - by Andy S2K - 2011-03-06, 16:55
Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO install Crustalbuntu minimal image to internal Apple TV harddrive2