[LINUX] HOW-TO install Crustalbuntu minimal image to internal Apple TV harddrive - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: [LINUX] HOW-TO install Crustalbuntu minimal image to internal Apple TV harddrive (/showthread.php?tid=86108) |
[LINUX] HOW-TO install Crustalbuntu minimal image to internal Apple TV harddrive - Bandit_Kaine - 2010-11-25 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/atv-usbboot-xbmcbuntu-crystalhd-hdmi-28256-R3.rar http://meaninglesswebsite.com/atv-usbboot-xbmcbuntu-crystalhd-hdmi-28256-R3.rar http://stmlabs.com/resources/atv-usbboot-xbmcbuntu-crystalhd-hdmi-28256-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 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/latest/x86/putty.exe 12. Open putty.exe and you will get the following screen 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 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 Do NOT continue writing commands until it is done and the window looks like this: 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 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 Code: sudo ./install_parted.sh #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 #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 #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 #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 #quit parted using below command# Code: 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 #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# Restore USB Drive to Original Capacity - Bandit_Kaine - 2010-11-25 If you want to restore the USB Flash Drive back to normal you can restore it in USB Image Tool using the backup you were "supposed" to make or you can do it in windows using the diskpart command. Open a Command Prompt Window (Start > All Programs > Accesories > Command Prompt) Code: diskpart Code: select disk # Right Click the "My Computer" either on the start menu or on your desktop and select "Manage" Double Click on "Storage" then on "Disk Management(Local" You will see your USB Hard Flash drive on the bottom in black saying unallocated space. Right click the black unallocated space and press "New Simple Volume", press Next until you get to the format options, format it as FAT32 or NTFS, whatever you prefer, set the Volume Name if you like and perform quick format, Next. Your USB Drive should be clean and and back to it's full original capacity. - thnmnt - 2010-11-25 awesome post! can't wait to give this a try. - xeonicxpression - 2010-11-26 To get your flash drive back to normal it's easy to use HP's flash drive formatting utility. I don't have a link now but it's easy to find. Resizing internal disk - moonwalker - 2010-11-26 Bandit_Kaine Wrote: Very good tutorial! Thank you! All worked well! But I had to use the next two commands too to made it all happen on my internal drive. resize2fs /dev/sda3 tune2fs -j /dev/sda3 Regards - JDizzy - 2010-11-26 moonwalker Wrote:Very good tutorial! Thank you! All worked well! Did you do that before or after you pulled the USB drive out? Also, once done, does it allow XBMC Thumbnails folder to expand using this extra space? (I want to turn on dds images through advanced settings to further speed things up and it will take a lot of disk space). - ddingle - 2010-11-26 Bandit_Kaine Wrote:#Zero Apple TV Hard Drive, This will Wipe All Partitions from the drive# Thx for the guide.. following along, but getting stuck... /dev/sda is disappearing and I'm unable to gpt label it or anything. I verified sda: Code: xbmc@AppleTV:~$ sudo parted /dev/sda print Zero'ed it with dd: Code: xbmc@AppleTV:~$ sudo dd if=/dev/zero of=/dev/sda bs=4096 count=1M But now I'm getting: Code: xbmc@AppleTV:~$ sudo parted -s /dev/sda mklabel gpt And parted/fdisk no longer recognize disk: Code: xbmc@AppleTV:~$ sudo parted /dev/sda print Thoughts? I feel like I'm missing something simple. - DrPepper - 2010-11-27 Hey i do get an error when installing parted : Extracting parted source and patching patching file include/parted/disk.h patching file libparted/disk.c patching file libparted/labels/gpt.c Building parted ./install_parted.sh: line 36: unexpected EOF while looking for matching `"' ./install_parted.sh: line 39: syntax error: unexpected end of file anyone know what that can be ? Thanks for the help. Cheers Help with RC1 / 174 1080p Playback - jthunder - 2010-11-27 I am experiencing drop frame problems when trying to play a 1080p blueray rip using the latest Dharma RC1 release, CrystalHD 174, and the Apple TV. I have installed PIN's minimal xbmc-linux image to the Apple TV to the internal 40gb drive using the latest instructions. I have updated xbmc and crystalhd drivers/firmware. I am using the component cables to my 720p capable set, and optical cables to the DTS capable AVR. I have a custom xorg.conf to enable 720 as per the ATV-bootloader instructions, and selected the iec948 audio device to get optical pass-through audio. The media is stored on an SMB share over 100mb wired network. The video appears to start ok, then after a few seconds starts dropping frames. I am wondering if this is due to the high bitrate of the source video (even with the crystalhd it can't handle it?) or something else? Here are the logs: DMESG - http://pastebin.com/HQAQJTvw xbmc.log - http://pastebin.com/FYaPK1zi mediainfo - http://pastebin.com/4dCmBvhe xorg.conf - http://pastebin.com/echgBRx1 The same video file plays fine over the same network using my ion Acer revo. Thank you very much for the help. JT - ddingle - 2010-11-27 ddingle Wrote:Zero'ed it with dd: I couldn't tell you why, but losing 'count=1M' from the dd command has fixed the issue I was having and all is well now. - mbetter - 2010-11-27 DrPepper Wrote:Hey He's got mismatched quotation marks on the line you put in install_parted.sh. Kill the one at the end. To clarify: ./configure CFLAGS="-fgnu89-inline" --enable-static - mbetter - 2010-11-27 JDizzy Wrote:Did you do that before or after you pulled the USB drive out? You can do it at the end, once the USB drive is out and you've booted from the HD. - mbetter - 2010-11-27 Thanks for the guide OP! I also needed the resize2fs / tune2fs stuff to get the full space of my drive available, you should probably add them to the guide. - ddingle - 2010-11-27 moonwalker Wrote:Very good tutorial! Thank you! All worked well! Ditto to above. Also maybe worth noting that instead of rebooting all the time you can issue Code: sudo partprobe /dev/sda Now happily running Sam's image on my internal HD. - ddingle - 2010-11-27 One more thing is that the tutorial is assigning 1GB+ to sda4 swap, but top only shows 499992k available and swapoff & resize2fs doesn't work on swap's sda4.. and I'm a linux noob so have no idea how to change that Code: xbmc@AppleTV:~$ sudo swapoff /dev/sda4 |