Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yesterday, after clicking on the "suspend to disk" button of a PCLinuxOS distro as a normal user, and rebooting, the system hung up on the unlock screen.
Nothing worked; keyboard stopped responding, consoles were available, only the mouse was moving. The only solution was to do a hard reset.
Result: the partition and MBR became corrupted and boot only showed me "GRUB_" with the blinking prompt.
Tried Partmagic, Systemrescuedisk, Testdisk, all to no avail.
Luckily, I had a remastered livecd, so I re-installed and the losses were minimal.
Yet, that was half a day lost for a silly "suspend to disk" initiated by me as normal user.
Time is precious, and I wouldn't like to lose another day or two because of something similar.
So, back to the post's title: what should I have done to avoid all of this when the system froze? Was there a way out better than a hard reset?
How did you perform the initial reboot?
For example, did you suspend to disk and then hit the reset button? Or did you UN-suspend first?
Is it a laptop or a desktop?
Suspending to disk and then resetting the machine while suspended is not a good idea, as you can see.
It would be good to know if all goes well when you UN-suspend (before rebooting) to make sure un-suspend works first.. Also, does suspend-to-RAM work OK?
In any event, always use the logout & shutdown/restart buttons if you want to shutdown/reboot. Otherwise, due to the structure and nature of mounted linux filesystems, disk corruption can and will occur when a linux OS is not properly shut down. As you can see, when a running system is suspended to disk and shut down, the inconvenience and corruption are more-so.
I don't use pclinuxOS or suspend-to-disk, so I can't provide more specifics about your circumstance, but let us know if this explains anything for you, or if you have more info, please provide it.
A few minutes research via www.google.com/linux was enough to show me that where laptops are concerned, there may be a hardware issue with "suspend to disk". Some people reported that PCLOS suspend to ram/suspend to disk worked flawlessly 'out of the box', while others reported that suspend to ram works and suspend to disk doesn't.
One reviewer (http://www.linux.com/articles/62199) reported that she solved the suspend to disk problem on her laptop by installing Kpowersave.
So, if you are using PCLOS on a laptop, you could try Kpowersave to see if that helps.
Try the Magic SysRq keys before doing a hard power-off. Sometimes my laptop would freeze up irrecoverably, but just yesterday I had a problem where the SysRq keys let me perform an emergency, but clean, shutdown.
Note that on your laptop (as on mine) Alt+SysRq+X might be Alt+PrtScr+X, not Alt+Fn+PrtScr+X. Test for yourself.
The culprit program was, surprisingly, kpowersave.
The chain of events was:
1. Click on "suspend to disk" on the kpowersave icon
2. Normal suspension, system shutdown, hardisk shutdown
3. After a while, I turn the computer on (can't do anything else, the computer is totally off and cannot be rebooted otherwise)
4. Normal boot
5. Screensaver/locked session dialogue box appears
So far, all is normal and expected, then
6. sudden garbling of screen and locked dialogue box before I have time to put my password
7. total freezing
8. wait a while, total freezing still, all key combinations don't work (didn't try the "Magic SysRq keys because I didn't know them!)
9. hit the reset button
10. on reboot, get "GRUB_" with flashing prompt
11. nothing worked (at least with my limited knowledge) (Partmagic, Systemrescuedisk, testdisk); only thing I understood from the tests was that the partition had become corrupted
12. re-install livecd
That's it.
A pain, really, but more of a disappointment at how "easy" and how "innocently" a normal user can destroy a whole system!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.