LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-17-2003, 09:47 PM   #1
madangsweh
Member
 
Registered: Jul 2003
Posts: 32

Rep: Reputation: 15
Unhappy How to recover Windows XP hard disk on HP pavilion


I recently got a HP pavilion computer that windows xp loaded on it. This is brand new with 80GB hard disk. However it has been logically partitioned with C and D where C for 75G with xp and 5G for the recovery. I got an additional hard disk around 32G and installed redhat 9.0 on the second hard disk. I planned to use the second hard disk only for Linux.

The installation was very successful and I was able to run Linux. I was very impressed with the quality of the Linux. However when I reboot the computer and tried to boot with xp, unfortunately it tries to load with the recovery not the xp. I tried to mount it from Linux, but it only mounts the recovery disk. So it seems like the C partition was gone.

Is anybody knowing to recover the C drive for back-up?

Please give me a clue for this problem....
 
Old 07-17-2003, 10:38 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I have a 40 gig HP Pavilion with XP and a 4 gig recovery partition. I have yet to try Linux on that one - running my Athlon happily. My partition was a "hidden" partition, though. You could actually see yours as C: and D:? That'd be nice.

Anyway - the recovery is probably FAT so Linux can read it. XP is certainly NTFS so, depending on your kernel configuration, Linux may not be able to see it as it would other filesystems. It's probably still there. Where did you install LILO/Grub? What were you booting with? LILO may not be set up to boot XP or XP may just be complaining about the boot sector being different. If you want, just play along with the recovery thing to see what it wants to do. Just be careful because "recovery" means completely reformatting the drive and reinstalling Windows from the other partition. I don't really know what it would do with the second drive. Also, there may be issues with getting XP to recognize the new drive. You might have kind of voided your warranty since HP and MS don't like you to change the hardware. You can also order the recovery disks so that, theoretically, you're not dependent on the recovery partition, which is what I did.

I'd really like to hear precisely what you did because I'm about to do it, too, only on the same drive.

Anyway - what is the screen you get? It may just be the sort of administrative screen where you need to tell it you have a new hard drive and what to do with it. There should be a menu to choose a normal boot or various other procedures. Knowing what "load with the recovery" means would help, but I'm not sure how much help I could be. Wait a day or two and I'll be messing with the same stuff. *g*

And just to check - you are familiar with Linux drive assignments and did install Linux to hdb and not hda, right? (Assuming both are IDE, etc.)
 
Old 07-17-2003, 11:04 PM   #3
madangsweh
Member
 
Registered: Jul 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you for the reply.

I did install Linux on hdb not hda.
Also I used GRUB than LILO.

I guess I install it to Master Boot Record.

I actually tried to recover it, but it ain't helping me at all.
What happens is after the recovery it goes back to recovery again because it doesn't see C drive with XP in it.

I spoke to HP and they said I need to go with destructive recovery that I will lost most of my data. Therefore it is very paintful now. I think if I do that not only I loose the data but also I will loose Linux as well because the GRUB is in MBR.

What do you think? I am really screwed up..

Help me.
 
Old 07-18-2003, 12:09 AM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Crap. I don't know grub. But whatever you do, hold off that destructive recovery. HP will tell you that just because it'll probably work and so they can wash their hands of it, but it's not so good for you. I'm sure some guru can get you straightened out or it would at least be a last resort.

Now I am kind of wondering about the Windows partition, though. I was always suspicious of that arrangement - XP actually needs a set of files to boot - for instance, I think it more or less "mounts" the hard drive and looks for the kernel there when you try to use a boot disk. It isn't a proper bootdisk at all, in that I don't believe you can bring up the system without the hard drive. It may be that, since you installed grub on the mbr Windows can't find itself. I'm not sure. This is why I held off trying to install Linux on that machine. I was worried about exactly this sort of thing happening. But in all my research and even asking questions here, I never got a positive idea of what the issues were.

My only real suggestion is to try booting Linux again and making sure XP is on the grub.conf and trying to boot it with grub. If it doesn't work, maybe reinstalling grub and trying again. If that doesn't work, if you have a DOS/Win boot disk, trying to fdisk /mbr and seeing if you can get Windows up that way (though you'll temporarily loose Linux). Then see about trying to get XP to boot Linux instead.

Hold up though and see if somebody else has a better idea.
 
Old 07-18-2003, 06:10 AM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
A few questions. I am learning Linux, but know Windoze all too well. We could get to your data on Windoze easy enough if C:\ was partitioned FAT32 instead of NTFS.

First, have you tried to enter BIOS and change the boot order to put your original hard drive as the first in the boot order? This may just boot you right into XP without doing anything else. From there make sure to back up your data before doing anything else.

Second, can you get a XP CD that is not the recovery CD?

Third, can you post your grub.conf file here? It is located at /boot/grub/grub.conf in RedHat 9. You will need to login to a terminal as root, then type cd /boot/grub to get to the proper directory, and then type kwrite grub.conf and anaconda will generate a copy of your grub.conf file in KWrite. Then click anywhere within the text of the file and use Ctrl+A to select it all, then Ctrl+C to copy it - just like in Windoze. When you close KWrite, if it says [The document "grub.conf" has been modified. Do you want to save it?] choose Discard - that means you accidentally changed something, and you do not want to change your grub.conf file without backing it up. Then come here and Ctrl+V, or whatever your browser allows to paste the file here, like this:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$v5nstA0B$ULo2t/L4ULVp.8LHm.tVP0
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title Windoze
rootnoverify (hd1,0)
chainloader +1

This will help someone to see how your Linux hard drive is setup to boot Windoze.

Last edited by Bruce Hill; 07-18-2003 at 06:18 AM.
 
Old 07-18-2003, 06:37 AM   #6
pavgust
Member
 
Registered: May 2003
Distribution: Debian
Posts: 40

Rep: Reputation: 15
Hi,

I had a very similar problem a few weeks ago - at least as far as I can tell. Can you tell us the exact error message windows gives out when it boots up? If it's to do with not finding hal.dll (or something similar), I might be able to help.

It would be nice to know what happens anyway... So you select windows from the GRUB menu. Then what?
 
Old 07-18-2003, 08:18 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,061

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
It might be that RH just assumed that the first partition was for windows.

The recovery partition is probably hda1 and hidden so its not normally seen by the OS. And that RH assumed it to be the windows partitioned.

To see how the first drive is partitioned, as root in a console
fdisk -l /dev/hda

If the XP partitions are still intact you should be able to change the grub.conf file.
 
Old 07-18-2003, 02:46 PM   #8
madangsweh
Member
 
Registered: Jul 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,everybody

I am at work now, so I can't give you all the data you need because I am not able to use Linux here. However I can tell you a lot more than before.

1. My grub.conf file
It is very similar to Chairman's grup.conf
------------------------------------------------------------------------------------
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$v5nstA0B$ULo2t/L4ULVp.8LHm.tVP0
title Red Hat Linux (2.4.20-8)

root (hd0,0) ---> (This was hd1,0 instead in my case!!!!)

kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img

title Windoze ---> ( I titled it as Windows XP )

rootnoverify (hd1,0) ---> (This was hd0,0 instead)
chainloader +1
------------------------------------------------------------------------------------

2. HP provided one time master copy option of Windows XP, so I have windows XP CD in hand.

3. I haven't tried to change the BIOS set-up, actually I went there but I didn't.

Anyway, what I found so far ( I red RedHat manual... ) is that Linux has to be installed within the first two partition of PC. In my case, there was C and D (in Master hard disk) and another extra hard disk for linux ( slave hard disk ). Therefore basically RH9 was installed in the third partition from the OS standpoint. The recovery is on the D drive, so in the boot sequence, it only sees D and Linux, which makes this insane. I know that there is Windows XP in C drive, however it can't be seen because of this.

So, that is what causes the problem.

I don't mind to reinstall the system but I don't want to the my data on C drive. If I remove the D partion, will it help? In this case, I loose the recovery option permanantly, so bad... What is you guys suggestion? Let me know.
 
Old 07-18-2003, 06:49 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,061

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Quote:
Originally posted by madangsweh

Anyway, what I found so far ( I red RedHat manual... ) is that Linux has to be installed within the first two partition of PC.
Not true. linux can be installed on any partition primary or logical. At one time bootloaders were limited to linux being within the first 1024 cylinders but this isn't the case anymore.


>>title Windoze ---> ( I titled it as Windows XP )
>> rootnoverify (hd1,0) ---> (This was hd0,0 instead)

Like I said your recovery partition is probably hda1 which is is the same thing as (hd0,0). Your c drive is probably hda2 so you would need to change the above line to (hd0,1).

The output of fdisk -l /dev/hda will confirm my assumtions.
(BTW -l is a small L)
 
Old 07-18-2003, 06:58 PM   #10
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I never heard of that first-two-partitions issue.

And geez grub is weird. If you have the recovery disks, you don't really need the recovery partition, I don't think. So you could delete D: and either resize C: to take the whole drive (if you've got an NTFS resizer) or move your RH installation to that drive. Or maybe tinkering with the boot order in that grub thing would help. That's assuming the first-two-partition thing is accurate and I'm pretty sure it isn't. It is true that, right now, for my systems, Basic is on a second partition, ZipSlack is on a first (though that's different), and Slack is on the first of hdb while hda is a single partition but I'm almost positive I've had arrangements where Linux was further down the line.

So hd0,0 = hda1
and hd1,0 = hdb1
and so on? Disk,Partition, both numbered from 0? Looks kind of NT loader-ish.

If the data is the most important thing and you haven't backed it up, you could try deleting Red Hat and seeing if you can't get back to Windows. Back up your data, and then reinstall Red Hat, possibly using the D drive for a root partition. Maybe that would work. But somebody else must know a better way.
 
Old 07-21-2003, 01:41 AM   #11
madangsweh
Member
 
Registered: Jul 2003
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,Guys

Guess what... michaelk was right.
After just simple change from hd0 -> hd1, it works!!

That's simple...

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to recover data from hard disk dongyan_liu Linux - Newbie 1 12-01-2005 06:56 PM
Recover files from formatted hard disk bankfishin Linux - General 2 10-22-2004 05:39 PM
Recover Hard Disk that was used for Linux pureheartedsoul Linux - Newbie 3 08-23-2004 12:57 PM
Viewing Windows Hard disk king_scott_2 Linux - Software 1 02-27-2004 05:24 AM
how do i recover my Hard Disk and MBR? Pisces107 Linux - General 5 12-26-2003 12:12 AM


All times are GMT -5. The time now is 06:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration