Best way to restart following freeze
#1
Chaps, I have been stung before by simply pulling out the power cord following a raspbmc freeze. My 1tb hard drive that I had hooked up to a powered subs hub partitioned and it has taken me 1 month to recover some of the data.

So my question is, when this happens again, what can I do that won't partition my hard drive?
Reply
#2
Ssh in and run 'sudo reboot'. Usually a freeze will only be an XBMC freeze not the underlying Linux OS. This will do a controlled reboot that won't corrupt any files.

If you can't ssh in or even ping the Pi then pulling the plug is the only choice though.
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#3
Keep current backups of the partition table and partitions
Derek
Reply
#4
Thanks for the 'sudo reboot' suggestion, I was looking for an answer to this too. I've experienced problems when pulling the plug or doing 'shutdown -r now', not being able to boot or getting a kernel panic when booting. Could that be because of a corrupted SD or USB caused by improper shutdown?
Reply
#5
(2014-03-24, 11:16)ajp2k14 Wrote: Thanks for the 'sudo reboot' suggestion, I was looking for an answer to this too. I've experienced problems when pulling the plug or doing 'shutdown -r now', not being able to boot or getting a kernel panic when booting. Could that be because of a corrupted SD or USB caused by improper shutdown?

It sounds like it could be. You might want to do a fsck on the partitions on the SD card. I had a similar issue and fsck fixed it. i found sometimes it's beyond repair and a restore from a backup copy was necessary. That's why its a very good idea to store dd images handy; to avoid rebuilding.
Reply
#6
Don't know if they have fixed watchdog software in the Pi yet, but you could install it to just reboot the Pi and/or restart xbmc when it hangs.
http://www.sat.dundee.ac.uk/psc/watchdog...stall.html
Reply
#7
(2014-03-24, 15:18)dmdsoftware Wrote:
(2014-03-24, 11:16)ajp2k14 Wrote: Thanks for the 'sudo reboot' suggestion, I was looking for an answer to this too. I've experienced problems when pulling the plug or doing 'shutdown -r now', not being able to boot or getting a kernel panic when booting. Could that be because of a corrupted SD or USB caused by improper shutdown?

It sounds like it could be. You might want to do a fsck on the partitions on the SD card. I had a similar issue and fsck fixed it. i found sometimes it's beyond repair and a restore from a backup copy was necessary. That's why its a very good idea to store dd images handy; to avoid rebuilding.

Any suggestions on how to dd the SD card? I'm mostly a Windows user so maybe it would be easier to just clone the SD card in Windows using some Windows software (Win32diskimager?)? I suppose I could just put the SD in my PC and copy the files? The other files/settings are on my USB but I've started using XBMC backup addon for that..
Reply
#8
(2014-03-24, 15:47)bac522 Wrote: Don't know if they have fixed watchdog software in the Pi yet, but you could install it to just reboot the Pi and/or restart xbmc when it hangs.
http://www.sat.dundee.ac.uk/psc/watchdog...stall.html
Raspbmc already runs a watchdog:

Code:
root      1758  0.0  0.0   1628   188 ?        Ss   15:02   0:00 /usr/bin/raspdog --device=/dev/watchdog --interval=5
Most "freezes" are just XBMC hanging though - the watchdog won't do anything about those because the underlying OS has not crashed.
Kodi 18.3 - Mid 2007 Mac Mini, 4GB, 2TB HD, Windows 7 SP1
Kodi 18.3 - Vero4k, Raspberry Pi 2. OSMC.
Reply
#9
(2014-03-24, 17:11)DBMandrake Wrote:
(2014-03-24, 15:47)bac522 Wrote: Don't know if they have fixed watchdog software in the Pi yet, but you could install it to just reboot the Pi and/or restart xbmc when it hangs.
http://www.sat.dundee.ac.uk/psc/watchdog...stall.html
Raspbmc already runs a watchdog:

Code:
root      1758  0.0  0.0   1628   188 ?        Ss   15:02   0:00 /usr/bin/raspdog --device=/dev/watchdog --interval=5
Most "freezes" are just XBMC hanging though - the watchdog won't do anything about those because the underlying OS has not crashed.
That's true, in the past think I just wrote scripts to watch a process and restart it if they locked up.
Reply

Logout Mark Read Team Forum Stats Members Help
Best way to restart following freeze0