0

I need help recovering from a stupid mistake. I was using an old laptop hard drive to evaluate a Linux distro (PCLinuxOS), and have invested some time in customizing it or I would just start over.

It was connected via an IDE/USB adapter cable and was in the middle of a session with the laptop asleep. Without thinking, I decided that was a good time to stick the drive in an enclosure. I disconnected it from the laptop, mounted it in an enclosure, and plugged it into another computer to verify that it was working.

The other computer threw a message that the drive was locked. I disconnected it and plugged it back into the sleeping laptop. The laptop then didn't like the drive either and wouldn't wake from sleep (I forget what the error message was), so I rebooted.

At that time, it booted but didn't accept a login. I tried looking at the drive after booting another Linux distro, but the file manager wouldn't open anything. I used dmesg to check the log and it reported recovery failed, error loading journal.

I tried booting into the recovery option. That reached the point where it tried to mount the drive and failed (message about kernel panic). I tried rebooting normally again (the previous time, it offered to let me start a new session but I didn't understand the options). This time it never got to the login. After the initial loading, it went directly to the same kernel panic message.

Is there a way to bypass these protections to clean out the previous session (contains nothing important), and clear the journal, or do I need to reinstall Linux on the drive?

Update: This problem had two unexpected twists. First, I diagnosed a concurrent hardware issue. However, the actual Linux issue turned out to be non-trivial. Removing the drive (and perhaps accessing it on another system and/or running the Linux recovery?), caused corruption that fsck did not completely fix, and which caused problems but no error messages. So it's a cautionary warning not to blindly trust a tool like fsck to perfectly recover from known corruption. You need to remain vigilant for what may seem like unrelated problems that manifest after the recovery.

closed as off-topic by Gilles 'SO- stop being evil', Scott, cuonglm, MelBurslan, Anthon Apr 1 '16 at 6:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Gilles 'SO- stop being evil', Scott, cuonglm, MelBurslan, Anthon
If this question can be reworded to fit the rules in the help center, please edit the question.

0

Removing the drive mid-session did cause file system corruption. However, what made the problem difficult to solve was that it was compounded by a hardware issue. The external enclosure turned out to be defective. I tried the original IDE/USB adapter cable again, and was able to interface with the drive.

It initially went to an error screen due to booting from the drive after it was removed during sleep. It told me to run fsck manually to clean up the corruption. I did that and it appeared to work normally (i.e., operated without throwing error messages). However, fsck did not correct all of the corruption. The installation was plagued with strange symptoms, like windows losing focus on their own after a few seconds. I finally just reinstalled Linux and that seems to have solved the issues.

Not the answer you're looking for? Browse other questions tagged or ask your own question.