PDA

View Full Version : need to recover my hardrive.. knoppix was recommended??



Chibi
02-21-2005, 09:58 PM
I posted this in another forum, and I was told it would be a good idea to come here. I searched around a bit but only got discussions on ntfs compatability. i was torn between posting in this forum or the hardware one... so hopefully this was good choice since i havent even gotten knoppix installed yet either.

Here is my original post:

Recently i have gotten a new computer. I have moved the hardrives from the old one into the new one. the point of this venture was to eliminate the need for dual booting..so i could have a computer for linux, a computer for windoze both running at once.

I had an 80 gig hardrive, roughly divided in 2. first half was fat32 with windows xp installed. second half was a linux partition.

the second drive was 160 gigs. it had an ntfs filesystem, with a linux a small linux partition as well i added incase of emergencies (i constantly use linux to fix my windows problem.. so hopefully the help i need wont fail me this time)

this ntfs filesystem had my life on it. everything, my company work, books ive begun to write, save files from games, pictures from friends that are irreplaceable, source codes...etc etc..

i also bought a sata hardrive. i plan to use the 160gig completely for linux, while the 200gig sata and the 80 gig will remain my windoze for gaming and storage. some of my linux stuff was put onto the storage drive as a temperary solution during the move.

i installed windows onto the 80 gig.. then i was going to move the 160 gig storage files onto the new sata.. so that the 160 would be free for a linux distro.. but the problem is.. it wont recognise my ntfs storage drive anymore. it just says its not formatted. and i dont want to format it because ill lose everything. so trying not to panic.. i install linux to save the day.. and even linux wont view the contents of the drive..

i dont think my linux reads the sata at all.. so i am assuming my ntfs storage drive is located at /dev/hdd .. which when i try to print the contents to the terminal when in parted, outputs this error:

Error: Invalid partition table - recursive partition on /dev/hdd,
Information: The operating system thinks the geometry on /dev/hdd is 19457/255/63. Therefore, cylinder 1024 ends at 8032,499M.

From what i remmeber the partitions are like this..
114 gigs ntfs (NO operating system)
26 gigs resierfs (linux os)
300 megs linux swap

Roughly those sizes..

so from the looks of it it is just a table error and my files are still there waiting to be salvaged. if there is anything i can do to recover these files i will be discustingly appreciative. it is critical that i get this stuff back...

as much as i am embarassed to say it, i would probably cry if i didnt get this back. seriously.

what can i do? thank you so much.. really.

-------

I have downloaded a copy of knoppix about a year ago but I never did actually get a try.. downloading/burning a new one wont be a problem at all.. but is it really able to fix my problem? i am too new to knoppix and still rather new to linux in general to know this.

Thanks, it means alot.

greenfly
02-22-2005, 12:40 AM
Depending on the real cause of the problem, Knoppix might be able to help you fix it.

One thing I didn't quite understand, is whether your ntfs partition is on an sata drive. If so, you will need to boot a fairly recent (3.4 or later) version of Knoppix that has the 2.6 kernel with the "knoppix26" cheat code so that you can get current sata support. Also note that linux might list your sata drives as /dev/sda instead of /dev/hda. Also, are you sure the BIOS on your computer detects all the drives properly?

Once you boot, type 'dmesg' in a terminal and look through the output for mention of all of the drives that are detected. Honestly, Knoppix should detect all the partition and put an icon for each one on the desktop automatically. If this works, you should just be able to drag and drop files from the ntfs partition to wherever you want.

If the partition table itself is messed up, what you want to use is a great tool called gpart. However, if you can still access the linux partition on the drive, it doesn't sound to me like your partition table is messed up. If it is, type
gpart /dev/hda replacing hda with your drive, and gpart will scan the drive and output any partitition tables it finds. Look through that output and see if it makes sense, then re-run gpart with the -W option:
gpart -W /dev/hda /dev/hda yes, I typed /dev/hda twice on purpose, the first one goes with the -W option, which says "write the new partition table to this drive" and the second specifies which drive to scan.

Again, only mess with gpart if you are sure that the partition table is corrupted (ie. fdisk, cfdisk, etc say that no partition table exists, or that it's corrupted, and prompts you to create a new blank table DON'T DO THIS IF IT ASKS!)

Poke around with these tools and come back and let us know what you find. Also, if you do manage to get to these files, for goodness sakes back them up somewhere.

mr_ed
02-22-2005, 12:43 AM
Hello!

And welcome, and try to be calm! :)

Yes, it sounds like your data can be recovered by Knoppix (or really, by any of the Linux distributions that run from CD rather than installing to hard drive - called live CDs)..

It's best to use a recent version because tools will be newer and more powerful, but do not download it with your computers unless you're positive you won't be writing over something you want to recover!

If you have a little time and money to spare, and since this is an important operation for you, you can get truly expert advice from this recent and excellent book:Knoppix Hacks
by Kyle Rankin
copyright 2005 by O'Reilly Media (but published 10/2004)
ISBN 0-596-00787-6
$29.95 in USAThe author sometimes posts in these forums, too.

You still have the older Knoppix disk around? You can do some poking around to figure out what the situation is.

For example, boot with it and look at partition tables with the command

$ sudo fdisk -l /dev/hda

or any drive, of course.

This is safe because it won't change anything in the partition table and won't write over anything you want to recover.

Let us know what you find.

-- Ed

mr_ed
02-22-2005, 12:47 AM
Oops!

While I was writing, The Man himself showed up. :shock:

Greetings, sir! I like your book so much that I'm on my third copy of it! (The covers fell off the first two after an hour each of reading - bad lot from the bindery, I guess - but I keep going back to B&N for more! :D)

-- Ed

greenfly
02-22-2005, 04:15 AM
Oops!

While I was writing, The Man himself showed up. :shock:

Greetings, sir! I like your book so much that I'm on my third copy of it! (The covers fell off the first two after an hour each of reading - bad lot from the bindery, I guess - but I keep going back to B&N for more! :D)

-- Ed

Heh, thanks :) Glad you are enjoying the book, and thanks for the plug (I always get embarrassed when I plug my own book :oops: ). By the way, you are correct, that cover problem was a flaw in a certain run of the books. If you contact O'Reilly they will replace your copy. I'm sorry if that has caused you a problem.

Chibi
02-23-2005, 05:51 AM
Ahh! Thank you for the replies. I am sorry I have been away. I have actually fixed this problem using 'parted' which is a partition manager...it just sorta happened...it was such a relief i tell ya..

someone said that due to geometry of drives, different motherboards read them differently.. so i put the hardrive back in the old box hoping it would work with it but no luck.. i did however get a grub bootscreen.. so that was a good sign even though nothing would load... so i got my distro install cd and i was determined it was a partition structure problem because my distro did say it had a corrupt table or something..so i went into parted to see what i could do..it had a rescue feature and searched through the drive and picked up where the partitions were supposed to be.

only the 200gig was a sata drive btw.

i guess this was almost like a wasted thread. but really i am very appreciative. i would of been a depressed sociopath for awhile if i didnt get this stuff back. alot of your response was interesting though. the important stuff totals about 104gigs.. so its not so easy to back up.. i may end up having to buy another hardrive strictly for backup if this is the case :) .. im still broke from building this new computer though..

thats what i like about the linux community.. everyone is so nice. its just really funny how windows just kinda plays dumb and says it needs to be formatted.. but linux actually identifies a problem and can convey a reason.. and in this case provide a solution. linux saves the day!

thanks again!