PDA

View Full Version : unmountable HDD partition. HELP!



daryl2158
09-04-2005, 08:10 AM
Hey all, I just downloaded Knoppix to recover whatever files from my HDD after Windows XP crashed on me. Im currently running Knoppix from a CD and am really the n00b at it. Ok, because I own a HP Pavilion PC, my HDD is partitioned. One for Windows and HP stuff, and the other for user files. I can currently access the HP partition just fine, but when i try to open the other partition, (hda2), it gives me the following error msg:

Could not mount device.
The reported error was:
mount: I could not determine the filesystem type, and none was specified.

I got really confused browsing the forums on similar issues. I THINK the filesystem is an NTFS and all I really want to do is to salvage and burn my files off it. Pls reply soon! thanks.

Harry Kuhman
09-04-2005, 08:35 AM
I'm glad you added the HELP to the subject, without it I would likely have thought that you just wanted to tell us a story. And that you added Please reply soon, otherwise I would have written my reply and saved it a few weeks.

Sarcasm aside, it sounds like that second partition may be severly damaged. Normally Knoppix would mount it the same way that you mount the other one. But there are several unanswered questions in my mind about this system:

What happens when you run Windows? It sounds like the first partition may be OK. Will Windows boot but just not see the second partition? If so, have you looked at the partition table at all from Windows? What have you done and what does it tell you?

Did your HP system come with two partitions, or did you create the second partition yourself? If you created it yourself, can you tell us what steps you too to make it? My HP notebook came with XP installed on a lone large patrtition, I had to repartition to create two partitions like you have.

Do you know what type of partition the second partition is? I'm guessing both partitions are NTFS, but that's far from certain (I made my second one FAT32 so that Knoppix could write to it).

You say that the second partition is hda2. Is that a name showing up on a desktop icon? Are you opening the partitions with the desktop icons, or are you using the mount command? This is extremely important because normally the first partition would be hda1, but the second one would be hda5, a logical partition inside the extended partition hda2. Knoppix will not normally show you an icon for an extended partition and you can't mount one. There are ways to create multiple NTFS partitions (or an NTFS and a FAT) on a hard drive without using Logical drives or extended partitions. But it's not usually done so I'm wondering if you're wrong about the partition name. Do you know about extended partitions and logical drives? And do you know what should be out on that disk?

After we have the above information, we can offer more help (if it's still needed). Knoppix does have a program "gpart (http://www.stud.uni-hannover.de/user/76201/gpart/)" or "gparted (http://gparted.sourceforge.net/index.php)" (I forget which is on the disc) that will examone a disk where the partition table has been destroyed and try to determine what the missing partition is and recreate it for you. But I'm not suggesting that you use it yet; it's a rather last ditch thing to do, and it would be much safer if you could respond to the above first and let one of us guide you (and maybe even get a second opnion before doing anything that sounds risky).

daryl2158
09-04-2005, 09:06 AM
Firstly, thanks alot for replying so quickly.

I cannot run Windows at all. It has a missing file on the HDD so I can't boot at all.

The HP system came with 2 partitions, with the first being write protected (so they claim) for copying to the user partition when you want to do a destructive system recovery. Meaning the 1st partition contains Windows and all factory-shipped apps so it can just copy over.

I'm not sure what file system the second partition is. How do I check?

When I mouse-over the second partition icon on the desktop the name indicated is: hda2.
Im opening the partition with the desktop icon (i already stated that im a n00b at this...lol, so no commands done)

Q:Do you know about extended partitions and logical drives? And do you know what should be out on that disk?
A: Nope. :P

Thnx.

Harry Kuhman
09-04-2005, 09:48 AM
The HP system came with 2 partitions, with the first being write protected (so they claim) for copying to the user partition when you want to do a destructive system recovery. Meaning the 1st partition contains Windows and all factory-shipped apps so it can just copy over.
OK, I was under the impression that you first partition had the copy of windows that you were running and that the econd was only "user data". But it now sounds like the first is a virgin backup of the used space on the second partition. What a strange thing for a manufacturer to admit, that Windows is so unreliabe that you need to have a backup copy that you can use to overwrite your live partition with! And that they are quite willing to waste that much of your hard drive space to do it. It's not that many of us here don't already know that Windows is that unreliable, bt we don't often se such open admissions.

Based on this information, I do think that both partitions are real physical partitions. HP is just playing creative games with the partition table. They may even hide the hda partition from you in windows. (You are sure, by the way, that hda1 is the virgin backup and hda2 is the live data, are you not? Is there any chance that the files you want are really on hda1 and the virgin backup is hda2?) Do not do this, but just what does HP tell you to do to make this magic recovery copy happen?

I also expect that both partitions, and particularly the one that has been lost, are NTFS partitions. This is the official default to use for XP and I can't imagine HP not doing so for the average user.

I'm sorry, it's getting very late here, and I have some things that I need to do before morning, so I just can't teach you and write up detailed information on partitioning a hard drive right now. You may want to start at Google and learn some things about how Windows partitions hard disks, the maximum of 4 entries in the partition table that define the partitions, extended partitions, and the rest. A lot of searching and reading is called for if you are going to recover that data safely. You might also want to determine if Knoppix includes gpart or gparted and read the man page for whichever it is and see if that makes sense to you. Hopefully others will join into this discussion, if not perhaps I can help again in 12 to 15 hours, but I have to stop now.

daryl2158
09-04-2005, 10:12 AM
Yep, both partitions contain Windows, but the first is supposed to be locked away, hidden and write-protected although I can edit it with Knoppix. They just overwrite ur user partition's Windows with the hidden partition's if u screw up. Ur right, they hide it in Windows. And it tks up about 4 GB. hda2 has the rest of my disk space, so that must be the user partition. Moreover when i open hda1 it contains the hp stuff. HP makes me tap the F10 key furiously during boot up to bring me to the recovery console in which i can select a non-destructive recovery (reinstall windows but data is still there) or a destructive one (self-explanatory). However the first option DISAPPEARED for some reason. I can't call HP today to check with them since its Sunday, so its a good thing ur replying tomorrow aniwae.

I remember seeing somewhere that the user partition is NTFS too.

Quote: You might also want to determine if Knoppix includes gpart or gparted and read the man page for whichever it is and see if that makes sense to you.
Nope. that doesnt make sense to me :P Thnx 4 being so patient aniwae.

Quote: Hopefully others will join into this discussion
My sentiments exactly. The other threads show discussions with the same error, but they all have 2 hard disks to play around with or some other configuration. Thus, I think my problem is quite unique and might help others with the same problem as not most people have 2 hard disks.

daryl2158
09-04-2005, 01:55 PM
whew, I can't find gparted anywhere. Only qtparted. started that up, and analysed hda1 and hda 2. Here r the results:

Number: (Weird windows logo here) 01 Partition: /UNIONFS/dev/hda1 Type: FAT32 Status: Blank Size: 4.01GB Used Space: 3.56 GB Start: 0.03 MB End: 4.01 GB Label: blank

Number: (no logo here) 02 Partition: /UNIONFS/dev/hda2 Type: unknow Status: Active Size: 34.15GB Used Space: N/A (?!!?WTF?!) Start: 4.01 GB End: 38.16GB Label: blank

ok, as u can see im panicking after i read the used space part for hda 2.

Conclusions:

partition 1 is fat32, and is the hp recovery partition.
partition 2 is of unknown type, highly likely NTFS
partition 2 is active, while part 1 isnt.
hopefully its wrong that part 2 has no used space :cry:

Harry Kuhman
09-04-2005, 10:03 PM
OK, I'm back. No one else seems to be fool enough to join in this discussion. From your above output it looks like something has clobbered your partition table but good.

The good news is that Windows does this all of the time! I doubt if you even did anything in Windows to cause it (but just what wrer you doing in Windows when it happened?). This is good news because your not the first person facing this and the gpart/gparted tools were created to help here.

I don't know off the top of my head which is in Knoppix or how to step you through them. I'll go check a copy of Knoppix a little later and post back. It might help us being onthe same page if I knew what version of Knoppix that you wre running, that way I ccould boot the same version and tell you exactly where to look and for what.

We are hoping, of course, that it is only the partition table that is damaged and that it can be repaired and you will have access to your partition again and the data will still be there. With Windows there is no assurance of this.

Harry Kuhman
09-04-2005, 11:21 PM
.... Knoppix does have a program "gpart (http://www.stud.uni-hannover.de/user/76201/gpart/)" or "gparted (http://gparted.sourceforge.net/index.php)" (I forget which is on the disc)....

... You might also want to determine if Knoppix includes gpart or gparted and read the man page for whichever it is ....

whew, I can't find gparted anywhere. Only qtparted. ...

OK, here's were we stand:
I looked at the 3.8.1 CD (didn't know if you were using the CD or DVD and didn't want to use the DVD because it has a lot more software that you wouldn't have if you use the CD). gpart is there (not gparted) and there is a man page entry for it. A "man" page is a manual page, documentation on how to use any of the programs or commands that come with Linux. To see the documentation for gpart, open a shell (or terminal window) and type man gpart at the prompt. It will show you the first lines of the document. You can move up and down in the document to read it all, type Q to exit when done. Read and understand this docement before going any further.

OK, now for a little bit of warning. It's a real shame that HP did the software backup this way. I expect that you no longer have the option to safely restore your software because the software running can't see the second partition any longer and isn't written to recover it itself. What strikes me as far worse is that HP chose to do things this complex and space wasteful way rather than spend literally just a few cents on a hard copy backup of all the original software that you paid for. This is awful, since if your hard disk had died completely (and many do), you would have no backup of your purchased software at all!

What could make this a problem in this case is that HP played some games with the partition table to "hide" that first partition, and gpart might try to correct that too. Best case, it doesn't want to correct it, or it suggests a correction but gives you a chance to not do it. Worst case, it makes some changes that confuse your recovery software, makes both partitions available from Windows, or even causes the backup copy to became the boot copy. I know by the time you ead this it is Monday there and you may already be calling HP, but unless your support there is much better than ours in the U.S they will not have a clue and will tell you that all you can do is a fresh new install that destroys your data. That is not true, but it may take some work and skill to get everything back the way that you want it.

At this point, if you have read and understoof the gpart man page, I think you are ready to run gpart. Be very sure that you use the backup option to make a copy of the current mbr, you may need it to put back the first partition the way HP originally had it. And understand that gpart is a powerful and somewhat dangerous program, after all it is about to change the very core definition of all that is on your disk drive. For that reason a normal user account can not run it. You will have to become super user by typing su at a command prompt, or perfix the gpart command with sudo (as in sudo gpart) at the prompt. I'm not going to try to write a whole gpart manual here, so I leave it to you to read the man page and to google for gpart and read as much as you need to feel comfrtable with it and select the right switches. I think that's a better choice than giving you a few switches to run without your knowing the software.

Good luck, let us know what happens.

daryl2158
09-05-2005, 08:15 AM
Well, I downloaded Knoppix off Bittorrent and I don't have a DVD burner so its a CD. still no gpart anywhere.

Yea, HP wants to try and discourage piracy so it didnt give me the backup in CD format. They just bring along a hard drive containing their stuff and connect it to mine and download it if my drive totally dies (it did once). and then charge me for that.

can i like download gpart or anything? however i have almost no useable disk space and have to use the temp. folder and everything disappears upon reboot.

thanks. gonna call hp now. cant find the number though. I'll make sure they tell me something useful.

Harry Kuhman
09-05-2005, 08:29 AM
Well, I downloaded Knoppix off Bittorrent and I don't have a DVD burner so its a CD. still no gpart anywhere.
It is there. Open a terminal, a shell prompt, a command line prompt or whatever you want to call it. Type man gpart. You'll see.


Yea, HP wants to try and discourage piracy so it didnt give me the backup in CD format. They just bring along a hard drive containing their stuff and connect it to mine and download it if my drive totally dies (it did once). and then charge me for that.
It's one thing to want to discourage piracy, it's quite a different one to not give you a copy of the stuf that they have sold you. And they do pay a license fee for every copy of Windows, so you really have bought it when you bought the computer. It's not like they even own Windows or likely any of the other software they sold you. It's find to discourage piracy, but not at the honest interest of their own customers. The reason they do this is not to fight piracy, no matter what they say.


can i like download gpart or anything? however i have almost no useable disk space and have to use the temp. folder and everything disappears upon reboot.

thanks. gonna call hp now. cant find the number though. I'll make sure they tell me something useful.
I'm 100% certain that it is there and you are mistaken that it is not. It has been in ever version of Knopix I've seen, and that'splenty. I'm less sure that it will resolve your problem, but there is a good chance that it will.

daryl2158
09-05-2005, 08:35 AM
u r so right. HP told me a bunch of crap and told me to purchase their recovery CD for like the price of a Windows CD! Well, they also told me that both partitions are NTFS.

yea i typed it in the console and some stuff appears. thought gpart was a GUI.

yup. they're not fighting piracy. they just wanna earn the $$$ when u need a recovery disk. and these disks are unique to each model of ur PC and I so do not buy identical PCs.

at the bootup it says its loading kernel 2.6.11, but the Konqueror Knoppix startup page and the wallpaper says 3.9. sorry, abit stupid here. :P

Ran gpart and followed some website's instructions. Gpart can't find my partitions though.
typing in: gpart /dev/hda1 or gpart /dev/hda2 results in:
bash: gpart /dev/hda1(or 2) : No such file or directory.

BTW, Knoppix did something to my HP partition and I can no longer access the recovery console! *gasps* o well...

Harry Kuhman
09-05-2005, 08:49 AM
Yup, having paid for it once, and then again when you paid someone to come out, they are now quite willing to forget about "fighting piracy" when they can sell you the software that you already bought yet a third time. And since they are selling you something that they don't own and that you already paid for, one has to wonder who the real pirates are.

Glad you finaly found it, if you look back you will see in did tell you it was a shell program in a previous post before you said it wasn't there. Now be caredul and read the documentation closely. And be very sure to make a backup of that MBR before you overwrite it. I suspect gpart will not be happy with the funky way they try to fool windows by playing games with the first partition. You may eventually need to byte edit the partition table to put that partition back the way HP has it. But a backup copy of the partition table will tell you what to edit. Since we don't already have a backup of it from before something happened to the second partition, you have to let gpart try to figure out what that partition table entry should look like. And hopefully the programs and data will still be in that partition when it does recreate it.

Good luck.

daryl2158
09-05-2005, 08:58 AM
That's a nice observation. lol.

Quote: Now be caredul and read the documentation closely.
What documentation?

Quote: And be very sure to make a backup of that MBR before you overwrite it.
MBR?!?waddat?

Quote: I suspect gpart will not be happy with the funky way they try to fool windows by playing games with the first partition. You may eventually need to byte edit the partition table to put that partition back the way HP has it. But a backup copy of the partition table will tell you what to edit. Since we don't already have a backup of it from before something happened to the second partition, you have to let gpart try to figure out what that partition table entry should look like. And hopefully the programs and data will still be in that partition when it does recreate it.

No idea what ur talking about. byte edit, etc etc. O yea, what about that part in which it cant find my partition? Am I giving the wrong address or something? How do I find out the correct one then. If it cant find my partition it cant do anything right...?or wrong???lol.

Quote: Good luck
I'll need it :(

*Edit: I have googled for the above mentioned "documentation" and kinda know abit more. Ok so I typed in gpart /dev/hda2 and i got Fatal error: blah blah ,permission denied. Same goes with hda1

Harry Kuhman
09-05-2005, 09:35 AM
Quote: Now be caredul and read the documentation closely.
What documentation?
Go back and read what I already wrote, I said to start with the man page, and also explained what a man page is.


Quote: And be very sure to make a backup of that MBR before you overwrite it.
MBR?!?waddat?
The mbr is the master boot record. In this context it's the first sector of the disk and also includes the partition table (although usualy te term doesn't include the partition table). Again, read. Read many times. mbr is talked about (although they may assume you know the term. Use Google to learn more or identify a term that you don't understand. You are about to mess with powerful juju here. These are not commands to type in if you don't know what you are doing.


No idea what ur talking about. byte edit, etc etc. O yea, what about that part in which it cant find my partition? Am I giving the wrong address or something? How do I find out the correct one then. If it cant find my partition it cant do anything right...?or wrong???lol.
In a nutshell, the sectors on a disk have bytes of data written to them. The bytes are each composed of eight bits. There are tools that will let you look at the disk at the bit and byte level to see exactly what each bit and byte value is. When you understand enough about the data structure of what is on the disk, you can see how these bytes define the partition table (the partition table is a set of 4 blocks of 16 bytes at the end of the first sector, and all of those bytes are what define things like the type of partition, when on the disk it starts and ends, and so on. HP played with them when it hid the first partition from windows, you may have to play with them to put things back the way they are. There are tools and information on the web to help you do this. It's technical, but it can be understood and done. But you are not ready for that yet and may not even need it, so don't worry about editing the sector byte by byte yet. Just be sure that you make a backup of the current MBR when you run gpart or you will not have the information that you need when it comes time to edit the partition by hand.


No idea what ur talking about. byte edit, etc etc. O yea, what about that part in which it cant find my partition? Am I giving the wrong address or something? How do I find out the correct one then. If it cant find my partition it cant do anything right...?or wrong???lol.
I have tried but I'm unable to understand what you are asking here.


Quote: Good luck
I'll need it :(
Yes,you will, particularly based on the next thing you said.


*Edit: I have googled for the above mentioned "documentation" and kinda know abit more. Ok so I typed in gpart /dev/hda2 and i got Fatal error: blah blah ,permission denied. Same goes with hda1
Well, the good news is that you got access denied. The bad news is that if it had worked you would have not instructed it to make that very important backup of the mbr, and so might have ended up shooting yourself in the foot, so to speak. Again, go back and read what I already wrote. I told you that you could not run it this way, and told you what you had to do to get past the access problem. I could tell you again here, but the very last thing that should happen right now is that you learn that one magic command and then type in a gpart command with it, but not with the switches and options that you need, particularly the one that makes a backup of the mbr. Take time to read the documentation, grasshoper. Measure twice, cut once. This isn't a speed test here. It is extremely important that you study this command and understad what is happening before you do this. Plan out what switches you will need (and you will need some) before you give the command, not afterward.

daryl2158
09-05-2005, 10:33 AM
Sorry about that. I was expecting abit more of the step-by-step way. Well, i read through the whole thread 3 times and have backed up the MBR on both partitions after gaining access. What next? If i screw up I can just restore it with the command in the manual right? Heh. Anxious to go on but after all the stuff u talked about im abit scared to do anything else now.

Harry Kuhman
09-05-2005, 10:43 AM
Sorry about that. I was expecting abit more of the step-by-step way.
NO, I'm not going to try to retype all of the manual information here, and I feel it is better that you read and comprehend the manual than I give you some magic string to type. If you have your backup then it sounds like you may be ready to give it a shot. But being abit scared and cautious is much better than being reckless.

daryl2158
09-05-2005, 10:48 AM
Yep. I decided to give it a go and typed the magic command. :P its still scanning. is it supposed ot take such a long time? So far there are 2 warnings. what now? 1st warning is a short read, then it says "skipping". 2nd 1 is a read error. any cause 4 panic yet? :P

Edit: ok...nothing happening now. i can type in the console, but nothing happens. it just appears but doesnt respond. the hard disk read light on my PC is still flashing though...is gpart still running?meaning i have to wait summore? or did it just crash on me.

Edit: i waited and found that it was still working cuz 2 more warnings just appeared. same errors, different sectors.

Update: ok, im guessing it crashed. I tried twice and still no-go. I'm desperate as my deadline in about 1 week and i need to recover my files. Can we IM since nobody else is engaging in this discussion?

daryl2158
09-05-2005, 04:13 PM
Yep. I decided to give it a go and typed the magic command. :P its still scanning. is it supposed ot take such a long time? So far there are 2 warnings. what now? 1st warning is a short read, then it says "skipping". 2nd 1 is a read error. any cause 4 panic yet? :P

Edit: ok...nothing happening now. i can type in the console, but nothing happens. it just appears but doesnt respond. the hard disk read light on my PC is still flashing though...is gpart still running?meaning i have to wait summore? or did it just crash on me.

Edit: i waited and found that it was still working cuz 2 more warnings just appeared. same errors, different sectors.

Update: ok, im guessing it crashed. I tried twice and still no-go. I'm desperate as my deadline in about 1 week and i need to recover my files. Can we IM since nobody else is engaging in this discussion?

Question: Scanning hda2 is taking an unusually long time and its the same with hda1. However, since gpart looks for the start of the partitions, i hv a feeling it should scan the whole disk instead of just 1 partition. thus i have scanned just hda itself, assuming that hda contains hda1 and hda2. I got 1 possible partition almost instantly. Is this what im supposed to do?