[ATV1] HOW-TO install Sam's image to internal Apple TV harddrive

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Romey-Rome Offline
Junior Member
Posts: 20
Joined: May 2009
Reputation: 0
Post: #61
Here's what I get now on first boot after doing the internal install. (when it runs initialize.sh)

http://i56.tinypic.com/wu5dg3.jpg
find quote
fahadmp Offline
Junior Member
Posts: 9
Joined: Feb 2011
Reputation: 0
Post: #62
i ran the script on my usb drive (dev/sdc1) and i get this at the end of it:

Code:
Extracting image and imaging device
7550976+0 records in
7550976+0 records out
3866099712 bytes (3.9 GB) copied, 2966.27 s, 1.3 MB/s
Resync
Error: The backup GPT table is not at the end of the disk, as it should be.  This might mean that another operating system believes the disk is smaller.  Fix, by moving the backup to the end (and removing the old backup)?
Warning: Not all of the space available to /dev/sdc1 appears to be used, you can fix the GPT to use all of the space (an extra 8099870 blocks) or continue with the current setting?
Error: Error informing the kernel about modifications to partition /dev/sdc1p1 -- Invalid argument.  This means Linux won't know about any changes you made to /dev/sdc1p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 1 (Invalid argument)
Mounting device
mount: special device /dev/sdc13 does not exist
Injecting OS distro choice
chmod: cannot access `mnt/.distro': No such file or directory
Unmounting, clean up
umount: /dev/sdc13: not found

also how do i go about editing the appletv com.apple.Boot.plist if i am stuck at the "waiting for root file system" screen?
(This post was last modified: 2011-03-16 06:11 by fahadmp.)
find quote
Romey-Rome Offline
Junior Member
Posts: 20
Joined: May 2009
Reputation: 0
Post: #63
jumpcuts Wrote:You lost me on the tty via usb part...

He means plug in a USB keyboard to the aTV, then either exit XBMC, or hit ctrl+alt+F2.

And yes, SSH is broken on the USB install. Access denied.
find quote
pmcd Offline
Fan
Posts: 304
Joined: May 2008
Reputation: 0
Post: #64
Romey-Rome Wrote:He means plug in a USB keyboard to the aTV, then either exit XBMC, or hit ctrl+alt+F2.

And yes, SSH is broken on the USB install. Access denied.

Hmm ... I seem to be able to ssh into mine. I used a USB install to both a hard drive and a flash drive. user=atv, passwd=atv

philip
find quote
chris_b Offline
Junior Member
Posts: 13
Joined: Feb 2011
Reputation: 0
Post: #65
Sam.Nazarko Wrote:That is strange. It would appear the DNS resolution was successful: "svn.stmlabs.com:87.106.100.246:80", yet you still get a 404 return code. Try wget to obtain the file manually.
The username and password are atv-atv. You can login with a tty session using the USB port for verification. Your SSH is not working for some other reason - which is likely linked to your network problem. Does the initialisation script work on a PC, i.e. can you fetch the files aTV is trying to fetch from your machine? This will indicate where the fault lies

I have the same problem. apt-get update works, so I am able to fetch files from the hardy repositories. I can ssh into the machine from another machine on the local network.

Edit: got wget to work by omitting the "http://" Now the crystalhd script won't run because "zenity" isn't recognized. I think I will just read the contents of the script and enter them manually.

Edit2: just for giggles I tried to install zenity--it took about 30 minutes, pages of errors along the way. When it finally finished installing it still wouldn't run. Now downloading the installer .gz file as per script contents. Have to omit http:// or I get the 404 error as before when fetching the original script.
(This post was last modified: 2011-03-16 17:51 by chris_b.)
find quote
bigjuggler Offline
Junior Member
Posts: 34
Joined: Aug 2004
Reputation: 0
Post: #66
[quote=Sam.Nazarko]The script is supposed to resize even if using a USB install only. I checked the script and I noticed an abstractionism mistake: I used an absolute reference to /dev/sdb after calling partprobe which means if your USB HDD was not at /dev/sdb then the partitions would not have synchronised, thus the resize commands would have failed.


Hi Sam,

Just to offer some feedback, I saw the change you noted above. I reran the terminal commands:

wget http://svn.stmlabs.com/svn/crystalhd-for...ystalhd.sh
chmod +x crystalhd.sh
sudo ./crystalhd.sh

on a 40GB hard drive last night with the same results: entire drive is formatted as 4GB in size with a large unallocated block at the end.

Is there something else I need to do on my end to change the install script? Would the output of the terminal be useful to you? (I did not save it, but could reformat the drive again and copy it for you).

The drive boots ATV fine, installs 10.1 Dharma and all is lovely and I can ssh in with atv/atv.

Thanks again.

Craig
find quote
bigjuggler Offline
Junior Member
Posts: 34
Joined: Aug 2004
Reputation: 0
Post: #67
pmcd Wrote:Have a look at my reply to Sam. You don't need the patched parted for what you are trying to do ( which is also what I am trying to do). I ran parted from a shell on a Ubuntu 10 box. I assume Live would work. I outlined exactly what I had to do to fill up the space, and it works. Mind you, the swap size remains at 512megs. I don't know if that is sufficient.

philip

Hi Philip,

Thanks for the advice. Just a bit of clarification, since I am a real Linux noob, so if anyone wants to hold my hand:

I ran gparted and found that the third partition on my drive starts at sector 1118248. So, if I launch the terminal, is this what I should type:

parted
unit s
rm 3
mkpart primary 1118247
q

sudo e2fsck -f /dev/sdb3
sudo resize2fs /dev/sdb3

Can I do all this to the drive, even after I have booted the ATV with it and it installs Dharma 10.1. With the download, it takes about 3 hours to format the drive, so I want to make sure this is right before I mess with it.

Thanks so much.

Craig
find quote
Roders Offline
Member
Posts: 71
Joined: Oct 2009
Reputation: 0
Location: Northern Ireland
Post: #68
How does sam's image handle an external usb hard drive? I use an unraid server myself, but a friend would like me to install this on his atv and his media is stored on an external drive. Does it just plug in and work?
find quote
Sam.Nazarko Offline
Posting Freak
Posts: 835
Joined: Dec 2009
Reputation: 12
Location: London
Post: #69
fahadmp Wrote:i ran the script on my usb drive (dev/sdc1) and i get this at the end of it:

Code:
Extracting image and imaging device
7550976+0 records in
7550976+0 records out
3866099712 bytes (3.9 GB) copied, 2966.27 s, 1.3 MB/s
Resync
Error: The backup GPT table is not at the end of the disk, as it should be.  This might mean that another operating system believes the disk is smaller.  Fix, by moving the backup to the end (and removing the old backup)?
Warning: Not all of the space available to /dev/sdc1 appears to be used, you can fix the GPT to use all of the space (an extra 8099870 blocks) or continue with the current setting?
Error: Error informing the kernel about modifications to partition /dev/sdc1p1 -- Invalid argument.  This means Linux won't know about any changes you made to /dev/sdc1p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 1 (Invalid argument)
Mounting device
mount: special device /dev/sdc13 does not exist
Injecting OS distro choice
chmod: cannot access `mnt/.distro': No such file or directory
Unmounting, clean up
umount: /dev/sdc13: not found

also how do i go about editing the appletv com.apple.Boot.plist if i am stuck at the "waiting for root file system" screen?

This failed because you referenced a drive number! The default is /dev/sdb, and your device is /dev/sdc, what made you think you needed to add a 1 at the end. The script needs to reference the whole drive not one partition, and will append drive numbers automatically. Just use /dev/sdc

Romey-Rome Wrote:He means plug in a USB keyboard to the aTV, then either exit XBMC, or hit ctrl+alt+F2.

And yes, SSH is broken on the USB install. Access denied.

SSH is not broken.

bigjuggler Wrote:Hi Philip,

Thanks for the advice. Just a bit of clarification, since I am a real Linux noob, so if anyone wants to hold my hand:

I ran gparted and found that the third partition on my drive starts at sector 1118248. So, if I launch the terminal, is this what I should type:

parted
unit s
rm 3
mkpart primary 1118247
q

sudo e2fsck -f /dev/sdb3
sudo resize2fs /dev/sdb3

Can I do all this to the drive, even after I have booted the ATV with it and it installs Dharma 10.1. With the download, it takes about 3 hours to format the drive, so I want to make sure this is right before I mess with it.

Thanks so much.

Craig

Resizing works by default.

Roders Wrote:How does sam's image handle an external usb hard drive? I use an unraid server myself, but a friend would like me to install this on his atv and his media is stored on an external drive. Does it just plug in and work?

Perhaps. Remember if you have two drives connected you will have to ensure the internal one is still /dev/sda
find quote
pmcd Offline
Fan
Posts: 304
Joined: May 2008
Reputation: 0
Post: #70
bigjuggler Wrote:Hi Philip,

Thanks for the advice. Just a bit of clarification, since I am a real Linux noob, so if anyone wants to hold my hand:

I ran gparted and found that the third partition on my drive starts at sector 1118248. So, if I launch the terminal, is this what I should type:

parted
unit s
rm 3
mkpart primary 1118247
q

sudo e2fsck -f /dev/sdb3
sudo resize2fs /dev/sdb3

Can I do all this to the drive, even after I have booted the ATV with it and it installs Dharma 10.1. With the download, it takes about 3 hours to format the drive, so I want to make sure this is right before I mess with it.

Thanks so much.

Craig

As Sam mentioned the script works automatically now so there is no need to do it manually. Just in case though, when you run parted from the cli you will first type

parted
unit s
print ( so you can see where the partitions are in sector notation)
rm 3
mkpart primary (number you see as start for 3 in print) -1
etc...

The -1 just fills the whole thing up and avoids having to put the end number in.

philip
find quote
Post Reply