Kodi Community Forum
[LINUX] Apple TV Crystalbuntu (Ubuntu Linux and Crystal HD) Disk Image for Apple TV - 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] Apple TV Crystalbuntu (Ubuntu Linux and Crystal HD) Disk Image for Apple TV (/showthread.php?tid=74992)



- pin87a - 2010-06-13

[quote=jodeman]Thanks! That fixed that. Now, with the next step, I get this error:

Code:
xbmc@atv:~$ sudo mount /dev/sda2 tmpmnt
[/quote]

[code]
sudo mount -t hfsplus /dev/sda2 tmpmnt

Should do it.


- jodeman - 2010-06-13

pin87a Wrote:
Code:
sudo mount -t hfsplus /dev/sda2 tmpmnt

Should do it.

Thanks for taking the time to help me with this.

When I run the command, I get the same error:

Code:
xbmc@atv:~$ sudo mount -t hfsplus /dev/sda2 tmpmnt
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so



- tuckbodi - 2010-06-13

Hi pin, thx for your hard work! Couple of questions-
- are you planning on minimizing your image any further? I have two types of 4gb's (two each) that just don't quite make it (but have a 6gb but want to use it for other stuff). If you are I'll sit tight otherwise I might go shopping for a new USB stick.
- is there a way to upgrade to the latest nightlies? When I tried "sudo apt-get upgrade xbmc" and rebooted, it was still version 28256.


- defiler - 2010-06-13

jodeman Wrote:Thanks for taking the time to help me with this.

When I run the command, I get the same error:

Code:
xbmc@atv:~$ sudo mount -t hfsplus /dev/sda2 tmpmnt
mount: wrong fs type, bad option, bad superblock on /dev/sda2,[...]

Yeah - I got the same thing. I used apt-get to install nfs on the USB stick, popped the image onto an NFS share on my server, mounted it on the ATV, and then did a dd if=xxx.img of=/dev/sda bs=4096

In other words, copy the original image onto the internal drive, rather than copying the running USB stick. Changed over the location of the root drive, enabled component video, shut it down and powered off, removed the USB stick, and it started right up.

And damn it's much faster on the internal hard disc. Seriously, when copying it on it was flattening the network connection.


- jodeman - 2010-06-13

defiler Wrote:Yeah - I got the same thing. I used apt-get to install nfs on the USB stick, popped the image onto an NFS share on my server, mounted it on the ATV, and then did a dd if=xxx.img of=/dev/sda bs=4096

In other words, copy the original image onto the internal drive, rather than copying the running USB stick. Changed over the location of the root drive, enabled component video, shut it down and powered off, removed the USB stick, and it started right up.

And damn it's much faster on the internal hard disc. Seriously, when copying it on it was flattening the network connection.

So, I've got the atv with the stock 40gb drive in it. Would I then change the dd command to be bs=40960?


- pin87a - 2010-06-13

tuckbodi Wrote:Hi pin, thx for your hard work! Couple of questions-
- are you planning on minimizing your image any further? I have two types of 4gb's (two each) that just don't quite make it (but have a 6gb but want to use it for other stuff). If you are I'll sit tight otherwise I might go shopping for a new USB stick.
- is there a way to upgrade to the latest nightlies? When I tried "sudo apt-get upgrade xbmc" and rebooted, it was still version 28256.

Probably going to just hang back and gather feedback on the current version for a while.

There is actually a bit more room to work with in regards to shrinking the image since I didn't partition all of the 4GB space.
Try running the following command to copy the image to the 4GB drive it won't fit on.
It will write the first 3.3GB of the image file to the usb drive and then stop (that's as small as the current image will go).

Code:
sudo dd if=atv-usbboot-xbmcbuntu-crystalhd-hdmi-28256-R3.img of=/dev/yourusbdevice bs=4096 count=795000

As for updating to the current svn, there are currently some issues with the team-xbmc-svn repository that need to be resolved before updates can be installed via apt-get . Still in a state of flux from all of the major changes.


- jodeman - 2010-06-13

defiler Wrote:Yeah - I got the same thing. I used apt-get to install nfs on the USB stick, popped the image onto an NFS share on my server, mounted it on the ATV, and then did a dd if=xxx.img of=/dev/sda bs=4096

In other words, copy the original image onto the internal drive, rather than copying the running USB stick. Changed over the location of the root drive, enabled component video, shut it down and powered off, removed the USB stick, and it started right up.

And damn it's much faster on the internal hard disc. Seriously, when copying it on it was flattening the network connection.

I'm try to copy the img file from my macbook to the internal drive on the atv. (the usb drive doesn't have enough room) I've got ssh installed on the usb drive. Is there a way for me to get to the internal drive through ssh to copy it?


- defiler - 2010-06-13

jodeman Wrote:So, I've got the atv with the stock 40gb drive in it. Would I then change the dd command to be bs=40960?

No. 4096 is fine. But you need to be able to see the image file, rather than just the USB drive. As I say, I made the image available via NFS from a Linux box. I don't really trust the whole concept of copying a live, running filesystem to another drive - I think that's where it's been failing for you and me.


- defiler - 2010-06-13

jodeman Wrote:I'm try to copy the img file from my macbook to the internal drive on the atv. (the usb drive doesn't have enough room) I've got ssh installed on the usb drive. Is there a way for me to get to the internal drive through ssh to copy it?

No - SSH will let you SFTP back and forth, but it won't let you byte-copy an image to a drive. Your Macbook will be able to share it by NFS, but not being a mac-man I don't know how. You can share the folder on Linux by editing the /etc/exports file. And you'll need to apt-get install the NFS tools on the ATV. But don't worry, because you'll be binning the USB install once it's on the hard disc, so you're not adding anything you don't need in the long run.


- jodeman - 2010-06-13

brock_gonad Wrote:You don't have to mount the internal HD to copy the image over. I used this command sucessfully;

sudo dd if=/dev/sdb of=/dev/sda bs=4096

Then you have to edit com.apple.Boot.plist which tells it to boot off of the hard drive on the next boot. This is on /dev/sda2.

Make a temp directory to mount it to;
mkdir tmpmnt

Make the partition read/write;
fsck.hfsplus /dev/sda2

Mount it;
sudo mount /dev/sda2 tmpmnt

Edit the file;
sudo nano tmpmnt/com.apple.Boot.plist

Change the /dev/sdb3 to /dev/sda3 towards the end of the file, close and save it.

Reboot (remove USB key). Should boot from HD.

Ok, I'm getting closer on this. I tried to share the file via nfs, but I'm having issues with my ubuntu virtual machine. While I'm waiting for that to finish re-setting up, I thought I'd revisit these original directions. I was able to get the drive mounted by first installing hfsplus on the usb drive.

BUT, now I'm having an issue with the next step. Wink When I try to edit the com.apple.Boot.plist file, it creates a new one. I did a locate on the system, and it comes back with zero results. Is this a file I need to create from scratch, or is it hiding somewhere else?


- frumpy_uk - 2010-06-13

pin87a Wrote:Thanks for the feedback. I edited the tutorial.

Not sure about your network issue.
Since you already had linux on the drive did you delete your old linux partitions before copying the files over?

If you exit XBMC (from within XBMC) when it drops back to the console do you see any error messages from the boot process?
Can you boot using the regular usb image, mount the internal linux partition, and check the logs?

Code:
cd
mkdir tmp
sudo mount /dev/sda5 tmp
sudo cat tmp/var/log/daemon.log | grep DHCP

You should see something like this:
Code:
Jun 12 09:57:20 AppleTV dhclient: DHCPREQUEST of <null address> on eth0 to 192.168.1.1 port 67
Jun 12 09:57:21 AppleTV dhclient: DHCPACK of 192.168.1.101 from 192.168.1.1

Thanks for the help.

Here's the log : http://pastebin.com/JRtshPQW

I have edited the file network to change from DHCP to a static IP address. See how we go...


- da-bitsch - 2010-06-14

After playing around with th minimal R3 image (booting from the usb flash drive) for a while the system got stuck and i had to power cycle the apple tv. After doing this the system was behaving in a strange manor and was either not displying anything, displaying only green doots or the ui was inresponsive. I then restored the image again and everything worked fine until i was stuck again. After another power cycle the excact same pattern with the unresponsive UI and the green dots reappeared. Has anybody else experienced something similar and/or does anyone know how to fix this Smile?

btw: my tv is only capable of displaying 720p


- tuckbodi - 2010-06-14

pin87a Wrote:Probably going to just hang back and gather feedback on the current version for a while.

Kewl. Understand. Just wanted to get dds going again because once you get a taste of it, and then without it, feels like a step backwards.

pin87a Wrote:There is actually a bit more room to work with in regards to shrinking the image since I didn't partition all of the 4GB space.
Try running the following command to copy the image to the 4GB drive it won't fit on.
It will write the first 3.3GB of the image file to the usb drive and then stop (that's as small as the current image will go).


Hmmm, didn't work. Got the following:

Waiting for root file system...
check root= bootarg cat /proc/cmdline
or missing modules, devices: cat /proc/modules ls /dev
! /dev/sdb3 does not exist. Dropping to shell!

pin87a Wrote:As for updating to the current svn, there are currently some issues with the team-xbmc-svn repository that need to be resolved before updates can be installed via apt-get . Still in a state of flux from all of the major changes.

Kewl..thx!


- brock_gonad - 2010-06-14

jodeman Wrote:BUT, now I'm having an issue with the next step. Wink When I try to edit the com.apple.Boot.plist file, it creates a new one. I did a locate on the system, and it comes back with zero results. Is this a file I need to create from scratch, or is it hiding somewhere else?

It sounds like you're trying to edit the file from the wrong partition. The instructions you refer to assume you're using pin87a's R3 image. On that image, com.apple.Boot.plist is on /sdb2. On Sam's original image it was on /sdb1.

So make sure you're looking in the right spot. Mount the partition, and the file should be right there.


- frumpy_uk - 2010-06-14

frumpy_uk Wrote:Thanks for the help.

Here's the log : http://pastebin.com/JRtshPQW

I have edited the file network to change from DHCP to a static IP address. See how we go...

Static IP address didn't help. So I redid your guide but deleted everything from sda5 first. That worked. Now I have a strange problem with screen resolution but I'll do some fiddling with that before asking for more help.

Thanks!