*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: [1]
Print
Author Topic: What to do after a hanging episode  (Read 2647 times)

What to do after a hanging episode

saptecai
Commenter

Posts: 6


April 17, 2008, 11:21:27 PM

My laptop hangs sometimes for ages.
If I power down or Ctrl-Alt-Erase, when I boot up it goes into this fit of alternating the light grey screen (a few seconds) with the black terminal login screen (for like a fraction of a second) and keeps doing this forever that I have to do a fresh install.

This is a pain also because I couldn't get the save-nand copy-nand to work either
(see my other desperate post http://olpcnews.com/forum/index.php?topic=2613.0 )

Can I avoid this somehow?
Logged

#1 Re: What to do after a hanging episode

Jordan
Senior Contributor
**
Posts: 149


April 18, 2008, 06:50:57 AM

Three comments:

Have you waiting a fairly long time (say one hour) to see if the system recovers from the hang?  I have seen the system recover from hangs before, though I'm not sure that it's worth waiting for it to clear up the problem itself (even if the consequence of just shutting things down is file system corruption).  To be blunt about it, I haven't seen this sort of problem since I swapped Sugar for Blackbox and regular X applications.

I'm not sure what's happening with the X server, but it should be possible to wait a moderate amount of time and end up at a text console.  You have to watch it carefully though: if X launches and rapidly terminates several times in succession, init will stop spawning X for about five minutes and allow you to access a text console.  You have five minutes to fix things up, before the entire cycle repeats.  If you want to know how to disable X in those five minutes, let me know.

I assume that you want to use the copy-nand thing to recover data from the NAND?  If so, it is possible to boot from USB or SD flash memory then mount NAND to copy your data over.  If you want to know how to do that, please let me know.
Logged

#2 To Jordan

saptecai
Commenter

Posts: 6


April 19, 2008, 05:59:37 AM

Thanks Jordan.

I am still using Sugar (I not familiar with Blackbox or X).

It would be nice if you could explain how to restart the system in case of a hang without using the brute force of the power buton because this sytem needs a full reinstall of the system afterwards.

I am not sure what you mean by this:

Jordan wrote:
>I assume that you want to use the copy-nand thing to recover data from the NAND?  If >so, it is possible to boot from USB or SD flash memory then mount NAND to copy your >data over.  If you want to know how to do that, please let me know.

I did have trouble using the save-nand and copy-nand but using an SD to save-nand and an USB to copy-nand seems to do the trick now. Or do you mean something else?

Thanks
Logged

#3 Re: What to do after a hanging episode

Jordan
Senior Contributor
**
Posts: 149


April 19, 2008, 08:00:54 AM

Wait until the system stops attempting to restart X.  It will take a few minutes, and you will only have a five minute window to fix things when it does stop attempting to restart X.

Switch to a virtual console with a login prompt.  This can be done with <ctrl><alt><f1>.

Login as root.  How you do this depends on the build.  In some cases you can just press enter and you will get the super user's shell.  In other cases, you have to use the login id of 'root'.

Edit '/etc/inittab' with your favourite text editor (e.g. nano or vi).  Put a hash (#) in front of the line that says 'x:5:respawn:/usr/sbin/olpc-dm'.  Save the file, and quit the editor.

I'm not sure if init automatically re-reads the file, so type 'reboot' to avoid X from respawning.

Once your system has rebooted, you will be automatically left at the login prompt without sugar.  You now have what most people consider as a useless brick (but I think of as utopia Smiley ).  Now to figure out what's wrong to fix it once and for all.

What you can do is login as root and type '/usr/sbin/olpc-dm'.  In all probability you will get a bunch of cryptic nonsense and X will not start up.  If that is the case, try typing '/usr/sbin/olpc-dm &> /home/olpc/x-crash-log'.  Post that x-crash-log file here, and I'll take a look at it and (hopefully) offer further advice.

As for shutting it down properly, the only way I've found is to wait for the freeze to clear itself up -- mostly because I cannot switch to a virtual console.  It may be possible to ssh into the machine and kill processes that way, but that's a lot of trouble too.
« Last Edit: April 19, 2008, 08:05:06 AM by Jordan » Logged
Pages: [1]
Print
Jump to:  

Members
Total Members: 2406
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 24
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 20
Total: 20