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)



- davilla - 2010-09-08

vajonam Wrote:have you been able to get the usplash working? are there issues using vesafb and usplash

again thanks for putting all this info together in your various blogs and wiki articles!

Sorry, I don't worry about usplash, I like to see the kernel boot Smile

To understand usplash you have to understand that the AppleTV does not have a BIOS so BIOS calls to VBIOS will not work. There is a VBIOS but that's another issue. The nvidia driver knows how to find and talk to VBIOS and that's why display size changes work once the nvidia driver is loaded in X11.

For usplash, make the size of the spash images the same as what the AppleTV boots as, under frontrow. VesaFB is just getting passed this size as a display param. If the usplash images are a different size, usplash tries to change the display setting and fails so you don't get anything shown.

EDIT: I have a user submitted patch for atv-bootloader that includes grub2 support, now I need to find the time to add/test and roll out a new version of atv-bootloader.


- TeknoJnky - 2010-09-08

ok getting back close to where I was before lol

massive stuttering on 1080 stuff, not sure if its network (shouldn't be) or something else

http://pastebin.com/21Bd4hRQ


- vinnieb - 2010-09-08

Hey Davilla, what's the "turbo_atv_enabler.bin" in your download section and where does it live?

Thanks!


- jodeman - 2010-09-08

TeknoJnky Wrote:I followed this link below, except using parted instead of fdisk, and it worked fine for me.


- create the bootstick image and boot up
- install and build parted 1.8.8, make sure to edit install_parted.sh and added the cflags
http://code.google.com/p/atv-bootloader/wiki/InstallParted
- install the image to the hardrive via dd. I had to mount an NFS share that held the .img file on the network and used DD across the network to atv internal drive, while booted with same image on the patchstick.
- familarize yourself with http://www.howtoforge.com/linux_resizing_ext3_partitions_p2 and http://www.gnu.org/software/parted/manual/html_chapter/parted_2.html
- fsck -n /dev/sda2
- tune2fs -O ^has_journal /dev/sda2
- parted /dev/sda print
- parted /dev/sda rm 3
- parted /dev/sda rm 2
- parted /dev/sda mkpart primary 35.7M 40000M
- parted /dev/sda mkpartfs primary linux-swap 40000M 40500M
- parted /dev/sda mkpartfs primary ext3 40500M -0
- e2fsck -f /dev/sda2
- resize2fs /dev/sda2
- tune2fs -j /dev/sda2
- reboot

this will give you a 40g root partition and an ext3 partition on /sda4 you can mount as whatever once your booted.

I've tried this, and I get as far as
Code:
- fsck -n /dev/sda2
Then, it gives this error:
Code:
sudo fsck -n /dev/sda2
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

I ran - parted /dev/sda print and got this:

Code:
Model: ATA FUJITSU MHW2040A (scsi)
Disk /dev/sda: 40.0GB
Sector size (logical/physical): 512B/512B
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      236MB   2736MB  2500MB  ext3                                      
4      2736MB  3248MB  512MB   linux-swap

So, I thought maybe I should be replacing 2 with 3 in your instructions, but that gave the same error.

Is there another step I'm missing?


- jodeman - 2010-09-08

davilla Wrote:This looks like a mix of things. Sam's link is in reference to resizing the normal Media partition to make room for Linux. This would be for an install that retains the original four AppleTV partitions.

Your partition table looks like a dd of the USB flash image onto the internal disk.

Sorry, I should have been more clear. Yeah, it's a dd of the USB flash image of pin's on the internal drive. Most of my confusion is coming from the fact all the directions for resizing seem to be if you're wanting to retain the atv os.

Thanks for taking the time to help me with this.


- defiler - 2010-09-08

Well, one thing I'd do is disable the swap partition and erase it. That'll clear the space on the end of your ext3 root partition. Then you can extend sda3(?), and add the swap again at the end. So make sure you leave 1GB of empty space for the swap.

Can't really give you more just now because I'm having a job typing - sorry!


- davilla - 2010-09-08

vinnieb Wrote:Hey Davilla, what's the "turbo_atv_enabler.bin" in your download section and where does it live?

Thanks!

nowhere under atv(linux), it's for atv(osx).


- davilla - 2010-09-08

jodeman Wrote:I've tried this, and I get as far as
Code:
- fsck -n /dev/sda2
Then, it gives this error:
Code:
sudo fsck -n /dev/sda2
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

I ran - parted /dev/sda print and got this:

Code:
Model: ATA FUJITSU MHW2040A (scsi)
Disk /dev/sda: 40.0GB
Sector size (logical/physical): 512B/512B
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      236MB   2736MB  2500MB  ext3                                      
4      2736MB  3248MB  512MB   linux-swap

So, I thought maybe I should be replacing 2 with 3 in your instructions, but that gave the same error.

Is there another step I'm missing?

"fsck.hfsplus /dev/sda2" but that's not your problem.

delete linux-swap, expand ext3 leaving room for swap. then make a swap.
you will have to calculate the sector counts needed. I run parted in block mode to see the block count instead of MBs.


- jodeman - 2010-09-08

davilla Wrote:"fsck.hfsplus /dev/sda2" but that's not your problem.

delete linux-swap, expand ext3 leaving room for swap. then make a swap.
you will have to calculate the sector counts needed. I run parted in block mode to see the block count instead of MBs.

Ok, so I went into parted, and removed the swap partition by doing this:
Code:
(parted) rm 4

Then, with print, I made sure it was gone:
Code:
(parted) print                                                            
Model: ATA FUJITSU MHW2040A (scsi)
Disk /dev/sda: 40.0GB
Sector size (logical/physical): 512B/512B
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      236MB   2736MB  2500MB  ext3

After that, I tried resizing partition 3:
Code:
(parted) resize 3 236 38000
That gave me this error:
Code:
Error: File system was not cleanly unmounted!  You should run e2fsck.  Modifying an unclean file system could cause severe
corruption.
Ignore/Cancel?
So, I quite parted and made sure the partition wasn't mounted:
sudo umount /dev/sda3
umount: /dev/sda3: not mounted

Did I do the resize incorrectly, or is there something else I need to do first?


- defiler - 2010-09-08

You need to run e2fsck on /dev/sda3.

Your best bet is to start it from the USB drive to do this, as then it won't need to mount that drive.



Trying to update XBMC on Xbox here as I don't have a spare CR2032 battery for my ATV remote Sad


- TeknoJnky - 2010-09-08

updated my post to help clarify

http://forum.xbmc.org/showpost.php?p=600463&postcount=982


- jodeman - 2010-09-08

TeknoJnky Wrote:updated my post to help clarify

http://forum.xbmc.org/showpost.php?p=600463&postcount=982

Thank all of you so much. I've now got it, and it works great. I had to modify what you had slightly, so I'll list it in case others have trouble. Oh, and I did this using Pin's image and a 40gb drive in the appletv:

Code:
- create the bootstick image and boot up
- install and build parted 1.8.8, make sure to edit install_parted.sh
and added the cflags
http://code.google.com/p/atv-bootloa.../InstallParted
- install the image to the hardrive via dd.
- parted /dev/sda print (let it fix any gpt partition errors)
- fsck -n /dev/sda3 (check for no filesystem errors on ext3)
- tune2fs -O ^has_journal /dev/sda3 (makes into ext2)
- parted /dev/sda print (shows current partition list)
- parted /dev/sda rm 4 (remove linux-swap)
- parted /dev/sda rm 3 (remove ext2, we will readd expanded next step)
- parted /dev/sda mkpart primary 236M 38000M (readd the ext2 with
larger partition)
- parted /dev/sda mkpartfs primary linux-swap 38000M 39000M (readd linux-swap)
- e2fsck -f /dev/sda3 (force fs check)
- resize2fs /dev/sda3 (resize the ext2)
- tune2fs -j /dev/sda3 (change back to ext3)
- reboot



- post_break - 2010-09-09

I just got this working and oh boy, does it fly. So much faster than OSX on the same hardware. I can't wait to get this fully installed and not just on an external drive.


- BDPNA - 2010-09-09

Has anyone tried this with the latest Aeon skin and Dharma? If so how's the speed? I much prefer Aeon over Confluence but realize it's more of a resource hog.


[atv] [crystalbuntu] [33324] extreme stuttering - TeknoJnky - 2010-09-09

Ok, heres what I have done.

installed sam's crystalbuntu image to appletv internal 160g drive

tested crystalhd working

sudo apt-get remove xbmc*

fixed apt source lists, removed old ppa's and added the current

sudo apt-get install xbmc

tested same file, crystalhd not working, high cpu

compiled crystalhd (157) stuff as @ http://wiki.xbmc.org/index.php?title=HOW-TO_install_a_Miminal_Ubuntu_and_XBMC_with_sound_over_HDMI_on_the_AppleTV

rebooted

retested same file, no crystalhd working, low cpu

checked video options, crystalhd and vdpau both enabled, tried disabling vdpau and/or crystalhd, no changes no working

banged head against wall

log @ http://pastebin.com/Ef2ajxLx

dmesg @ http://pastebin.com/w3F5fApi

any insight appreciated