davilla / atvusb-creator

Automatically exported from code.google.com/p/atvusb-creator
27 stars 53 forks source link

Apple TV in factory restore loop + errors during Linux boot #557

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
My Apple TV is currently stuck in a factory restore loop.  When it boots up, it 
goes to the Factory Restore screen.  If I select "Restart", the Apple TV 
restarts and goes back to the same screen.  If I select "Run Diagnostics", the 
diagnostics run and report no problems.  If I select "Factory Restore", I get 
an error message saying that the factory restore failed.

I figured I'd give the patchstick a try to see if it could fix my problems, but 
I'm seeing errors during the Linux boot.  Here's the output:

     --- AppleTV Patchstick by ATVUSB-Creator ---
    * mounting OSBoot partition
    * mounting OSBoot partition
/dev/sda3
Checking HFS Plus volume.
Invalid B-tree node size
(0)
Volume check failed.
    * symlinking /mnt/rootfs -> /payloads
    * keeping the OSBoot partition r/w for plugins
    * mounting Media partition
/dev/sda4
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking Catalog hierarchy.
Checking volume bitmap.
Checking volume information.
The volume Media appears to be OK.
    * error mounting Media partition
    * Please unplug your Apple TV to reboot/reset the device.

At this point, I have a $200 paper weight.  I would appreciate any help getting 
my Apple TV working again in any capacity.  Thank you!

Original issue reported on code.google.com by kyle.g...@gmail.com on 23 Nov 2010 at 9:23

GoogleCodeExporter commented 9 years ago
there's a problem with your disk, specifically the OSBoot partition, use 
atvbootloader to boot to linux, reformat OSBoot then factory restore. The 
restore will repopulate OSBoot.

Original comment by sdavi...@gmail.com on 23 Nov 2010 at 11:53

GoogleCodeExporter commented 9 years ago
Still ain't working.  I created an atv-bootloader flash drive, booted into 
Linux, and noticed that, sure enough, the OSBoot partition was missing a file 
system:

# parted -s /dev/sda print
Model: ATA SAMSUNG HM160HC (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name      Flags
 1      20.5kB  35.7MB  35.7MB  fat32        EFI       boot
 2      35.7MB  455MB   419MB   hfs+         Recovery  atvrecv
 3      455MB   1399MB  944MB                OSBoot
 4      1399MB  160GB   159GB   hfs+         Media

I formatted the partition as HFS+, synced, and rebooted:

# mkfs.hfsplus -v OSBoot /dev/sda3
Initialized /dev/sda3 as a 900 MB HFS Plus volume
# parted -s /dev/sda print
Model: ATA SAMSUNG HM160HC (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name      Flags
 1      20.5kB  35.7MB  35.7MB  fat32        EFI       boot
 2      35.7MB  455MB   419MB   hfs+         Recovery  atvrecv
 3      455MB   1399MB  944MB   hfs+         OSBoot
 4      1399MB  160GB   159GB   hfs+         Media

# sync
# reboot

After rebooting, the Factory Restore screen came up again, but again the 
factory restore failed.  When I booted back into Linux using atv-bootloader, 
the partition was missing its file system again.

Original comment by kyle.g...@gmail.com on 24 Nov 2010 at 7:26

GoogleCodeExporter commented 9 years ago
try reformating both osboot and media. when I've played total restore games, 
I've always started with empty but formatted osboot and media partitions. Could 
be some bits on Media that are also causing problems with the factory restore.

Original comment by sdavi...@gmail.com on 24 Nov 2010 at 4:13

GoogleCodeExporter commented 9 years ago
OK I'll try that.  But just to be sure, I'm not missing any commands, right?  
Just mkfs and sync, or is there anything else?

Original comment by kyle.g...@gmail.com on 24 Nov 2010 at 6:06

GoogleCodeExporter commented 9 years ago
mkfs.hfsplus

Original comment by sdavi...@gmail.com on 24 Nov 2010 at 6:10

GoogleCodeExporter commented 9 years ago
Same problem after formatting both OSBoot and Media.  After running mkfs on 
both partitions, running fsck on both partitions says everything is OK.

Original comment by kyle.g...@gmail.com on 24 Nov 2010 at 6:36

GoogleCodeExporter commented 9 years ago
try making them journaled, "mkfs.hfsplus -j ..."

Original comment by sdavi...@gmail.com on 24 Nov 2010 at 7:37

GoogleCodeExporter commented 9 years ago
Same result.

Original comment by kyle.g...@gmail.com on 25 Nov 2010 at 1:06

GoogleCodeExporter commented 9 years ago
that would seem to indicate that a) something wrong with bits in recovery 
partition or b) recovery is having some problem populating OSBoot. Are the disk 
partitions native, ie never been altered? ATV efi is very picky about starting 
sectors.

Original comment by sdavi...@gmail.com on 25 Nov 2010 at 2:27

GoogleCodeExporter commented 9 years ago
Before this troubleshooting session with you, I've never used atv-bootloader 
and I've never altered the partitions.  I'll tell you what I was doing when 
this all went down:
   1. Uninstalled XBMC/Boxee using the instructions on the site (I had installed
      them using a patchstick).
   2. Rebooted the AppleTV and verified the Launcher menu was gone.
   3. Tried to initiate a factory restore.

Original comment by kyle.g...@gmail.com on 26 Nov 2010 at 5:31

GoogleCodeExporter commented 9 years ago
In reference to point (a) in comment 9, the recovery partition appears to be 
OK, but admittedly I'm not sure what to look for:

# fsck.hfsplus -f /dev/sda2
** /dev/sda2
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking volume bitmap.
** Checking volume information.
** The volume Recovery appears to be OK.
# cd /mnt
# mkdir recovery
# mount /dev/sda2 recovery/
# ls recovery/
BootLogo.png          OS.dmg                mach_kernel.prelink
Desktop DB            boot.efi
Desktop DF            com.apple.Boot.plist

Original comment by kyle.g...@gmail.com on 29 Nov 2010 at 2:28

GoogleCodeExporter commented 9 years ago
Im having the same issue,  Were you able to fix this ?

Original comment by imran.mu...@sbcglobal.net on 3 Jan 2011 at 7:11

GoogleCodeExporter commented 9 years ago
Nope, ended up selling the unit on eBay for $40.  :-(

Original comment by kyle.g...@gmail.com on 3 Jan 2011 at 8:10