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)



- jelleeelco - 2010-11-05

jelleeelco Wrote:Scott,

I just copied and paste from a wiki (hence the dotted lines). Will post the link as soon as I can.

Personally I don't need audio over hdmi; updated drivers that (hopefully) fix my refresh rate issue is more important to me.

Here you go:
http://wiki.xbmc.org/index.php?title=XBMCbuntu#If_using_NVIDIA:_install_NVIDIA_restricted_drivers

And you can probably make sense of this as well (for me it's chinese):
http://wiki.xbmc.org/index.php?title=HOW-TO_set_up_audio_over_HDMI_on_nVidia_GeForce/nForce_controller


- darkscout - 2010-11-05

Since I plan on just replacing my ATV's hard drive is there anyway I could do a DD to the hard drive then use gparted or something on another machine to expand the partition size to be the entire drive? (or maybe I'll just make a media partition).

Also, is there any way to do the Composite Out trick? A friend's house I go to regularly has a huge TV, but it's an old school projection without even a component in.


- dismal - 2010-11-06

Sam.Nazarko Wrote:Don't know what XBMC's WMV handling is like. If it's a VC-1 stream as you say, why not try demuxing and then muxing into an MKV container and see if it works?

Thanks for the response, I think I may have found the problem.
I reencoded one of my HD WMVs but instead of using the WMV9 Advanced profile for video I used just WMV9 standard set to auto profile. This created a VC1 WMV reported as VC1(wmv3) in MediaInfo. this played perfectly on the crystalbuntu atv. so anyone else having issues when you encode your movies to wmv try this and your movies will still play on the xbox360 if you are in the same boat as me. Smile


- Riderzzz - 2010-11-06

m_lopez_h Wrote:Below is a compilation of several guides that worked for me. Goal is to make full use of all the space on your patchstick. Assumes you have a fully working patchstick with Pin's image on it.

2. Download Ubuntu (http://www.ubuntu.com/desktop/get-ubuntu/download) and create an Ubuntu Live CD. Boot off the Ubuntu CD but don't install it to your HD. This will allow you to get Linux running on your PC.

3. Plug in your USB stick into the PC. Determine which drive it is (/dev/sda, /dev/sdb, etc). You can check the drive by either running gparted (system >> administration >> gparted) and clicking through the drives to see how the drive letters are assigned or open up a shell and use the “mount” command to get a readout of mounted drives.

Open a shell
sudo swapoff –a (turns off the linux swap file so you can remove it)
sudo parted /dev/sdb/ ( in this example, the usb stick is sdb. Let parted fix any errors it finds)
unit s (convert to parted to sectors)
print (see output below for my particular drive)

(parted) unit s
(parted) p
Model: Lexar USB Flash Drive (scsi)
Disk /dev/sdb: 15663104s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 40s 409639s 409600s fat32 EFI System Partition boot
2 409640s 460639s 51000s hfs+ Recovery atvrecv
3 460640s 5343452s 4882813s ext3
4 5343453s 6343453s 1000001s linux-swap


Note, in this example my usb stick is /dev/sdb. Disk size is 15663104 sectors. The drive has 4 partitions (sdb1, sdb2, sdb3, sdb4). The fourth partition (linux-swap) ends at sector 6343453. That means that anything beyond partition #4 is unused space. Print your version of this table out. You will need to refer to it for your specific drive

Next Steps: remove the linux-swap partition (sdb4), re-add the linux partition at the end of the drive (freeing up space between partition sdb3 and partition sdb4), change partition sdb3 from ext3 file system to to ext2, resize the ext2, change the ext2 back to ext3

Rm 4 (delete linux-swap)

Now, time for some math. In the example above, the linux-swap is 1000001 sectors long. Drive ends at sector 15663104. To put the linux-swap at the end of the usb drive we need to calc the new start and end sectors:
New Start Sector = 14663103 (15663104 (end of drive from example above) – 1000001 (original length of linux-swap))
New End Sector = 15663104 (end of drive)

In practice, the last usable sector on my drive was off by 34 sectors (found this out by trial and error…decrementing the end sector until parted was happy). So I ended up using:
Start Sector = 14663069
End Sector = 15663070

parted /dev/sdb mkpartfs primary linux-swap (re-add the linux-swap at the end of the drive. Parted will ask you to input the new start and end sectors. Use what you calc’d from example above)
quit (quit parted. The linux-swap should now be at the end of your drive)

sudo fsck -n /dev/sdb3 (check for no filesystem errors on sdb3)
sudo tune2fs -O ^has_journal /dev/sdb3 (convert sdb3 into ext2 filesystem)

Back to the ubuntu desktop
You now need to umount partition #3 from your usb drive (/dev/sdb3). I couldn’t figure out how to do it using the command line, so I fired up gparted. From the ubuntu desktop (system >> administration >> gparted). Select your usb drive (refresh if necessary). Right click on partition #3 (sdb3) and select “unmount”.

Back to the terminal
sudo parted /dev/sdb
unit s (convert units to sectors)
print (print out partition table once again. Write down start sector of partition #3)
rm 3 (remove partition #3, we will add in next step)
parted /dev/sdb mkpart primary (re-add partition #3 with larger partition. Start sector is what you wrote down from previous step. End sector = partition #4 (linux-swap) start sector - 1 = (15663070 – 1) = 15663069
quit (quit parted)
sudo e2fsck -f /dev/sdb3 (force fs check)
sudo resize2fs /dev/sdb3 (resize the ext2)
sudo tune2fs -j /dev/sdb3 (change back to ext3)

Took me a looong time to figure everything out (I’m a linux noob). Hope this works for you.

i tried this on my 16 GB stick on all worked fine. except the very last step. Reverting back to ext3.
It gives me the message
Code:
sudo tune2fs -j /dev/sdb3
tune2fs 1.41.12 (17-May-2010)
Creating journal inode: done
This filesystem will be automatically checked every 32 mounts or
180 days, wichever comes first. Use tune2fs -c or -i to override.
After this when i check with "print" its still ext2

dont know much about linux but what can i do with this?
thanks for the info btw!!


After doint the last partition over again it did work. Now my 16 GB is fully functional Smile

Thanks for all the hard work in this project!!


Dharma Beta 4 + crystalhd-for-osx-3.6.0 full HD success again - anton_kg - 2010-11-07

2:10.00~svn35068-hardy1 and crystalhd-r156

nice work guys. I'm really pleased with the 1080 HD performance.
Keep it up.


- jelleeelco - 2010-11-07

Same here now with beta4 and r174 latest drivers. Works amazingly well, perfect 1080p playback (tv switches correctly now I have updated my nvidia driver to 256.25, audio over optical). Dvd's are playing correct as well (I have the crystalhd 015).

Only small issue is that after playing and stopping a couple (>8) HD movies, the system starts to hang on the refresh change. Guess I have to reboot once per week or so.

Many thanks to all, looking forward to b5 or even final!


- Sam.Nazarko - 2010-11-07

You could cron your reboots


- jelleeelco - 2010-11-07

Sam.Nazarko Wrote:You could cron your reboots

Ummm... What does that mean?


- fl0w - 2010-11-07

Hi,
Logitech Harmony works amazingly on Crystalbuntu.
I have one remaining question, can I dist-upgrade to Jaunty without any problem?
Thanks!


- spacecraft - 2010-11-08

Hello all,

I think I might have a working HDMI configuration over new ALSA+NVIDIA drivers, but I have no way of testing it.

I started with pin's image, upgraded to xbmc beta 4, compiled r169 CrystalHD, compiled ALSA 1.0.23 (both driver and library, which seems to stop some of the ALSA errors in XBMC beta4), and installed the newest NVIDIA drivers available from their website.

I have no way of testing this setup, however. Alsamixer's aplay shows three devices, the third being the HDMI audio device. I can draw out a fairly extensive instruction set for anyone who would consider reproducing this setup. The installation of ALSA 1.0.23 was less than straight forward.

At any rate, I think I recall someone being curious about the possibility of audio over HDMI on newer builds...


- marcelomanzo - 2010-11-08

Yes, you can resize in another machine.

It's much easier.

Don't forget to update the fstab, to the new UUID of the the swap partition.


darkscout Wrote:Since I plan on just replacing my ATV's hard drive is there anyway I could do a DD to the hard drive then use gparted or something on another machine to expand the partition size to be the entire drive? (or maybe I'll just make a media partition).

Also, is there any way to do the Composite Out trick? A friend's house I go to regularly has a huge TV, but it's an old school projection without even a component in.



- Sam.Nazarko - 2010-11-08

jelleeelco Wrote:Ummm... What does that mean?

A cronjob allows you to schedule events

fl0w Wrote:Hi,
Logitech Harmony works amazingly on Crystalbuntu.
I have one remaining question, can I dist-upgrade to Jaunty without any problem?
Thanks!

No. This breaks audio drivers. And you'd have to recompile the mach_kernel.

spacecraft Wrote:Hello all,

I think I might have a working HDMI configuration over new ALSA+NVIDIA drivers, but I have no way of testing it.

I started with pin's image, upgraded to xbmc beta 4, compiled r169 CrystalHD, compiled ALSA 1.0.23 (both driver and library, which seems to stop some of the ALSA errors in XBMC beta4), and installed the newest NVIDIA drivers available from their website.

I have no way of testing this setup, however. Alsamixer's aplay shows three devices, the third being the HDMI audio device. I can draw out a fairly extensive instruction set for anyone who would consider reproducing this setup. The installation of ALSA 1.0.23 was less than straight forward.

At any rate, I think I recall someone being curious about the possibility of audio over HDMI on newer builds...

Davilla wanted to know, we all did. It doesnt matter if alsamixer shows the three devices, the bug is that as soon as X11 starts sound stops working. Play a wav before X loads, it's fine, once it loads, it stops working, so there is a bug in recent NVIDIA drivers prohibiting ALSA to play out sound via HDMI


- spacecraft - 2010-11-08

Sam.Nazarko Wrote:alsamixer shows the three devices, the bug is that as soon as X11 starts sound stops working. Play a wav before X loads, it's fine, once it loads, it stops working, so there is a bug in recent NVIDIA drivers prohibiting ALSA to play out sound via HDMI

I see. That's fair, just thought I just throw it out there. For someone [like myself] who does nothing but consume the fruits of labor of others, the incentive to contribute is compelling.

Cheers,
J


- fl0w - 2010-11-09

Sam.Nazarko Wrote:No. This breaks audio drivers. And you'd have to recompile the mach_kernel.
Ok thanks, any idea about a release date for Crystalbuntu based on Jaunty?


- Sam.Nazarko - 2010-11-09

fl0w Wrote:Ok thanks, any idea about a release date for Crystalbuntu based on Jaunty?

Not in the foreseeable future. At least not until NVIDIA drivers offer HDMI out.

Why do you want Jaunty anyway?