System is fully operational. >D!!!
Last night I went to bed feeling incredibly annoyed at the fact that I couldn't boot up after cloning my defunct hard drive. It turns out the bios had switched from booting from hd0 to booting from hd1. I suppose this happened because of all the hard drive mess I made because I couldn't open the carrier, so I had to disconnect the cdrw drive, run knoppix from the dvd-rw drive, use the connectors from the former to make the old hard drive a secondary slave to the dvd thing... oh, well. I will type up all the stuff I did last night in a further entry.
The thing is, after last night I was wisely advised to go to bed, I was feeling very pissed off at the "no-booting" thing, and somewhere in the back of my head I suspected I needed to play with the bios.
Today I did just that and found out the switch in booting devices. I switched back to hd0 and... magic! It booted.
Now I am assessing damage and checking what is working and what is lost. Hopefully not much has been lost... HOPEFULLY.
Well, before I turn off the computer and do some hardware re-arrangement I am going to type this up since it's still fresh in my memory and I know if I wait for a couple of days, I will forget something.
About 20 days ago, I lost one of my hard drives.
Right now, if you ask me , I think there are many reasons why this hard drive could have been damaged.
Off the top of my head, I can think of the unstable electricity line in my previous residence (we like playing with electricity... heh); the sudden failure of my computer's power source about six months ago; the close proximity (almost promiscuity) in which I have placed my hard drives inside the computer case... the many months my computer stays on... the lack of a UPS unit until a couple of months ago... etc.
Whatever the reason, the truth is the hard drive started clicking and reading from it became impossible, to the point it would make the entire system either freeze or crash.
Now, in spite of cryo's hard feelings toward GNU/Linux (hahaha!), we all know Linux is sweet and lovely and it doesn't usually crash nor freeze. That's not Lin. It's its retarded neighbor Windoze.
So, this is a sure sign that the problem is major.
I've tried running knoppix without removing any of the hard drives and accessing data (for recovery) from there. It was pointless, as the bios would recognize there was an IDE drive connected to the motherboard, but could not access it.
Ultimately, I had to remove the hard drive and use knoppix to go online and do my basic pestering of everyone.
You see... the lost drive contained, among other things, the /home partition. An integral part of the GNU/Linux OS as far as regular users are concerned... and we all know you don't just log in as root because it may compromise your system badly. Logging in as superuser is for windoze users. They do it all the time. That's what Micro$oft teaches users of its products: "Be stupid. It makes us profit." Especially considering how people in richer countries would rather buy a new computer than be bothered to clean their system. =/
But let's not get political. Michelle, a third-worlder who is willing to starve herself for antiques and music but not for software, decided to:
a) Rescue her system
b) Rescue her data
c) Pay as little as possible for it.
Since the hard drive was, without a shadow of a doubt, comatose; it was evident a new hard drive was going to be needed. Here Michelle was faced with two options:
a) Steal a hard drive
b) Buy a hard drive.
Option a was tempting but all the planning was annoying and Michelle is lazy, so she decided to shell out the ONLY money she was ready to spend, and she bought a new hard drive.
Now... there are caveats to this.... Because nothing is simple when Michelle is involved.
My old hard drive was 120Gig large. Not too large if you consider the size of HD nowadays. I wanted a 200 or 250Gig one, but the price of them made me run out of the shops calling the National Guard.
I settled for a 160 Gig one. ._. But it's cute, yanno?
Since I was at it, I decided to change the old ide wires (flat gray wires that are used to connect IDE devices, like hard drives, CDRW drives, DVDRW drives, etc) for new, round, blue and pretty IDE wires. Why? Because they take up less room and they allow better circulation of air inside the computer case, that's why.
She also needed some screwless screws which sound like a paradox but they exist, I assure you they do.
(Note: Are screwless screws screws that have never screwed? If so, can we call them virgin screws?)
Now the job to do was, of course, connecting everything and recovering the data. Right? That is the trickiest part of the job.
To begin with, cases nowadays are a bitch and everything fits tightly, so if you need to take one thing out, chances are you are going to have to disconnect other stuff in order to remove it. >[ In addition you might bump into something delicate and fuck it up. >[
What I needed to do was connecting 3 hard drives, a CD drive and a DVD drive. >[ crappy considering I didn't have enough wires to do that. But I somehow managed to do it by disconnecting the CD drive and using those wires to connect the faulty drive, the putting the new drive in the old drive's old place and rebooting from the DVD drive with the KNOPPIX cd on.
IMPORTANT NOTE: EVEN IF YOU DON'T USE LINUX AND HAVE NEVER EVEN BEEN AT A RADIUS OF 10 KM OF A LINUX USER, DO DOWNLOAD KNOPPIX AND HAVE IT AT HAND FOR RESCUE PURPOSES. In case of emergency, it might be the only way to save your data.
And yes, you can use it with a portable computer too.
I booted from knoppix (you need to tell your bios to boot from CD in order to do this. It's probably the easiest bios configuration you can do, and it will spare you of lots of trouble) Prayed that it wouldn't crash upon detecting the faulty hard drive -it didn't- and once kde was loaded, I looked for GPARTED.
GPARTED is a free, open source utility that allows you to partition your hard drives and manage those partitions.
It works pretty much like Partition Magic, only it doesn't cost you a lot of money for something you will rarely use, and it's open source, which means it gives people the chance to learn and the chance to work on the project for improvements.
Making use of it, I partitioned the new hard drive and formatted these partitions in the same manner the partitions in the old hard drive were partitioned.
This took only a couple of minutes, but I had to set up a root password to use the gui. Usually you don't need a root password with knoppix, because you use sudo to gain root access, but in some cases, when using an application thoughtlessly might cause permanent loss of data (note: nothing is ever lost permanently, if you believe in computer forensics) you need to set up a root password to move on.
Generally speaking, knoppix won't ask you for root passwords because it uses sudo, (I will not explain sudo here. Just hold on to the idea that knoppix doesn't require root passwords) I went to the knoppix dialog (a chubby penguin by the KDE logo) and set a root password that was easy to remember: knoppix
XD
It was a break from my usual passwords. I think I haven't used a simple password since... uh... when was that? 1999? 2000? Anyway... once there it was just a matter of dragging and clicking.
After doing that, the next step was cloning the data from the faulty drive to the new one.
In order to do this, I used dd_rescue.
A word of warning about dd_rescue: There is dd_rescue and ddrescue. I got lost trying to understand why Debian (Knoppix is based on Debian) calls ddrescue dd_rescue. Apparently they aren't the same thing, but =/ There is just so much you can ask for me when I'm nervous about losing my JoyDi and Murnau stuff. ;o;
I opened the text console (aptly named "konsole" in KDE) and typed:
sudo dd_rescue -p /dev/hdd1 /dev/hdb1
Let's examine this command chunk by chunk:
sudo: I used it to gain root access.
dd_rescue: the command I'm using to clone the partition in question.
-p: I used the -p flag to keep permissions and ownership intact. Otherwise, I would have had lots of problems when returning to the computer's system.
I advise to use this flag.
/dev/hdd1: The first faulty partition
/dev/hdd2: The first target (new) partition
I will not explain the b and B blocksizes because it's... a long explanation. The default should work on average, but if you find yourself at odds with the process you might want to change these. typing dd_rescue -h offers some nice help about other flags you might make use of. The -r (reverse copying) can be a good option for badly ruined drives.
I did the same for the second partition, etc, until the process was finished.
Then, I did:
sudo fsck hdb1
and
sudo fsck hdb2
fsck is file system check, and it is STRONGLY ENCOURAGED that you run it if using an ext2 partition... which is unlikely cuz you don't use linux. =P
After that, I shut down the comp. Unplugged it. Removed the faulty hard drive, plugged the CD drive back in, and restarted it expecting it to boot from grub. (Grub is a Linux bootloader that can boot Linux as well as other Operating System -for example. windoze-)
... IT DIDN'T!! D=!!!!!
I only got a prompt when past the initial bios screens. D=!!!!
It was late, and morgane_le_fey was bidding me to GO TO BED ALREADY and telling me awful things about Debian. D=!! But in the end, she said maybe I needed to rest my overfried neurones and I would come up with an answer the next day.
So it was.
Appantely, with all the HD switching I did, and rewiring I did, the automatic settings in the BIOS had decided to try to boot from hd1 instead of hd0. >[
I switched it back to the following order, which is the one I think makes the most sense for my system:
Booting order:
1- floppy
2- CD0
3- CD1 (DVD)
4- hd0
5- other devices
Saved options and exited bios setup, and voilá, I saw my pretty grub screen asking me whether I wanted to boot from the latest kernel or an earlier one. *_*
*kisses screen*
Once in my system, I lit a cigarette and watched in pleasure how everything had been cloned correctly.
But alas... my joy was to be short-lived, as I watched how something I had considered but ultimately forgot, came back to bite me hard in the rear.... the size of the partitions is incorrect. ><
This means, I will -during this week- attempt to back-up everything that had not been previously backed-up, and re-write the partition table of hdb (Drive "D" for Windoze users).
Writing to the partition table of a hard drive might entail loss of data. Permanent loss of it.
In the meantime, I'm creating a grub disk, because I can't find my old one. ;o; I think it's probably lost among the many many many boxes of stuff that remain unopened 4 months after having moved.
Things I need to do now to feel at ease with myself and close the computer case:
a) Re-arrange the drives inside the case.
b) Get an additional wire to plug in a hard drive fan. (fan= cooling device. Not a frothing individual with high estrogen blood levels who screams "OMG!!!LULZ!!!" and faps at the images in his/her computer screen.)
c) Finding my grub disk and/or recreating it
d) backing up what wasn't backed-up.
e) Re-write partition table in hdb to make it "see" the real size of the partitions, or, if this is impossible, re-arrange partitions and create a new partition with the free disk space that is viewable and writable from the system.
Oh, btw, since I was at it, I upgraded to the latest testing branch of Debian -Lenny- leaving behind my etch days in the same way I left behind my sarge days when we moved from the latter to the former... and so on. Etch was good, it was really good. May it enjoy praise and love in its newly acquired "stable" form.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment