Since it was requested I put together a quick tutorial on how to copy the image (should work for full and minimal) to the internal drive without removing the ATV OS. (usb drive plugged in boots to Linux, drive removed boots to OS X).
Pretty much everything in this tutorial comes from
here or
here so credit goes to the original authors.
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
For some reason the version of Parted included in Ubuntu 8.0.4 generates partitions that stop the ATV OS from booting properly. I couldn't figure out why so I switched to running Parted from the atv-bootloader package since it works perfectly.
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 vim for editing files throughout this tutorial. Feel free to use emacs, nano, 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 xbmc pass xbmc)
Copy Data
Code:
sudo mkdir /media/atvdrive
sudo mount /dev/sda5 /media/atvdrive/
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 vim /media/atvdrive/etc/fstab
replace the root partition (/) UUID with the uuid you saved for sda5
replace the swap partition UUID with 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 fsck.hfsplus /dev/sdb2
sudo mkdir /media/atvboot
sudo mount /dev/sdb2 /media/atvboot
sudo vim /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
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