Friday, November 28, 2008

My Ubuntu File System Became Corrupted

The other day I was doing a few things on my Ubuntu system and decided to do a reboot.
On restart my system would hang on boot up.
So I rebooted and hit the ESC key to get access to the grub menu. I figured I'd try to try the recovery mode.

Well it wouldn't boot and reported a file system error. I told it to fix it. It tried but came back with a corrupt file system error.
Remebering back to my Windows days this can be a 2 day job until I get all the updates and software installed.
Fortunately, this isn't the case with Linux.

I was running Gutsy and had planned to upgrade to Ibex as I have been reading and receiving positive reports about it.
But I wasn't really ready to do it yet. I hadn't set up a seperate Home partiton when I installed Gutsy so my first task was to retrieve and back that folder up.

I grabbed my trusty Knoppix DVD and booted it up to a Live session.
I like Knoppix because it is easy to change Read/Write permissions on a hard drive or partition and provides you with a ton of applications should you need them.

Once I was up and running in Knoppix I began the task of moving about 40 gigs of data from my Home folder to a different partition on my hard drive.
The whole process took about 2 hours. Not really that long and it may have been less as I didn't time it but I do know it was not more then 2 hours.

Now that my data was safe I grabbed my Cd of Ibex which I had burned a few weeks ago in anticipation of upgrading.
The new partitioner is nicer looking and provides more info and options about the hard drives and partitions.
It was set to Automatic and wanted to resize the original partiton that contained Gutsy. Since that file system was corrupt and I didn't want Gutsy I clicked on the Manual Partitioning setting.

I told the partitioner not to touch my other hard drive or partitions.
Then I set up a partition for Home, Root and Swap.
Got through the rest of the screens and clicked Install.

The Cd spun up and it was about 15 minutes later I get a message that the install is finished!
I pop out the Cd and reboot. It boots back up and I'm looking at the new desktop.

First things first. I go and grab the updates. All 170 megs of them. Also grab the Nvidia restricted driver.
Then I install Thunderbird and configure it. I move my email inbox and addy book from my backed up Thunderbird.
Kill my network connection and open Thunderbird to make sure everything is there. It is!
So I reconnect my network and get my email.

Next I install a few Firefox addons and import my passwords and bookmarks.
Then I install Flash and a few other plugins.
Go to Medibuntu and add in their repository to my list.
Now I open Synaptic and procede to grab all the software and goodies I usually use.
Finally I move my Nautilus scripts from the backed up folder to the new script folder.

Total time for install of Ubuntu until I finished moving the scripts was 2 1/2 hours!!
A whole lot better the the day or two I would have spent restoring a Windows machine.
There are several reasons as to why it takes much less time with Linux.
2 of the major reasons are as follows;

1) When you download and install the updates you only have to reboot once after they are all installed. This is due to the kernel update and the installation of the Nvidia driver.

2) All the software I needed was available from a single source list. I didn't need to look all over the internet for the software packages. Also, I didn't need to reboot after every software install.

There are a few things I have previously done that helped my restore my system.
One is that I use the Password Import/Export addon for Firefox and export my password file everytime I acquire a new password.
Secondly is that I export my bookmarks on a regular basis although this is not really needed as Firefox regularly backs up your bookmarks to a sub-folder within the Firefox folder.

And as to the $1,000,000 question as to what caused my file system to become corrupt?
I searched the log files I had from the Gutsy system.
I'm using a Desktop system but my cpu is a mobile processor.
I had been playing with the hibernate and suspend features.

According to the log files, hibernate had failed 2 times in the past few times I had used it.
When hibernate is implemented, all the open data is stored to Ram.
Because hibernate failed to properly implement, I believe the data in the Ram became corrupted and was written back to the hard drive in it's corrupted form.
This caused damage to the file system which recovery could not repair.

So now I am up to date with Ibex. Have everything back up to where I previously had been and didn't loose one bit of my personal data.
And it was all finished within 1/2 a day!
And now that I have my Home on a seperate partition, I won't have to worry about crashes like this one again.

The key is not to panic and have a clear cut plan of action as to backing up your data and reinstall procedures.

Good to be back!



file recovery said...

Once I faced similar problem of data lost. When I searched on the internet I found many data recovery software but then my friend told me to try Stellar Phoenix Windows Data Recovery. I used its demo version first and after using it I was able to view my data in preview mode. I was satisfied with this software so I purchased the full version and saved my data.

TaZMAn said...

Thanks for that link.
It should be a help to my Microsoft using readers.

All that was required to recover my data within Ubuntu was to move the files including the hidden ones from my Home folder to another partition.

That's another nice feature about Linux. Everything important is kept in one folder.

Thanks for stopping by and hope you stop in again.