LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-11-2007, 10:37 AM   #16
3lowdown
LQ Newbie
 
Registered: Aug 2007
Posts: 26

Original Poster
Rep: Reputation: 15

May have stumbled onto something here. I booted with Gparted, and finally noticed the flags column. I set the restore partition's flag to Boot (it did say ?lva). Saved, rebooted and now the HP PC Recovery is underway. Wish I'd have noticed that flag a month ago!
 
Old 10-11-2007, 11:12 AM   #17
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
The advise below is based on the partition layout as indicated in Post #3. Making sda1 bootable instead of sda2 bootable will nullifies the advice.

The problem does not appear to be fully reported and the OP does not seem to be fully conversant with the partition table structure (from C is blank and D still have files).

The OP even attempted to alter the hard disk geometry to 240 heads without a valid reason and against the print out stated in Post #3 that the hard disk has 255 head and 63 sectors.

If Gparted was not resizing sda2 then there could be no damage to it when the power to the PC was interrupted.

I would change the number of heads back to 255 myself because the LBA mode assumes all hard disks to have 255 heads and 63 sectors and only the number of cylinders varies.

There is only one partition sda2 which is in ntfs format and so that will have all the Windows files. The OP did mention he/she can read the files and so that partition is healthy, appear to be mountable and so all data inside can be salvaged.

The current problem appears to be the Windows isn't bootable.

Before advice can be given we need to know if the sda1 was original bootable or not. The Post #3 indicated that sda1 is not bootable (possibly a utility partition set up by HP and substantially empty) because sda2 has a "*" meaning it has the booting flag switched on, otherwise the boot loader for Windows may have been deposited in sda1. Windows boots only an active partition which must have its booting flay switched to the "on" position.

If sda2 is indeed a bootable partition then it will have all the booting files inside, like NTLDR and boot.ini (hidden). A view from PCLinuxOS can reveal all this.

Assuming sda2 is healthy then these commands in a Grub prompt should fire it up
Code:
root (hd0,1)
chainloader +1
boot
A Grub prompt can only be obtained before a Linux is booted so this may be hard for the OP to generate himself/herself unless he/she has a floppy drive and follow the Chapter 3.1 of the Grub Manual to dd the stage1 and stage2 files from the Live CD of PCLinuxOS to a floppy.

The other method to make sda2 bootable is to run Windows installation CD, choose repair and drop into recovery console and issue command
Code:
fixmbr
This should make Windows bootable again unless Windows washes its hand on a dodgy hard disk with partition boundary errors.

The above is based on sda2 is in a healthy state. Only the OP can tell by mounting this partition in PCLinuxOS (if it isn't already mounted). If the partition is of value I strongly recommend to get a external USB hard disk to clone the disk over as a backup.

Last edited by saikee; 10-11-2007 at 11:17 AM.
 
Old 10-28-2007, 04:40 AM   #18
fynstee
LQ Newbie
 
Registered: Oct 2007
Posts: 8

Rep: Reputation: 0
Sometimes the simple stuff is right..

Quote:
Originally Posted by 3lowdown View Post
Ok, tried gparted testdisk, said heads were 255 and should probably be 240, so I changed them to 240, re-ran analyze, and it didn't flag them as bad, but still can't boot windows. Windows XP Boot disk says:

Windows could not start because the following file is missing or corrupt:
<Windows root>\system32\hal.dll.
Please re-install a copy of the above file.


what next?
Thanks
What was wrong with windows (I assume it's fixed by now) is exactly what it says in the error message. Windows thinks that file is missing or corrupt, usually because the registry itself is corrupted.

If pressing F8 and using the 'Last known good configuration' doesn't work you can replace the windows registry hives with earlier versions using a linux live CD like Wolvix (wolvix reads/writes to ntfs).

It's a bit like the old scanreg /restore from Win98, a sort of limited system restore concerning just the reg files.

Your current registry files can be found here:-

C:\WINDOWS\System32\config\

Your XP's system restore stores old copies in the C:\System Volume Information folder. Can't remember the names used for the folders in ther, but it's a big mishmash of letters. Look for these files in a relatively recent folder:-

_REGISTRY_MACHINE_SAM
_REGISTRY_MACHINE_SECURITY
_REGISTRY_MACHINE_SOFTWARE
_REGISTRY_MACHINE_SYSTEM
_REGISTRY_MACHINE_DEFAULT

Then rename them as show below:-

Rename '_REGISTRY_MACHINE_SAM' to SAM
Rename '_REGISTRY_MACHINE_SECURITY' to SECURITY
Rename '_REGISTRY_MACHINE_SOFTWARE' to SOFTWARE
Rename '_REGISTRY_MACHINE_SYSTEM' to SYSTEM
Rename '_REGISTRY_MACHINE_DEFAULT' to DEFAULT

Then copy the renamed files to C:\WINDOWS\System32\config\

This replaces the old corrupted registry hives with ones from an earlier point. WinXP should now boot
 
Old 10-28-2007, 06:19 AM   #19
moljac024
Member
 
Registered: May 2007
Location: Serbia, Europe
Distribution: Arch Linux
Posts: 54

Rep: Reputation: 15
All the time you spent waiting or trying to fix windows could have been spent re-installing it and all of your apps about 30 times !
 
  


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
set iBook to automatically power-up after power failure peachy Other *NIX 4 04-19-2006 12:44 PM
I lost my Partitions using GParted! MorPhiend Linux - Newbie 1 11-23-2005 01:11 PM
Power Failure On AC power ONLY Gateway 5300 marti35 Linux - Laptop and Netbook 1 05-22-2005 10:14 AM
Power Failure - Settings lost squirellplaying Debian 1 01-15-2005 11:35 AM
power lost from cable modem, interface lost a10392 Linux - Networking 4 11-16-2004 09:01 AM


All times are GMT -5. The time now is 02:17 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration