LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Linux saved my butt again. (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/linux-saved-my-butt-again-363886/)

/bin/bash 09-16-2005 06:08 AM

Linux saved my butt again.
 
After installing Windows XP sp2 on my laptop It no longer would hibernate when I closed the lid. Yes I did check the Power Options in Control Panel, it just would not work as before sp2. Also it would often sit there for hours without the fan ever coming on, and eventually would just shutdown (I suspect from thermal warning or something.) So I decided to remove sp2, arrrgh! Needless to say I then had a Windows XP installation which would not boot. OK thats no problem for myself but my wife is taking some online college courses and she doesn't believe me when I tell her that OO.org will create the document formats she needs. "The instructor said I have to use Microsoft Office, they even gave me these cd's at the book store", she hands me her Office/XP/Powerpoint CD's (educational license.) So I'm not going to argue with her, she obviously knows what she is talking about :D

So I prepare to do the old system restore. Of course the manufactures rescue process uses Norton ghost which quite unintelligently wipes the FAT/Partition table. But I also know that it doesn't format the drive and therefore my Linux partitions will still be there. So I boot into Linux and do a quick:
fdisk -l /dev/hda >hda.txt
I burn (I thought) this file and a backup of my home directory and the wifes, to CD so I can later restore everything (she'll kill me if I lose her homework!) I do the system restore, (it worked on the third try) boot into windows, all is good. I stick the cd into the drive and double click the icon and stare at a blank folder, why didn't I verify the cd was good?!

So now I have no way to restore my partitions. I didn't write down the information because I thought I had it burned on a cd. If I don't repartition the drive exactly as it was before I'll only end up with so much garbage, and I'll be spending the next week in the dog house.

Luckly the file hda.txt was still on the hard drive, I just needed to find it somehow. The answer turned out to be quite simple. I booted a Mepis cd and did this:
cat /dev/hda|grep --binary-files=text "\/dev\/hda"
Searching a 40G drive can take a while, but eventually I spotted some familiar text scrolling up the screen.

Sure enough, when I repartition and check, there are my wifes data! Woot! Yes another satisfied Linux customer.

/bin/bash 09-22-2005 06:26 AM

I just noticed there is a program gpart, guess what it does. Gpart will scan an entire drive and try to guess the partitioning of the drive based on plugin modules. It recognizes most Linux partitions, as well as DOS, VFAT, NTFS and more.

So if you ever have to do a system restore and lose your partitioning information gpart may help get your Linux partitions back.

Ahmed 10-01-2005 12:20 AM

That's the main (false) argument against OpenOffice: It won't support windows formats. WRONG.

Nice story btw, thanks for sharing :)

-A


All times are GMT -5. The time now is 06:27 PM.