PDA

View Full Version : Hal.dll error preventing 2nd OS from starting



Dan Mitchell
12-16-2008, 02:15 AM
I have a PC I built about 2 years ago, with 5 hdd's, running XP home. I recently added a 2nd XP Pro OS, on another of the 5 hdd's, so as to dual boot. All went well with the new OS, until I added a 6th hdd. Now when I try to get into the new OS, I am told the file hal.dll is missing or corrupt. From the original OS, I tried replacing the effective hal.dll using the install disk & the command "Expand hal.dl_". It replaced the file, but still NOGO. I also checked the boot order in bios, thinking perhaps the hdd this 2nd OS was installed on might have gotten bumped off the boot order by the new hdd, but that doesn't seem to be the case; it seems to be number 2, secondary master. I'm stumped, anyone got any ideas?

TIA

Dan

mjc
12-16-2008, 11:11 AM
If you pull the 6th drive, does it boot?

If it does, then the problem isn't a hal.dll problem, but most likely a boot.ini one...

If it does boot without the drive, post the contents of the boot.ini here and we'll try to figure out where it goes 'wrong'...

Paul Komski
12-16-2008, 02:06 PM
It's almost certainly boot.ini (or one of more than one boot.ini files since you have two installations).

You can try editing boot.ini (giving different rdisk values to the relevant line of code) or run bootcfg /rebuild from the recovery console but for either to work the BIOS must be attempting to boot the correct drive in the first place.

Dan Mitchell
12-16-2008, 09:37 PM
Thanks for the replies. I tried booting w/the new hdd removed, same hal.dll error occurs.

Boot.ini is as follows:

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="M$ Windows XP Home on S1P1" /FASTDETECT /NOEXECUTE=OPTIN /PAE
multi(0)disk(0)rdisk(2)partition(1)\WINDOWS="M$ Windows XP Pro on S2P1" /noexecute=optin /fastdetect

Upper OS is the older, still functional one, bottom one is the new OS. Note that I HAD BEEN able to access this 2nd OS with this boot.ini.

I tried substituting the numbers 0 through 6 for "rdisk(#)" in the lower line, still NOGO.

BIOS has the following which jumps out at me as possibly being relavent:

SATA 1 320 gig drive whose 1st partition holds the original, still functional OS.
SATA 2 320 gig drive whose 1st partition holds the now inaccessible OS.
SATA 3 500 gig storage drive
SATA 4 500 gig storage drive
SATA 5 Existing 1,000 gig storage drive
SATA 6 Newly installed 1,000 gig storage drive

Note that there are 3 sizes of hdd, 2 of each. Within each size, both drives are identical make/model. Drives are connected as IDE, no raid config at the moment.

BOOT DEVICE PRIORITY

1 Floppy (system has no floppy drive)
2 SATA 1, 320 gig disk w/operable OS
3 ATAPI CD-ROM (I have no idea what this is; system has always had one DVD burner, below)
4 DVD drive

Seems like the order should be

1 DVD
2 SATA 1 (original OS)
3 SATA 2 (new OS)
4 Disabled.

I wondered about adding the drive with the inoperable OS & establishing the above order, but when you pull up the options, the only options are the 4 in the 1st list, above, and "disabled".

Any other ideas appreciated.

Dan

Paul Komski
12-16-2008, 10:19 PM
Some BIOSes will list devices not in existence - others will only list those that exist. The correct order would be:
1 DVD drive
2 SATA 1
3 Disabled
4 Disabled
... or ...
1 SATA 1
2 DVD drive
3 Disabled
4 Disabled
... depending on whether you want the DVD first or second. You don't need SATA 2 in the boot order because it is booted from the second line in boot.ini which lives on SATA 1.

How many partitions on SATA 2 and are they all accessible from the XP Home installation and visible in its disk management and are there any logical partitions on the drive?

It could be helpful to post the output of partitioninfo (http://paulski.com/zpages.php?id=2103) run from a CD made from the pqutils.iso or a BartPE with the matching plug-in or by direct ftp download of the following link PartInNT.zip (ftp://ftp.symantec.com/public/english_us_canada/tools/pq/utilities/PartInNT.zip) and simply run from within XP Home. This would be least confusing if done with SATA 3 through 6 temporarily detached and the output of partitioninfo would answer some of the questions already asked. Simply select the relevant drive in partitioninfo and Copy to Clipboard.

PS
If just running with SATA 1 and SATA 2 you could try temporarily adding the third line below to boot.ini and see if that too gives you the Hal.dll warning when selected at start up.

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="M$ Windows XP Home on S1P1" /FASTDETECT /NOEXECUTE=OPTIN /PAE
multi(0)disk(0)rdisk(2)partition(1)\WINDOWS="M$ Windows XP Pro on S2P1" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Temp XP Pro on S2P1 Two drives only" /noexecute=optin /fastdetect
If booting the third line with just two drives attached gives you the hal.dll warning then you could also try editing its partition(n) value to 2, 3, 4 etc depending on how many and what type of partitions exist on the drive. If still no joy then if X: is the drive letter of the windows partition on SATA 2 you could boot to the installation CD's recovery console and issue fixboot X: (or whatever other letter is appropriate) to rebuild its partition boot sector.

Dan Mitchell
12-16-2008, 11:16 PM
Paul - Thanks for the helpful reply, I'll walk through your suggestions. Here's a screen shot of Partition Magic 7, showing SATA1 (C: (working OS), E: & F: partitions, as well as SATA2 (J:, (non-working OS), M: 7 N: partitions. What strikes me is SATA1 partition 1 is shown as primary & not extended with the other 2 partitions on that drive, while SATA 2 partition 1 is shown as logical & extended with the other 2 partitions on that HDD. I don't know what these settings would have been prior to the trouble getting into the new OS, which I was able to do. I'm not that clear on the functional differences among partition types, does any of this seem relevant?

Thanks again

Dan

http://img.villagephotos.com/p/2007-10/1282864/partitions.jpg

Paul Komski
12-16-2008, 11:27 PM
while SATA 2 partition 1 is shown as logical & extended with the other 2 partitions on that HDD.
It doesn't matter, per se, that it is in an extended partition but the way partitions are enumerated depends on the exact entries in the partition tables of the relevant drive.

To that extent it depends on whether the Unallocated space prior to the extended partition gets counted in the mix or not; usually not. PTEdit for that drive would indicate whether there is only an extended partition or whether this is preceded by an empty but referenced primary partition. What can also be important (from a partition enumeration point of view) is whether the daisy-chain of logical partitions are in sequence.

The empirical test is to try partition(2), partition(3) and partition(4) as the value in its boot.ini reference.

It's too long-winded to easily describe how to examine the daisy-chain but paritioninfo would allow this to be deciphered.

BTW it is normal for there to be that space in front of an extended partition when the extended is the only or first partition on a drive. The reason is to to with the need for the first logical partition to start on a cylinder boundary and it cant start at the beginning of the drive because of the extended partition's own metadata.

A first logical partition like the one described is usually partition(1) and this was working at one point. I suspect that either windows pro is courrupt in some way or the boot sector needs repairing with fixboot as previously described.

The most long-winded fix that should work if the problems are not cause by bad sectors on the drive is to run a repair installation of xp pro. However I would run chkdsk j: /f from a command prompt and also check the drive with HDTune or the makers own diagnostics first.

Sylvander
12-17-2008, 08:53 AM
If you have a FDD...

Seems to me it would be wise to play around using
This Windows NT 4.0, 2000, XP or Server 2003 boot floppy disk (http://www.nu2.nu/bootdisk/ntboot/).
You could [on any handy PC] edit its boot.ini file to include all the likely combinations of physical HDD's and partitions, then try loading Windows from each of those [on the problem PC] until you hit the right one.

Paul Komski
12-17-2008, 09:07 AM
Seems to me it would be wise to play around using ...
I am happy to be proved wrong but I don't think this gains anything from editing the current boot.ini in the WinXP home installation. The current boot processes including the boot sector, ntldr and ntdetect.com on the current system drive are all functional and it is the linkage between ntldr and hal.dll on XP pro that is being problematic.

The only time I would think it worth trying a "quick boot floppy or cd" would be with only the current problem drive in the PC. Bearing in mind that the boot partition (J: under winxp home) is currently a logical partition this adds to the complexities so it would probably be worth converting the logical to a primary partition before even attempting this.

Originally I thought this would be a simple boot.ini problem. It still could be but now I'm veering towards there being corruption somewhere. If converted to the only primary partition on the drive then it should definitely be enumerated in boot.ini as partition(1) on that drive.

Sylvander
12-17-2008, 10:05 AM
"I don't think this gains anything from editing the current boot.ini in the WinXP home installation"
Just my preference. :)
I'd rather leave the files on the HDD alone, until...
Step back from the [possibly problematic] HDD...
Mess around on [one or more copies of] bootable floppies...
That almost certainly have no problems.
The boot.ini file could be made to include LOTS of settings [wouldn't want to do that to the copy on the HDD].
If no boot.ini setting could be found to succeed, then there's something wrong with the later boot stage.
Or...
Once a boot.ini setting is found that works, you can include that in the boot.ini file on the HDD. :)
Picked up the idea for the method from the "Emergency Boot CD".

It's a bit "trial-and-error", but when I do things that way they usually work. :D

Paul Komski
12-17-2008, 12:59 PM
There are actually not that many options to "mess around with" as regards the boot.ini references. The partition value is likely to be partition(1) but not more than partition(4). The rdisk value is likely to be rdisk(1) or rdisk(2) but could obviously be any value from rdisk(0) through rdisk(5).

Since boot.ini is functional on the system partition there is nothing to be lost by adding lines to it. Deleting or editing current lines is a little different.

The time, as intimated, that a boot floppy or CD would have a real role would be an attempt to boot the problem drive when the current working drive was not in the PC.

Dan Mitchell
12-17-2008, 11:04 PM
I finally got into the new OS using the line
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="M$ Windows XP Pro on S2P1" /noexecute=optin /fastdetect

The original line, which had worked previously, was
multi(0)disk(0)rdisk(2)partition(1)\WINDOWS="M$ Windows XP Pro on S2P1" /noexecute=optin /fastdetect

I made *30* entries in boot.ini with every possible combination of rdisk & partition and began working my way through them, I got lucky on combo # 6.

Still not sure how the functional rdisk changed from 2 to 1, had to be the installation of a 6th hdd, but in any event, all's well that ends well, I guess :D

BTW, boot.ini in this case remained in the root directory of the original OS.

Thanks for the thoughtful comments, I appreciate the time required to make such replies.

Dan

Paul Komski
12-18-2008, 02:28 AM
Still not sure how the functional rdisk changed from 2 to 1, had to be the installation of a 6th hdd.
The way in which both the BIOS and the OS enumerate hard drives is obscure and inconsistent as well as differing from OS to OS. The OS may or may not mirror how the BIOS has enumerated and Win2K on the exact same hardware is quite likely to enumerate differently than WinXP. It can be a bit of a minefield with multi-drive setups like those encountered here. Obviously the new SATA channel affected things but it was strange that it didn't revert after removing the added drive. But that's computers for you. Possibly resetting the BIOS to defaults after removing the added drive would have been successful.

It would perhaps have been easier had Pro been installed into a primary partition; it would have given one more flexibility as would installing the complete OS to the Pro drive while the Home drive had been removed from the system. Had the latter been done both hard drives would have had a complete set of boot.ini, ntldr and ntdetect.com and also boot.ini on either or both drives (when the Home drive was returned to the system) could be used to boot both installations.

The other advantage of having two independent installations is that one can use a third party boot manager such as SmartBootManager or BootItNG or XOSL to make the choices instead of relying on the "Microsoft way" which defaults to using the same partition and same boot.ini file for all. Also, if really stuck, one can usually just change the boot order and the preferred drive chosen in the BIOS setup should become rdisk(0). This wouldn't work here (without some very special tweaking (http://www.goodells.net/multiboot/)) because it is generally not possible to directly boot a logical partition since its own boot sector references the start of the extended partition when what is needed is for it to reference the start of the hard drive.