PDA

View Full Version : Image Restore for beginner??


robinsonkruse
February 26th, 2010, 10:46 AM
Hi,
I am not able to boot the ATV anymore. Maybe I have moved the wrong files via Cyberduck. I always get the blinking question mark. AND the factory reset fails.

I've already connected the ATV harddrive to my Mac and the image file "smallatv.dmg" is ready to work.

BUT: I've read through several tutorials how to restore an image on the ATV harddrive but to me it sounds very complicated. And it seems a lot of people have trouble with that (especially on the terminal level).
Since I am not advanced I was wondering if there isn't a easier way to fix this.
The folder structure on the harddrive seems to be correct (3 folders: OSBoot, Media, disk3s2)

Maybe a file is missing somewhere?

Is there something I could manually try before I do a full restore?

JimWiley
February 26th, 2010, 11:08 AM
You could try this:

http://forum.boxee.tv/showpost.php?p=87208&postcount=8

You'll have to put the HDD back into the ATV, replace your patchstick.sh on your atvusbcreator made patchstick (one that you've already used and know that it works) with the script from the thread. Pull the power to the ATV, plug in your modified USB stick, apply the power and let it run.

Afterwards, you may still have to do a factory restore, which may work after you've done the above.

If none of that works, then you'll need to either make a custom patchstick, which is a bit more extreme (but the instructions are step-by-step and - sort of - straight forward):

http://code.google.com/p/atv-bootloader/wiki/ATVBackup

you need to scroll down to the section titled "Opps I did not make a backup". You'll need a linux install on a computer somewhere to make this work, but if you've got an intel mac or a PC, then it is possible to do from a Linux-Live CD/USB so you don't have to install Linux if you don't want.

If you have questions, then the comments section contains questions from people who have gone wrong or don't understand and Davilla does his best to guide them on their way. I would read the method first to understand it, then read all the comments and Davilla's responses to flesh out your understanding and finally take the plunge! Anyway, hopefully it won't come to this....

Jim

robinsonkruse
February 26th, 2010, 12:58 PM
Hi Jim,
I've tried first solution but without any success, unfortunately.

I've read the instructions for solution 2 but it scares me a bit. Sounds quite complicated for a dummy like me.

Isn't it possible to connect the ATV hard drive to the Mac (via IDE-USB cable) and do a manually factory reset at this level?

robinsonkruse
February 26th, 2010, 01:15 PM
Jim ... I was wondering if it isn't possible to copy the content of the "OS-dot-DMG 1.0.dmg" file into the OSBOOT partition of the ATV hard drive in order to overwrite the old, probably corrupted folders, with the original files.
Or do the same with Disk Utility > Restore??

JimWiley
February 26th, 2010, 02:31 PM
Jim ... I was wondering if it isn't possible to copy the content of the "OS-dot-DMG 1.0.dmg" file into the OSBOOT partition of the ATV hard drive in order to overwrite the old, probably corrupted folders, with the original files.
Or do the same with Disk Utility > Restore??

You need to have a Recovery.dmg which contains OS-dot-DMG 1.0.dmg (renamed as OS.dmg) and the other files from the same os rev from the list in the link like. Furthermore, if you started with a ATV that was 2.x from the factory, then the 1.0 Recovery partition may not be able to restore your ATV because your ATV will have a different rev firmware that will not recognize the 1.0 recovery. The guide I linked to seems to suggest that if this the case, you can use the 2.x firmware downloads themselves to create recovery partitions.

You could try hooking up the drive to your Mac, deleting the system and media partitions (but not the recovery one!) and put the drive back in the ATV and trying system restore. It may be able to recover the system if you remove a damaged partition... if that doesn't work, you'll probably need to use Davilla's method...

So if the above suggestion doesn't work (and I'm sceptical that it will...), then rather than going it alone and trying it on a mac, I'd suggest you follow the section that starts "oops" and when you've done that, go to the "restore" section and carry on from there. There's probably a very good reason that Davilla did not write the guide for Macs. I'd stick with his method exactly as documented so that you do not make things worse (I know it probably doesn't seem possible at the moment).

The question is, why does your Restore function fail on your ATV, does it mean you have a disk error? If you go through all that above you will still have a faulty disk?

At the end of the day, you are not the expert on this, I am certainly not the expert, but Davilla most definitely is THE expert. That means that any advice he can give you (via his guide) is two-hundred-million times better than anything we can come up with!

Good luck and sorry about the essay!

Jim

robinsonkruse
February 26th, 2010, 03:01 PM
Jim,
thank you so much. I really appreciate your help.
Since I am overstrained with that, I've decided to wait until monday so that I can ask a friend of mine who is a software developer for help.

I will let you know how it worked. Hopefully there is no hardware error.

Have a nice weekend.

Sven

robinsonkruse
February 26th, 2010, 03:15 PM
Sorry Jim, one more question:
How can I find out with which version the ATV was delivered? (1.x or 2.x)
It seems that this is important.

JimWiley
February 26th, 2010, 03:37 PM
Have you every had to do a factory restore before?

Whatever the ATV went back to then is what you had. For instance, when I factory restore, I get 1.0. Without being able to access you recovery partition, it's hard to say....

Jim

robinsonkruse
February 26th, 2010, 04:04 PM
No, I've never did a factory restore. Damn! It seems that I will never find it out. Without knowing the default version is it actually possible to do the solution from davilla???
I have a image file called "smallatv.dmg" that supposed to replace everything on the hard drive. Would it be saver to do it like this???
Oh man, why does it has to be so complicated?

JimWiley
February 26th, 2010, 04:12 PM
No, I've never did a factory restore. Damn! It seems that I will never find it out. Without knowing the default version is it actually possible to do the solution from davilla???
I have a image file called "smallatv.dmg" that supposed to replace everything on the hard drive. Would it be saver to do it like this???
Oh man, why does it has to be so complicated?

Well, lets think about this:

1) if you remove the other two partitions and just leave the recovery partition and then run factory restore, you might be ok anyway.

2) if (1) doesn't work, and you haven't had the ATV that long try a 2.x image, because this is most likely to work. (and you can always get 1.0 features by using your 1.0 Recovery image and nito's smart installer)

3) (2) will probably work even if you have a 1.x ATV, but if it doesn't then repeat (2) with a 1.0 Recovery.dmg and you'll definitely be ok! if you get to this stage and want help turning your OS-dot-DMG 1.0.dmg into a proper 1.0 Recovery.dmg, give me a shout via PM and I'll see you right...

This way you don't have to worry about it, you just do the list in the order things are most likely to work and potentially reduce the amount of messing around you have to go through...

Jim

robinsonkruse
February 26th, 2010, 05:32 PM
Sounds like a good plan.
So I first remove the "OSBoot" and "Media" partition (with Disk Utility) and then run the factory restore by turning on the ATV and holding MENU and the - button, right?

JimWiley
February 26th, 2010, 06:06 PM
Sounds like a good plan.
So I first remove the "OSBoot" and "Media" partition (with Disk Utility) and then run the factory restore by turning on the ATV and holding MENU and the - button, right?

I can't remember the exact key press, but I'm assuming it'll automatically go into recovery when it can't find the OSBoot partition! It'll try a couple of times to boot (until it reaches a set number of unsuccessful tries) and then offer you the recovery menu. Of course, it may still struggle to recover and then you're on to step (2)!

Jim

robinsonkruse
February 26th, 2010, 06:11 PM
Sounds like a good plan.
So I first erase the "OSBoot" and "Media" Partition with Disk Utility and then I will run the factory reset by turning the ATV on while holding the MENU and - button, right?

JimWiley
February 26th, 2010, 06:16 PM
Sounds like a good plan.
So I first erase the "OSBoot" and "Media" Partition with Disk Utility and then I will run the factory reset by turning the ATV on while holding the MENU and - button, right?

Yeah, you can remove those two partitions and then try it - can't guarantee it'll work though. If you want the exact keypress to force a factory restore I don't remember it, sorry...

Jim

robinsonkruse
February 26th, 2010, 06:36 PM
BAD NEWS. Number 1 didn't work!
I've removed the two partitions, but I still get this stupid blinking question mark.

I think have enough for today. Will go to bed and try to calm down. (It's almost 2 o clock in the night)
Tomorrow I'll try Number 2.

Thank you Jim for your support!!! I really appreciate it!

JimWiley
February 26th, 2010, 07:26 PM
BAD NEWS. Number 1 didn't work!
I've removed the two partitions, but I still get this stupid blinking question mark.

I think have enough for today. Will go to bed and try to calm down. (It's almost 2 o clock in the night)
Tomorrow I'll try Number 2.

Thank you Jim for your support!!! I really appreciate it!

Yeah, sadly I had a feeling that it wouldn't. Sounds like you've had a disk problem that has damaged your recovery partition. Davilla's restore technique should get you back on your feet though...

Jim

robinsonkruse
February 27th, 2010, 10:04 AM
Hi Jim,
I was wondering if I could try a "full" restore before I try davilla's technique (which seems to be way more advanced).
Or is it not possible in this order?
Would you please read the following explanation which comes with the "smallatv.dmg" restore file and tell me what you think about it.

"This is a single file working "FULL" restore of a AppleTV. Restore image is based on 2.0.2 and all you have to do is DD it to an empty HD. After that do a restore/recovery from within AppleTV. Made from a 60GB hd, but just restore and ignore any errors. Only the first 2GB, the rest is the Media partition, and AppleTV will recreate it on a restore."[/SIZE][/SIZE]

JimWiley
February 27th, 2010, 02:15 PM
Hi Jim,
I was wondering if I could try a "full" restore before I try davilla's technique (which seems to be way more advanced).
Or is it not possible in this order?
Would you please read the following explanation which comes with the "smallatv.dmg" restore file and tell me what you think about it.

"This is a single file working "FULL" restore of a AppleTV. Restore image is based on 2.0.2 and all you have to do is DD it to an empty HD. After that do a restore/recovery from within AppleTV. Made from a 60GB hd, but just restore and ignore any errors. Only the first 2GB, the rest is the Media partition, and AppleTV will recreate it on a restore."[/SIZE][/SIZE]

Can't hurt to try it. If it all goes completely wrong than Davilla's method will give you a working ATV on a new blank HDD if necessary, but then it sounds like this method does too - give it a go! If you have a fresh, compatible HDD laying around then I'd try it on that since you may have underlying problems with your existing ATV HDD (hence problems restoring from default recovery partition...). If not, give it a go with your existing HDD and see if it works. If not, you may want to find a new HDD...

Jim

Jim

robinsonkruse
February 28th, 2010, 06:17 PM
Thank you Jim. I will try both methods tomorrow, if necessary.
Let you know whether it was successful or not.

Sven

robinsonkruse
March 1st, 2010, 11:48 AM
Hi Jim,
no news today. But I've prepared myself for the final showdown.

At first I've read through davilla's explanations in order to understand better how is it all working.
Now I have the following things ready to work:
1. Linux Live CD, 2. USB Boot pen, 3. dmg2img application

What is still missing is the Apple dmg.file.
Here comes my question:
You've written that the Recovery.dmg version has to fit to the firmware rev.
The seller of my ATV said this my ATV is pretty new and should have something like 3.x. But he doesn't know it exactley.

How important is it to have the correct dmg version?

Is it possible to get access to the recovery partition in the ATV in order to find out? (in Disk Utility the partition is greyed out and )
By the way, I had only 3 partitions. Davilla write that there must be 4 (System, Media, Recovery, EFI). Do I have to worry?

Thanks again for your support.

JimWiley
March 1st, 2010, 12:46 PM
Hi Jim,
no news today. But I've prepared myself for the final showdown.

At first I've read through davilla's explanations in order to understand better how is it all working.
Now I have the following things ready to work:
1. Linux Live CD, 2. USB Boot pen, 3. dmg2img application

What is still missing is the Apple dmg.file.
Here comes my question:
You've written that the Recovery.dmg version has to fit to the firmware rev.
The seller of my ATV said this my ATV is pretty new and should have something like 3.x. But he doesn't know it exactley.

How important is it to have the correct dmg version?

Is it possible to get access to the recovery partition in the ATV in order to find out? (in Disk Utility the partition is greyed out and )
By the way, I had only 3 partitions. Davilla write that there must be 4 (System, Media, Recovery, EFI). Do I have to worry?

Thanks again for your support.

boot.efi is a file that should be in the dmg image. AFAIK 2.x to 3.x wasn't the same leap as from 1.x to 2.x, so you should be pretty safe with a 2.x dmg.

Didn't dd-ing the smallatv image work? If the dd failed, then it might be possible to try again. Sometimes dd can fail for no apparent reason and then work perfectly fine when you repeat it! Also if it didn't work, may indicate a faulty drive... Have you tried it on another HDD? It does sound like your drive has problems... If the smallatv restore didn't work, then why do you think that Davilla's method will work with the same drive?

Anyway, you'll be a commandline god by the time you've finished this mission! Good luck...

Also you can always repeat the process with 1.x and 3.x on a new drive and you'll eventually get something that'll boot!

Jim

robinsonkruse
March 1st, 2010, 05:04 PM
I am not sure with the full restore method. I have no blank hdd lying around.
And then I've read about some errors with the smallatv file.

If you think that I won't make it worse then I will give it a try.

Can I do Davilla's method with a blank hdd as well?

Sorry for my hesitation. It is just because this whole stuff is pretty new to me and I don't want to make it worse. I would really like to see this HDD working (it's a 1TB).

robinsonkruse
March 1st, 2010, 06:25 PM
Hi Jim,
I've decided to do a backup of my current hdd (just in case).
I used AtvCloner and now I have a my partitions as dmg files.
I've discovered something strange when I've looked into the dmg files.
Davilla said that the "EFI" partition is typically empty and the "Recovery" partition contains the disk image. In my case it's the other way around.
Can this be the reason for my problem?

Thanks again.

JimWiley
March 2nd, 2010, 02:31 AM
Hi Jim,
I've decided to do a backup of my current hdd (just in case).
I used AtvCloner and now I have a my partitions as dmg files.
I've discovered something strange when I've looked into the dmg files.
Davilla said that the "EFI" partition is typically empty and the "Recovery" partition contains the disk image. In my case it's the other way around.
Can this be the reason for my problem?

Thanks again.

Certainly sounds like your EFI has become corrupted somehow, and also messed up you recovery partition - which is why you can't do a restore.

However, you must ask yourself if this is the underlying disease or just a symptom: If somehow your EFI became corrupt and then messed up your recovery partition, then wiping the disk and restoring it from scratch using Davilla's method will work. BUT, if you have say a scratched surface on one of the platters of your HDD or other mechanical fault with your HDD, then no amount of restoring will either solve the problem or stop it recurring.

For safety (and peace of mind) I would grab a fresh HDD and use Davilla's method - it should work on a totally empty drive and you can even grab a larger capacity drive and pimp your ATV at the same time....

Jim

robinsonkruse
March 3rd, 2010, 02:09 PM
Hi Jim,
I've tried the smallatv.dmg full restore but without any success.
Probably you are right and my hdd has a problem. If I'm lucky I will get another hdd tomorrow, so I can try again.
Otherwise I would try Davilla's method.
While I've read through his instructions again I figured out that I need a Linux USB Pen for this action.
Is it really necessary in my case? I mean, I can connect the hdd with my IDE-USB adapter directly to my Macbook.

Thanks again for your patience.

JimWiley
March 3rd, 2010, 02:50 PM
Hi Jim,
I've tried the smallatv.dmg full restore but without any success.
Probably you are right and my hdd has a problem. If I'm lucky I will get another hdd tomorrow, so I can try again.
Otherwise I would try Davilla's method.
While I've read through his instructions again I figured out that I need a Linux USB Pen for this action.
Is it really necessary in my case? I mean, I can connect the hdd with my IDE-USB adapter directly to my Macbook.

Thanks again for your patience.

Yeah, Davilla's method makes a custom patchstick, that'll recreate your ATV's drive structure for you, I think. When you make a normal patchstick you are just making some kind of a Linux Penbuuntu installation, this is no different really.... just a bit more 'hands on'.

Just to be on the safe side, I would just follow Davilla's method to the letter. If you start to get creative because you somehow think it will be easier to do it your way - I bet it'll actually end up taking you more time and still end up not working... It's what my mum calls 'false economy'...

Jim

robinsonkruse
March 5th, 2010, 11:11 AM
Hi Jim,
after another two days struggling with the smallatv restore and davilla's method I have to give up. I'm sure that davilla's method works but this is just to advanced for me. I've tried different restores with the old and a fresh 40GB hdd but without any success.

Now I'm thinking about buying an original ATV 40GB hdd for 20bucks and doing my own restore files with "ATVCloner" and copy them back.

What do you think? Have you heard any good or bad things about the "ATVCloner"?. It is a perfect tool for non-programmers like me. But does it work?

Thanks.

JimWiley
March 5th, 2010, 11:19 AM
Hi Jim,
after another two days struggling with the smallatv restore and davilla's method I have to give up. I'm sure that davilla's method works but this is just to advanced for me. I've tried different restores with the old and a fresh 40GB hdd but without any success.

Now I'm thinking about buying an original ATV 40GB hdd for 20bucks and doing my own restore files with "ATVCloner" and copy them back.

What do you think? Have you heard any good or bad things about the "ATVCloner"?. It is a perfect tool for non-programmers like me. But does it work?

Thanks.

Never heard of ATVCloner! But if you're buying an already working ATV HDD, couldn't you just put it straight in? My problem is this, what if after all is said and done, you've tried Davilla's method on a new HDD and smallatv method on a new HDD and then you put in a bought ATV HDD and find it doesn't boot because it's a hardware problem with your ATV? That's why I've only recommended things that can be done for free, because you won't waste any cash if there's something fundamentally wrong with the ATV.

As far as Davilla's method is concerned, what specific difficulty are you having? You mentioned a tech friend... why not get him to do it in exchange for a few pints? That way, you get a working ATV for free and get to go out on the lash with a mate... sounds like win-win?

Jim

robinsonkruse
March 5th, 2010, 11:44 AM
Never heard of ATVCloner! But if you're buying an already working ATV HDD, couldn't you just put it straight in? My problem is this, what if after all is said and done, you've tried Davilla's method on a new HDD and smallatv method on a new HDD and then you put in a bought ATV HDD and find it doesn't boot because it's a hardware problem with your ATV? That's why I've only recommended things that can be done for free, because you won't waste any cash if there's something fundamentally wrong with the ATV.

As far as Davilla's method is concerned, what specific difficulty are you having? You mentioned a tech friend... why not get him to do it in exchange for a few pints? That way, you get a working ATV for free and get to go out on the lash with a mate... sounds like win-win?

Jim

Hi Jim,
that tech friend turned out to be not able to help me in this specific case. We've read the instructions together, but he was more or less same helpless like me. Davilla's method is so far I understand designed to create a Linux based USB rescue pen that hack the ATV without opening it, using telnet.
But all the commands are killing me.
Meanwhile I am able to connect the hdd to my Macbook and do some stuff with the terminal, like formating and copying files. But this whole partitioning seems so complicated. And then I don't really understand how to create a rescue.dmg, that is so important in my case. If it is not so complicated than I thought maybe you have a step by step instruction or a good link. As far as I understand I only have to create a proper recovery partition that I can access with MENU + (-) button and the AVT will do the rest when running a factory restore.

Concerning the ATV hdd. I wanted to buy this hdd to make an image from an original hdd that is hopefully not corrupted. Because the problem is that I don't know if the smallatv.dmg is good or not. It just doesn't work with my ATV. Of course I don't want to replace my 1000GB with a 40GB.

You know, all this trial and error procedures drive me crazy. If I had a untouched ATV hdd and an image of this, I could be sure that the image is not the problem.

I am just tired. At the moment I'm copying the smallatv.dmg file on the new hdd with terminal commands instead of ATVClonder. Maybe this helps.

What is your advise to me?

SamNazarko
March 5th, 2010, 01:16 PM
Hey,

It's about time I create an account on this site. I've seen a few people with aTV problems and seeing as I work on the patchstick with Scott (I am the Windows developer) I feel it's wrong I shouldn't help.

I recently upgraded a friend's HDD for him, from scratch. It really is simple - I did this on Windows without Mac or Linux, which did make it more difficult. What I did was use the rebuild.sh script. This recreates all your partitions from a USB so that all you have to do is click Factory Restore after doing so and your golden.

First, you should make sure your partition is intact. You can just run the rebuild.sh patchstick no probs. If you have any issues with location of partitions - then you need to format them using the "Oops I didn't make a backup bit".

I'd give you a direct link to it on Google Code but Google is giving me a 502 right now. Check out our project page (atvusb-creator), it's under atvusb 1.0b10 trunk in SVN

If you're using Windows:

Download a firmware image - any will do.

Download 7zip

Extract 2.hfs from the DMG file with 7zip

Extract boot.efi, mach_kernel, com.apple.boot.plist and your boot logo (yes it can be custom ^^) and the DMG as OS.dmg

Create a patchstick in atv-win-3.0 (the tool I uploaded recently)

Don't restore it to a drive, instead what you want is the IMG generated.

Download fullfat (see google code) again

Use FFTerm to interact with the disk image.

Put them under the directory specified of the rebuild.sh (I think payloads/rebuild).

Replace patchstick.sh on the root of the partition with the rebuild.sh (make sure it's called patchstick.sh) though.

Whack in your USB, and you're done.

If you use OS X or Linux you can reduce half the steps needed because dmg and img support is native in these operating systems and you will find it harder in Windows because file manipulation of these extensions are NOT native. That means FFTerm, FullFat etc won't be needed - you will just be able to drag and drop the necessary components on the stick.

Alternatively, consider booting a fresh atv-bootloader and running your rebuild.sh through telnetd, this could save you a lot of trouble.

If you have any issues what so ever contact me by email (you will find it if you look)

Sam

JimWiley
March 5th, 2010, 02:08 PM
You know, all this trial and error procedures drive me crazy. If I had a untouched ATV hdd and an image of this, I could be sure that the image is not the problem.

I am just tired. At the moment I'm copying the smallatv.dmg file on the new hdd with terminal commands instead of ATVClonder. Maybe this helps.

What is your advise to me?

Look at the post below yours. This guy knows his onions - he's the co-maintainer of the project with Davilla. And looks like he's willing to talk you through any sticky bits. I'd totally take him up on it. Why don't you PM him with the parts of Davilla's guide that gave you the problems and perhaps he can nudge you through?

Jim

robinsonkruse
March 16th, 2010, 06:10 PM
Today I gave my ATV to an "unauthorized" Apple repair store.

Here is what happened:
I've found out that the reason for my problem is not a corrupted file/partition structure but a hardware defect. The hdd will not be recognized, what can be detected by running a LINUX script via the USB patchstick pen (sda=USB pen, sdb=missing). I propose that the IDE ribbon is defect, which I couldn't find in ordinary electronic stores.

Hopefully I will get my ATV back soon up and running.

Thanks very much to Jim for his patience with my question and Sam for his support via mail.