XBMC Community Forum
[LINUX] Sam's beta image for Apple TV? - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Kodi General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Sam's beta image for Apple TV? (/showthread.php?tid=88518)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


- pmcd - 2011-01-08 08:22

defiler Wrote:Yep, and it's been asked and answered time and again - even within this thread. Resize the partition with parted and then resize2fs the filesystem. And use the search function on the forum - it works.

It has been asked, but never really answered at least I have never seen the answer. The unfixed version of parted is not for GPT disks. If you boot a Linux Live CD and try to run parted on the Linux partition (sda3 or whatever) you get a message to that effect and to use gpt. Obviously it can be done using those two ( parted and resize2fs) but it is not at all obvious how to do it. Moreover even running parted from a Linux Live CD managed to mess up my guid partition on the internal hard disk ( I should have unplugged it) and did in a win7 partition ( I had osx and windows 7 dual booting).

I have searched quite a bit for the answer to this question. The solution isn't here. There was an involved solution for Sam's original image which had the swap file at the end. Perhaps that is what you were thinking of?

If we were dealing with guid partition tables on a Mac it would be simple. The
mix of hfs+ and ext() makes it much harder for those of us unfamiliar with Linux.

Somehow it should be as simple as

parted ....()
resize2fs ...()

but filling in the dots isn't obvious to me at least. I just left my 16gig flash with the 4 gig image on it. Works great, but it would be nice to fill up the space for whatever reason.

philip


- MasterOe - 2011-01-08 12:26

MasterOe Wrote:i create the usb stick like sams faq:

http://code.google.com/p/crystalhd-for-atv/wiki/LinuxInstaller

The USB Stick is booting and then i get a error message:

wget: invalid option --r



after that problem i get a lot of error messages like "line xy: sudo: command not found"

anyone same problem? can someone help?

nobody the same problem? I also also tried differrent usb sticks without success:

[Image: oefmzg.jpg]

i mean is it the issue with the network interface card or what can be my problem?


- garyi - 2011-01-08 12:35

Try again, and make sure you opened usb image tool as admin.


- jagabongo - 2011-01-08 14:44

feikenberg Wrote:After quite a few nights of trial and error I have managed to install Sam.Nazarko's image on the Apple TV hardrive keeping OS X. I used pin87a's instructions that I found here:

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

but had to modify a few things. Now I want to share this modified instructions, in case somebody else is interested:

Requirements:
Another usb drive (separate from the one you have the image restored on to)
Since you are making changes to the internal hard drive it is highly recommended that you make a backup of the recovery partition first so you can undo the changes if necessary. Instructions available here:
http://code.google.com/p/atv-bootloader/wiki/ATVBackup

Download atv-usb-creator and create a atv-bootloader drive (select atv-bootloader from the options). Then plug the drive into the ATV and reboot.

Once the atv bootloader has loaded telnet into it (user root / pass root)

Delete current Media partition and create new one
This tutorial assumes a 40GB atv drive. If you have a 160 you can make the atv media partition and the linux partition (sda5) larger.

I use nano for editing files throughout this tutorial. Feel free to use emacs, vim, or any other editor if you wish.
(warning - will delete data - be sure you back up if necessary)
Code:
parted -s /dev/sda rm 4
parted -s /dev/sda mkpart primary HFS 2732072s 54525951s

Create Linux Partitions
Code:
parted -s /dev/sda mkpart primary ext3 54525952s 77091549s
parted -s /dev/sda mkpart primary linux-swap 77091550s 78140126s

Format New Partitions
Code:
partprobe /dev/sda
mkfs.hfsplus -J -v Media /dev/sda4
mkfs.ext3 -b 4096 -L Linux /dev/sda5

Remove usb drive and reboot
Run factory restore in ATV OS

If all is well in the ATV OS connect the linux usb drive and reboot
Once linux is loaded ssh into the atv (user atv pass atv)

Copy Data
Code:
sudo mkdir /media/atvdrive
sudo mount /dev/sda5 /media/atvdrive/
sudo apt-get install rsync
sudo rsync -av --exclude "/proc/" --exclude "/dev/" --exclude "/sys/" --exclude "/mnt/" --exclude "/media/" / /media/atvdrive
cd /media/atvdrive
sudo mkdir -p proc dev sys mnt media
cd

Fix fstab on new install:
First you need to get the uuid information for the linux partitions
The uuid should look something like '72270e11-6b2e-4eb1-807d-4ca29f077626'

Run the following commands and copy the output somewhere so you can use it later.

sda5
Code:
sudo vol_id /dev/sda5 | grep ID_FS_UUID
sda6
Code:
sudo vol_id /dev/sda6 | grep ID_FS_UUID
Edit fstab on new install
Code:
sudo nano /media/atvdrive/etc/fstab
replace "# /dev/sdb3" with "# /dev/sda5"
replace "/dev/sdb3" with "UUID=the uuid you saved for sda5"
replace "# /dev/sdb2" with "# /dev/sda6"
replace "/dev/sdb2" with "UUID=the uuid you saved for sda6"

unmount partition
Code:
sudo umount /media/atvdrive/
sudo rm -fdr /media/atvdrive/

Point atv-bootloader (on usb drive) to new internal drive install
Code:
sudo apt-get install hfsprogs
sudo fsck.hfsplus /dev/sdb1
sudo mkdir /media/atvboot
sudo mount /dev/sdb1 /media/atvboot
sudo nano /media/atvboot/com.apple.Boot.plist

Change root to /dev/sda5
Code:
sudo umount /media/atvboot
sudo rm -fdr /media/atvboot/

Reboot into the linux install on the hard drive
Code:
sudo reboot
If all is well you can delete the linux partitions on the usb drive
ssh into atv
Code:
sudo umount /dev/sdb3
sudo parted -s /dev/sdb rm 3
sudo parted -s /dev/sdb rm 4

Once complete you can switch between linux and os x by inserting or removing the usb drive and rebooting.
Drive inserted = Linux.
Drive removed = OS X

feikenberg you are my hero! no need anymore to increase the sdb3 partition size on my 16GB usb pen disk! Wink now i have OSX & Linux on the internal hard disk this is awesome! This guid works perfekt on a 160HD also! Smile

Thank you very much this thing should be postet onto the Googlecode Wiki of the Image!


- Muskyinoz - 2011-01-08 15:10

Hope someone can help here, now that I've got everything up and running I wanted to add some background images to my home menu items but I have no idea how to copy images or folders from my mac to the USB drive.

I use Fugu with the normal xbmc on ATV but it has no permissions with the Crystalbuntu. If anyone could help me out or point me in the right direction it would be much appreciated.


- MasterOe - 2011-01-08 15:30

garyi Wrote:Try again, and make sure you opened usb image tool as admin.

i used ubuntu to create the usb stick with

"sudo gunzip -c installer.img.gz | sudo dd of=/dev/sdb"

no usb image tool needed


- defiler - 2011-01-08 16:31

MasterOe Wrote:i used ubuntu to create the usb stick with

"sudo gunzip -c installer.img.gz | sudo dd of=/dev/sdb"

no usb image tool needed

Looks right to me. I'd gunzip to an intermediate file and then dd from if to of, but piping is a perfectly acceptable method.

Since you've not spent ages customising it, it may be worthwhile just unpacking it to your flash drive again. Though I imagine you've already tried that...


- Sam.Nazarko - 2011-01-08 17:52

MasterOe Wrote:nobody the same problem? I also also tried differrent usb sticks without success:

[Image: oefmzg.jpg]

i mean is it the issue with the network interface card or what can be my problem?

For the 500th time. Do not use the Linux installer image. atv-bootloader has two faults preventing it from being a suitable installation distro, one being that wget is not the full gnu version, and a second being the atv-bootloader turns off the screen after some time.

/The Linux installer is not ready/. Read: it will not work.


- MasterOe - 2011-01-08 17:59

"Want performance feedback for this please. It is a beta after all and I have no idea if this is adequate for final or not.

Here's a full guide with FAQ - you can leave feedback there if you have a Google Code account: http://code.google.com/p/crystalhd-for-atv/wiki/Ubuntu

Report bugs here: http://code.google.com/p/crystalhd-f...roubleshooting"


sorry sam, don't read it anywhere... i follow your link and want to test it but, it seems that i'm not the only one who does not see your 500 posts Wink

I have another stupid question: where can i download the "working" image? The Link from the first side does not work anymore...


- Sam.Nazarko - 2011-01-08 18:36

I mentioned it didn't work four posts back, as well as on Twitter twice. The link is a couple of posts back and on Twitter as well.


- feikenberg - 2011-01-08 18:50

jagabongo Wrote:feikenberg you are my hero! no need anymore to increase the sdb3 partition size on my 16GB usb pen disk! Wink now i have OSX & Linux on the internal hard disk this is awesome! This guid works perfekt on a 160HD also! Smile

Thank you very much this thing should be postet onto the Googlecode Wiki of the Image!

Very glad i could help! Smile


- pumkinut - 2011-01-08 21:47

feikenberg:

I'm feeling particularly stupid right now. I'm toying with the idea of installing to the internal HDD as you did, but I can't seem to find a generic ATV-Bootloader image to throw on a thumbstick to do all the work with. I have Sam's image on one stick that I want to move over. I downloaded the ATV USB Creator package, but that wants to install the Launcher onto my ATV HDD, and I don't think it stays at a shell, rather it does its work and reboots.

Are you building your patchstick manually in Linux of OSX or are you using a pre-existing image and using USBit to install it to a thumbdrive? I'm fine with everything else in the process, I'm just hitting a mental wall on creating the additional thumbdrive.


- feikenberg - 2011-01-08 21:53

pumkinut:
In "Choose an Installation" you have to select "ATV-Bootloader" , not "ATV-Patchstick"


- pumkinut - 2011-01-08 22:15

feikenberg:
You've got a PM.


- Muskyinoz - 2011-01-10 09:16

Warning, anyone remotely knowledgeable in Linux may find themselves uncontrollably laughing at my code attempts.

So I had a go at trying to find the code to copy my images to the USB drive and after some searching on the web came up with the following

Code:
sudo cp -r /Users/user/Desktop/XBMC/XBMC-Images atv@192.168.1.4:/root/home

when I run it however I get

Code:
cp: /Users/user/Desktop/XBMC/XBMC_Images/Weather.1080p: unable to copy extended attributes to atv:atv@192.168.1.4:/root/home/Weather.1080p: No such file or directory
cp: atv:atv@192.168.1.4:/root/home/Weather.1080p/weather-00.jpg: No such file or directory

Needless to say I know NOTHING about linux or commands, I've searched as many Linux forums as I can for any help and I'm completely stuck, any help would be appreciated