Forum
[PROBLEM] How to restore IMG backup file - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Others (/forum-24.html)
+--- Thread: [PROBLEM] How to restore IMG backup file (/thread-2042.html)



How to restore IMG backup file - Carpenter - 20th Jan, 2014 07:05 PM

Software
XBian version: Beta 2
XBMC version: Latest
Overclock settings: Turbo

Hardware
Power supply rating: 1mA
RPi model (model A/B 256mb/512mb): 512mb
SD card size and make/type: 4gb ICIDU
Network (wireless or LAN): LAN
Connected devices (TV, USB, network storage, etc.): TV, USB

Logile
Link to logfile(s):

Problem description:
After updating XBian, it somehow got stuck at the boot screen for no apparent reason after rebooting. Having made a complete backup (in the XBian Config screen in XBMC) I thought it would be really easy to put that back to the SD Card, but when I copied it back with the help of Win32DiskImager it only showed a blinking dash on the screen when starting up.

Did I do something wrong? And is there a way to open the IMG file myself and copy all necessary file to a freshly installed XBian?

How to reproduce:


RE: How to restore IMG backup file - Carpenter - 20th Jan, 2014 10:33 PM

Hmm for now I solved it by mounting the img file and copying all the necessary files.

Is used the following info to mount the image file:
http://askubuntu.com/a/236284


RE: How to restore IMG backup file - IriDium - 21st Jan, 2014 04:57 AM

It sounds like the image has a corrupt config.txt or cmdline.txt.

Do they look right? If unsure post both the files and we'll have a look.


RE: How to restore IMG backup file - mk01 - 25th Jan, 2014 05:56 PM

(20th Jan, 2014 10:33 PM)Carpenter Wrote:  Hmm for now I solved it by mounting the img file and copying all the necessary files.

Is used the following info to mount the image file:
http://askubuntu.com/a/236284

@Carpenter,

are you on stable ? this is shortly discussed in ?Beta2? thread I have the feeling. The whole problem is only the clock (turbo) and is caused by some not good patches to firmware and kernel on upstream repositories.

but the reason is known and fix is already at devel repo. soon to be released if anyone currently testing it doesn't say otherwise.


RE: How to restore IMG backup file - Carpenter - 28th Jan, 2014 01:26 AM

(25th Jan, 2014 05:56 PM)mk01 Wrote:  
(20th Jan, 2014 10:33 PM)Carpenter Wrote:  Hmm for now I solved it by mounting the img file and copying all the necessary files.

Is used the following info to mount the image file:
http://askubuntu.com/a/236284

@Carpenter,

are you on stable ? this is shortly discussed in ?Beta2? thread I have the feeling. The whole problem is only the clock (turbo) and is caused by some not good patches to firmware and kernel on upstream repositories.

but the reason is known and fix is already at devel repo. soon to be released if anyone currently testing it doesn't say otherwise.
Yes I am on Stable. Tried it again today and now I have a non-starting RPi again Dodgy Where can I find correct config.txt and cmdline.txt files?


RE: How to restore IMG backup file - IriDium - 28th Jan, 2014 05:06 AM

Can you post both files


RE: How to restore IMG backup file - Carpenter - 28th Jan, 2014 05:52 PM

(28th Jan, 2014 05:06 AM)IriDium Wrote:  Can you post both files
It has to do with overclocking indeed. I have a standard config.txt with no overclocking enabled. When I overclock my RPi in the config via SSH then it won't start anymore. But when I copy back the standard config.txt it works again. So, I will wait for the new firmware then Wink


RE: How to restore IMG backup file - IriDium - 29th Jan, 2014 06:40 AM

Looking at your setup you only have a 1amp PSU on Xbian OC 840mhz, the RPi can draw 800ma.

Maybe the Turbo setting is drawing tooooo much. Just a thought.

If possible can you try a higher PSU - say 2amp - and see if you get the same problem.

If that works, then that is the issue.


RE: How to restore IMG backup file - Carpenter - 29th Jan, 2014 04:58 PM

I don't think so, had it always running on Turbo overclock with no issues. Only now for a few weeks this is causing issues...


RE: How to restore IMG backup file - salar521 - 11th Apr, 2014 05:03 PM

You see, I used Image Backup to back up my files. Now, after I refreshed and stuff my PC, I dunno how to recover the files!


RE: How to restore IMG backup file - mk01 - 19th Apr, 2014 12:21 AM

@salar521

image backup is supposed to be directly "flashed" into SD card back.

but if you manually installed new XBian etc, you can "open" the .img file as block device (like USB disk).

Code:
sudo -i
modprobe loop
kpartx -av /path/to/my/img.file

kpartx command will create two new "partitions" - /dev/mapper/loop0p1 and /dev/mapper/loop0p2 - which you can mount manually or just with "usbmount" command (and content should appear under /media)
Code:
sudo usbmount /dev/mapper/loop0p2



RE: How to restore IMG backup file - QuadCorei8085 - 21st May, 2014 03:49 AM

Tricky question: as the SD can corrupted i moved (copied) the XBIAN to an external USB partiotion (sda1) right after installation, using the built in xbian-config/"xbian copier".

After finished configuring and installing my XBIAn i've made an IMG with the same "xbian copier".

How can I restore the IMG to sda1? dd?

[edit]:
Also: how can a simple power outage corrupt my external usb HDD so much that XBIAN can only boot up to "the blinking cursor"?
Happened to me 2x so far. Really annoying to reinstall the whole system after every power outage.


RE: How to restore IMG backup file - mk01 - 22nd Jun, 2014 08:25 AM

@QuadCorei8085

my posts discussing shortly your like-your case should be few messages above.
blinking cursor is not XBian filesystem corruption (rootfs). Blinking cursor means Fw or Kernel failed to load what is a way before XBian starts.

What helps mostly is just take card out and do checkdisk on 1st partition. if this is happening so ofter for you, remove automount of /boot from /etc/fstab. When the FAT is not mounted, can't be damaged.

Of course even rootfs can get corrupted, but for past year we had maybe 5-10 such reports. There are even people powering RPI with XBian from TV's usb port - just turning TV off/on without issues. Google will list such reports even on internet. .