Wednesday, June 12, 2013

Linux Code of Conduct and its strength-Gparted included


Linux Code of Conduct and its strength-Gparted included
Linux has a strict code of conduct.
Sometimes it may be its weakness too.
I was down with flu and could n’t do anything constructively for a few days and decided to invest my time on a spare computer on which I had forgotten the password for the root or the administration work.
On does not have to use root unless there is a major mishap and that was the reason for forgetting it.
Linux does check its partitions on mount and start up and this computer also had some problem with a partition installed with a different operating system.
In other words the second IDE hard disk had faulty segment.
So I decided to erase everything and start afresh.
In this situation best utility is Gparted, a Debian based live distribution which is known for its breezy partitioning and formatting.
So I partitioned the normal disk which was piece of cake.
But when I tried to partition the IDE disk there was some problem.
I could not format, probably the segment which was defective was hindering the progress and was left with a situation where I did not have a partition table to mount any distribution.
It got stuck at fstab.
Unable to mount the defective disk I could not even install on the normal sata disk.
I went back to partedmagic and tried to rectify.
It did the partitioning on the first go but did not detect the sector which was defective.
Then I mounted Gparted and tried to reformat the possible defective segment and it got stuck.
The ReisereFS partition type is probably highly journalized it detected the faulty segment/sector.
I could not format and left without a partition table.
Back to square One.
After one night toiling and I gave up, with the flu making me irritable, after mounting Gparted several times.
In this situation I always press Ctrl + Alt+F1 to see what was wrong.
Only one sector was defective.
I never realized Gparted and ReiserFS were that finicky about partitioning and formatting.
In this situation what I do is to format with less restrictive swap partition and leave that portion virtually not utilized.
Other option is to keep that portion not allocated which not a good option.
Finding one sector out of sea of little segments was a difficult preposition anyway.
The third option was for me to physically remove the hard disk.
This has not happened after I started using Linux, for over a decade. 

I had to resort to windows less finicky partitioning which include ntfs.
I keep a windows 7 starter DVD without registering with the windows (then one cannot reuse it ) and installed it in my computer but it detected all the partition as normal and healthy.

Fortunately it did not detect the faulty sector. I was in business again.

Windows cannot read the partition details written in Linux.
That is another reason for me  not using Windows.
I deleted the most likely partition and installed the Windows 7.
Otherwise (if I do not install windows) I will not have a partition table.
Then I booted up Gparted and located the segment to about 6 GiB of the 80 GB IDE disk.
Tthen I installed Ubuntu 13-04 on the normal disk.
I won’t install any on the IDE disk but keep it as a place to store old files.
Lesson here is one does not have to discard a disk with few isolated (this was second hand disk I bought with an old IBM computer) segments gone defective.
If you are not storing any critical data on this disk, it is not a big deal.

That is the advantage of Linux.
It detects even the tiniest of defects when formatting and discard them outright.
Windows formatting cannot approach anywhere near that precision.
One should never install an operating system on a bad disk.
My Sata disk was almost new.
One can use the small SSD disk for operating system only and use other/ old disks can be used for data storage.
That is the current recommendation anyway till price of SSD comes down drastically.
I am not going to throw away a disk with only one sector defective.

Mind you, I mounted a external USB hard disk and  recovered all the critical or useful data from the defective partition before going through with partitioning with Gparted.
This is the first time I had a problem where I had to tease my brain to get an old IDE working for me.
While I am typing this I am installing at least three(3) operating systems in one disk.
If one system goes down I use the other system to recover my files.
This is something windows cannot boast.
I am also immune to copying an image of my system (probably useful for servers but not for my desktops).
Once the system is old it is far better to reinstall since the old system will slow down with junk history to rewrite every time it boots up.
I do that every year or at worst, 18 months the most.
My installation has finished on the other computer, so let me stop here.