Jump to content
Compatible Support Forums
Sign in to follow this  
PC-Janitor

Is it possible to repair damage to partition caused by Fdisk

Recommended Posts

Well, caused by me really :x

 

Big woops, I was playing around with FreeDOS on my Main machine while trying to establish a way to transfer files off of an old Compaq 386 (used Linux in the end, but was trying to work out a way to get Linux onto the machine with only a 5 1/2" disk - eventually took the drive out - If in doubt go back to your first idea, it's the one least cluttered by thought)*. I tried to install FreeDOS on a bit of spare disk on my 60Gb drive using... wait for it... fdisk.

 

Oh how foolish, I thought it had read the entries correctly, but it went and bunged a new partition smack in the center of my transfer partition - wish I'd backed up my emails! I might have been more sensible if I'd gone to bed last night instead of this morning.

 

Does anyone know how to resurrect the partition table based on disk structure? I can't help but think that the way the system is laid out, I might be able to restructure the tables.

 

If anyone knows, I'll be very grateful.

 

*addited for clarity

Share this post


Link to post

Well, do you have a recovery disk for the system? This is the problem with the hidden/transfer partition in Compaq's. Some of these systems also keep some of the bios settings on the hidden partition.

 

If not, did you look on the HP/Compaq web site to see if you can still get the recovery disk?

Share this post


Link to post

The Compaq is now solved, but in the process of trying to find ways to get the data off, I messed up my main machine.

 

Quite frankly it's laziness on my part, I ought to have used my old machine to test out freeDOS but I couldn't be bothered to reboot it! ;(

 

I was just wondering if anyone knew of a way to view the remaining data and/or compare it with the formatted sections of the disk. Whenever I have reinstalled Fedora/RH8/9, I've seen information in the Disk Druid dialog that indicates what the partition was in the previous setup, thus allowing me to reselect /home as /home, but I've not been able to run disk druid as the install fails, and I havn't found it on any of my Knoppix disks, they are not Redhat of course, but I was just wondering if there is a repair tool or action for this sort of thing.

 

Thanks for the advice about Compaqs though, it may come in handy if I need to re-use the 386 (may be a 286, can't remember - I've only got the disk here), though I think it'll be a bit under-powered for anything useful.

 

cheers, Jon

Share this post


Link to post

Yes, there is a utility to read the disk partitions/structure included with Knoppix called QtParted. Boot the CD and get into the GUI. This is what I do, cause it's easier than remembering where it is in the start menu structure.

 

At a root konsole, just type qtparted.

 

A word of caution. I have used qtparted to change partitions on my system and ended up with corrupted partitions that PartitionMagic could not fix. But qtparted is good for looking at the disk structure in Linux. NTFS partitions are also an issue with qtparted, from my experience.

 

In terms of a recovery utility, someone must have done this, I just have not found one. Perhaps someone else has an idea.

Share this post


Link to post

Danleff I've got something strange going on. I've never used qtparted and checked if it was installed. It wasn't so I installed it with apt-get. parted in also installed. At the command line as root, I do:

 

qtparted [enter]

 

..and nothing happens! I've tried Qtparted, QTparted, QTParted, QtParted etc, and cannot get it to come up!

 

Weird huh??

Share this post


Link to post

Hmm...

 

I'm using Knoppix 3.3.

 

As I mentioned, I can't find it in the start menu tree. But if I go to konsole, su (enter) - no password required, then type in qtparted it comes up.

 

The problem is that qtparted is dependency hell, so I wonder if using apt-get causes issues.

 

Qtparted requires a number of libraries, such as parted-1.6.6 (hard to find) installed as source first, as well as a number of others, such as xfsprogs...

 

I assume you have Knoppix as a hard drive install?

 

When I whereis qtparted it comes back as /sbin/qtparted.

Share this post


Link to post

I'm using RH 9. parted is installed. I uninstalled, then re-installed qtparted via apt, without complaints. Afterward, I tried to install from the qtparted rpm and it said it was already installed, yet when I do:

 

locate qtparted

 

it comes back empty??!!

 

This is a strange one!! ;(

Share this post


Link to post

Very strange. I looked at my Fedora box. What I noticed is that I have parted-1.6.6 installed as source. Can't remember what the deal was with this, but it works. I then installed all the required sprogs.rpm's, then qtparted.

 

For the hey of it, at root, does it come up if you type, as root, /usr/sbin/qtparted?

Share this post


Link to post

Thanks chaps for the replies, much as I'd love to hack on with it now, I have a car to repair - wish I could open up a bash shell, mount /dev/mazda and drill down to /mnt/jalopy/hub/frontoffside and download a patch for the busted wheel studs, but no, I've got to go get dirty! 8)

Share this post


Link to post

Yep, I figured there would be no problem, after all it's only the removal of one dirty great big nut and the replacement of four smaller ones!

 

I hit dependency issues and had to SSHop for a larger model of spanner (rev.30mm - I wanted to compile from source but they are non-GPL)

 

Then, I'm not totally sure which way it's supposed to turn, I'm assuming that it'll be counter to the normal direction of the wheel. I've already done a gentle 175lb bounce on the spanner in each direction.

 

Now of course over here, it's dark so I'm trying to decide whether I go get a blowtorch to help ease the bolt (it's an '87 Mazda 626) or if I go join in the queue for the mechanic now.

 

Do you have any experience with cars Dan, ( the Mazda distro in particular!) - not that this is at all off-topic! laugh

Share this post


Link to post

Well you started the thread, so I guess it's up to you whether you mind it being off topic. smile

 

I don't get a chance to fool with cars the way I used to, but I definitely believe there is an interesting correlation between tinkering with cars and fooling with computers, Linux in particular. In fact, I find myself calling upon many of the same reasoning resources and techniques to solve computer problems that one develops while working on automobiles.

Computer geeks today can be likened to the first mechanics who loved working on automobiles a hundred years ago. I don't think we're alone. Many of my friends who love fooling with computers have an interest in automobiles as well.

 

Back when I was younger, I spent most of my time working on one of several 1960's Oldsmobiles I have owned. I still have three of them. A 1965 Olds 442 Convertible, a 1966 Olds Starfire, and a 1967 Olds 442 coupe exactly like this one, although this isn't mine. All are still in road worthy condition, but I haven't the time to work on them like I used to. I still love cars though!

Share this post


Link to post

I've also enjoyed playing with bikes, electronic junk, a bit of woodworking, and cars when I have to, I suppose, it's inevitable that people with a problem solving mentality get around to Linux eventually.

 

I started to play with Linux with an early version of slackware, but the hardware I had then, was just feeble (I just about managed a clock, ppp and xeyes, before I'd have to go and make a cup of tea.) and it's only in the last three or four years that I've had more machines and therefore better succcess. I've recently relegated Windows to last position on the Grub Menu (there for curiosity/and Mrs D. - my 3 year old is happy with Linux on his desktop.)

 

So then, back to the thread, I've noticed it had a couple of views, so if you're still reading, and have recently trashed your partition table, head on over to Recovering a lost Partition Table and hopefully sometime soon, I'll write a post to let you know if it works and how I get on, (currently half way through.)

 

Oh, and the car's on blocks!

 

P.S. I do have a couple of Knoppix Distros, but not 3.3 hence I couldn't find QTparted - sad, but there's more than one way to skin a budgie in flight.

Share this post


Link to post

OK so I got the files I needed to scan the partitions, gpart (guess the partitions) and MBRWORK.exe to try the same from a Windows perspective.

 

Both seemed to do their job really well, but I don't seem to be accessing data relating to logical partitions in the extended partition.

 

This may be a limitation with both gpart and MBRWORK, but I was able to find two of my lost logical partitions using parted and guesswork (I haven't run qtparted because I am running a live CD version of knoppix - and cannot add anything into the read-only package tree.)

 

I'm going to keep going, cos I've just got to find the last (biggest,) partition and will try to remember in future to keep my transfer* drive on a primary partition.

 

* for transfers between Dos and Linux obviously.

Share this post


Link to post

Qtparted should already be on the Knoppix live CD version. Go to a root konsole and type qtparted.

Share this post


Link to post

Hi Danleff,

 

Yes you're right, it does exist, either I typed the wrong things or used an older Knoppix Disk, but I found an OpenMosix disk that used version 3.3 of Knoppix and that had QTparted right there.

 

However, I wasn't able to do much with it that I couldn't do with partition magic and I felt it didn't represent the functionality of parted very well, but that could be me.

 

With parted I managed to find all the partitions in the extended part of the disk apart from the 20Gb FAT32 one. You would think I'd be able to work out where it would be bbased on te space that remains after the other partitions (on the 60Gb drive) are taken into account, but although I cna calculate whereabouts it must be, parted just doesn't seem to be able to find it and as mentioned above I've tried a couple of other packages that purport to do the same thing automaticaly, but they only look at primary partitions, I think I'm going to have to bite the bullet on this one!

 

I feel a bit like Dapper Dan must be feeling at the mo. in this post it seems that aswell as the vital suggestions given at the end one would do well to wait for the clarity that comes from a good night's sleep before embarking upon major data relocation (both low level and directory level.) it happens.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×