Unable to boot Windows XP "HAL.DLL not found"

Hi
I have installed SUSE 11.1 on my laptop (HP Compaq 8510 with Windows XP). I made a “default” installation and used the suggested partitioning. I also wanted dual boot.

The installation was fine and im happy with SUSE 11.1 but when i try to start Windows XP “HAL.DLL” is not found.
I thought that “fixmbr” would solve the problem but the XP-install disk can not find any hard drive.

This is very strange to me. I have installed SUSE many times before and i have also used “fixmbr” but this time im totally lost. Can anyone help me ?

There are a number of reasons for that error, but the two most common are a boot.ini file not configured correctly (which can happen after changing the partitioning) or a problem in the partition boot sector data block. So first things to do are to repair/rebuild boot.ini and re-install the boot sector. You can do both from the XP CD. Look here:

Error message: “Windows could not start because of a computer disk hardware configuration problem”

Missing Hal.dll - Missing Or Corrupt Hal.dll Error Message in Windows XP - Fix Hal.dll

Thank you for replying …
I have tried to reinstall MBR by using fixmbr but Windows XP install “cannot find any hard disk drive”.

I should say that i can see both Windows-C and Windows-D and all its files (including hal.dll) from SUSE.

Seems like my hard drive is somehow “hidden” to Windows…

I have tried to boot on the Windows XP CD again.
The exact message is:
“Setup did not find any hard disk drives installed on your computer”
When i try to start WinXP from GRUB i get message that hal-dll is missing or is broken. NOTE the fonts of the message is the standard windows fonts.

The strange thing is that from SUSE everthing looks fine. As i said before both Windows-C and Windows-D are mounted

If you are trying the installation via the XP cd and you have SATA hdd(s) XP won’t find the drive unless you add the SATA driver to it.
If windows partitions are correct and hall.dll is not corrupted the system shoudl boot fine if everything is right in Grub.
So post the output of:

cat /boot/grub/menu.lst
cat /boot/grub/device.map
fdisk -l

ok, here are the outputs…

cat /boot/grub/menu.lst

Modified by YaST2. Last modification on Mon Dec 22 17:35:35 CET 2008

default 5
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,3)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: xen###
title Xen – openSUSE 11.1 - 2.6.27.7-9
root (hd0,3)
kernel /boot/xen.gz
module /boot/vmlinuz-2.6.27.7-9-xen root=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part4 resume=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part3 splash=silent showopts vga=0x345
module /boot/initrd-2.6.27.7-9-xen

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.1 - 2.6.27.7-9 (default)
root (hd0,3)
kernel /boot/vmlinuz-2.6.27.7-9-default root=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part4 resume=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part3 splash=silent showopts vga=0x345
initrd /boot/initrd-2.6.27.7-9-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.1 - 2.6.27.7-9 (default)
root (hd0,3)
kernel /boot/vmlinuz-2.6.27.7-9-default root=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part4 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x345
initrd /boot/initrd-2.6.27.7-9-default

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Debug – openSUSE 11.1 - 2.6.27.7-9
root (hd0,3)
kernel /boot/vmlinuz-2.6.27.7-9-debug root=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part4 resume=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part3 splash=silent showopts vga=0x345
initrd /boot/initrd-2.6.27.7-9-debug

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Trace – openSUSE 11.1 - 2.6.27.7-9
root (hd0,3)
kernel /boot/vmlinuz-2.6.27.7-9-trace root=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part4 resume=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part3 splash=silent showopts vga=0x345
initrd /boot/initrd-2.6.27.7-9-trace

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.1 - 2.6.27.7-9
root (hd0,3)
kernel /boot/vmlinuz-2.6.27.7-9-pae root=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part4 resume=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part3 splash=silent showopts vga=0x345
initrd /boot/initrd-2.6.27.7-9-pae

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.1 - 2.6.27.7-9 (pae)
root (hd0,3)
kernel /boot/vmlinuz-2.6.27.7-9-pae root=/dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B-part4 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x345
initrd /boot/initrd-2.6.27.7-9-pae

###Don’t change this comment - YaST2 identifier: Original name: windows###
title Windows
rootnoverify (hd0,1)
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: floppy###
title Diskett
rootnoverify (fd0)
chainloader +1

**
cat /boot/grub/device.map**

(hd0) /dev/disk/by-id/ata-Hitachi_HTS543216L9A300_080918FB0200LCDHMT0B
(fd0) /dev/fd0

Hope it makes any sense.
//Adam

Wow you have a lot of suse entries do you use them all?

Ehrm :shame:
Not really. I wanted to open a VM-Ware machine and installed XEN then it turned out that i could not use it so i installed Virtual Box. Both add entries.
I guess i should have removed all unnessesary entries before posting it but i blame my ignorance.

Btw Virtual Box worked fine :wink:

//Adam

You did not post back the output of “fdisk -lu” as @JobSway requested. We need that to verify the menu.lst against.

Have you used the XP CD before on this specific machine (i.e., same motherboard and disk)? As @JobSway also mentioned, XP’s CD does not have SATA drivers. It is also possible, although much less likely, that even an IDE driver is required to be added this way. Also, a drive larger than 137GB may be a problem for XP’s original CD, that support was added with SP1. In this case, the solution is to (a) insert the driver into Setup via floppy, (b) use XP media with SP1 or greater included, (c) create a slipstreamed installation CD. Note that this problem will also occur if the drive was installed using a manufacturer’s “overlay”; a piece of software that was used to work around the large drive barrier. The bios must also have the drive set to use “LBA” (and the bios must support 48-bit LBA).

Check the drive configuration in your bios setup. Often there are settings with terms like “RAID”, “SATA”, “Legacy”, “IDE”, “AHCI”. XP Setup may need a different configuration to see the disk.

Re starting XP from grub: The first thing to check is that grub is chainloading to the correct partition, again the need for the fdisk output. Second thing is to check the boot.ini file (as suggested above); you can do this from openSUSE. Third thing is to reinstall or restore the XP boot sector; ordinarily you would do this from the XP CD - alternatively, there is a tool in the openSUSE repo called Testdisk (be sure to install photorec with it). Testdisk can restore the boot sector from its backup (when Windows formats the partition it places a backup boot sector at the end of it).

Arghh !! stupid me !
Sorry

Here is the output of
fdisk -lu

Disk /dev/sda: 160,0 GB, 160041885696 byte
255 huvuden, 63 sektorer/spår, 19457 cylinders, total 312581808 sektorer
Enheter = sektorer av 1 · 512 = 512 byte
Diskidentifierare: 0xda4dda4d

Enhet Start     Början        ****     Block    Id  System

/dev/sda1 16065 40965749 20474842+ f W95 Extended (LBA)
/dev/sda2 40965750 163846934 61440592+ 7 HPFS/NTFS
/dev/sda3 163846935 168055964 2104515 82 Linux swap / Solaris
/dev/sda4 * 168055965 312576704 72260370 83 Linux
/dev/sda5 16128 40965749 20474811 7 HPFS/NTFS

//Adam

I disabled SATA in BIOS and tried cd XP CD again.
Now the XP-setup finds the hard drive and the windows installation but it finds it on D: ???
Strange huh ?
Im afraid to use “fixmbr” beacause i dont know what will happen when i start windows on D: instead of c:

Maybe this can explain why GRUB is so confused.
Any ideas ?

//Adam

First, the XP CD may not actually see the drive lettering the same way you do while within Windows (don’t make me explain). And, no, please do not use fixmbr yet - let’s take a look at what is actually in the MBR.

In openSUSE, open a terminal and as root do the following (be extremely careful with the dd command; a mistake could do a lot of damage):

dd if=/dev/sda of=sdambr bs=512 count=1
xxd sdambr

Post the output of the xxd command back here.

And is the disk a SATA or IDE/PATA drive?

Here is the output of
xxd sdambr

0000000: 31c0 8ed0 bc00 7c8e c08e d8bf 1e06 be1e 1…|…
0000010: 7c50 57b9 e201 f3a4 b900 02f3 abcb 80fa |PW…
0000020: 8f7e 02b2 8052 52bb 9407 8daf 2a00 8a46 .~…RR…*…F
0000030: 0466 8b7e 0866 033e b306 84c0 740b 807e .f.~.f.>…t…~
0000040: 0080 7505 6689 3e84 0b83 c510 83c3 0980 …u.f.>…
0000050: fbb8 75da b8e1 00c1 e002 89c6 668b ac00 …u…f…
0000060: 0866 85ed 7519 b8c5 06be bb06 e8a5 0089 .f…u…
0000070: c6e8 9a00 5a31 c0cd 13cd 18fb f4eb fc66 …Z1…f
0000080: 892e b306 beab 06b4 425a 52cd 13b8 d906 …BZR…
0000090: 72d7 a000 7c84 c074 03a1 fe7d 3d55 aab8 r…|…t…}=U…
00000a0: e906 75c5 6689 ee5a e955 7510 0001 0000 …u.f…Z.Uu…
00000b0: 7c00 0000 0000 0000 0000 0045 7272 6f72 |…Error
00000c0: 2000 0d0a 004e 6f20 6163 7469 7665 2070 …No active p
00000d0: 6172 7469 7469 6f6e 0044 6973 6b20 7265 artition.Disk re
00000e0: 6164 2065 7272 6f72 004e 6f20 6f70 6572 ad error.No oper
00000f0: 6174 696e 6720 7379 7374 656d 0049 6e76 ating system.Inv
0000100: 616c 6964 2043 4853 2072 6561 6400 e803 alid CHS read…
0000110: 00be c206 60ac b40e bb01 00cd 10ac 84c0 …`…
0000120: 75f4 61c3 0000 0000 0000 0000 0000 0000 u.a…
0000130: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000140: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000150: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000160: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000170: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000180: 0000 0000 0000 0000 0000 0000 0000 0000 …
0000190: 1c80 b600 0000 0000 0000 0000 0000 0000 …
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 …
00001b0: 0000 0000 0000 0000 4dda 4dda 0000 0000 …M.M…
00001c0: 0101 0ffe ffff c13e 0000 b5d7 7002 0000 …>…p…
00001d0: c1ff 07fe ffff 7616 7102 a104 5307 00fe …v.q…S…
00001e0: ffff 82fe ffff 171b c409 8639 4000 80fe …9@…
00001f0: ffff 83fe ffff 9d54 040a 2436 9d08 55aa …T…$6…U.

As i understand the disk is a SATA.

//Adam

OK, that is helpful. You have 2 NTFS partitions, 1 is ~10GB (named sda5) and the other ~31GB (named sda2). Please take a look at each (from within openSUSE) and verify which is the Windows boot partition - that is, look for the files boot.ini, ntldr, and ntdetect in the root folder of the partition. Don’t think in terms of “C” or “D”, just indicate which by the phsyical characteristic - either sda5/10GB or sda2/31GB.

sda5 is 19.5 Gb and it contains the system files

//Adam

OK. Your post of fdisk threw off my size calculation :wink: - the output is from “fdisk -l” not “fdisk -lu” (-l reports in blocks, -lu in sectors).

The reason the XP CD only sees the ~63GB partition - sda2 in the fdisk table - is because it is the only Windows “primary” partition. The ~20GB partition that holds your system files - sda5 - is a “logical” partition inside an “extended primary” (sda1). The XP Recovery Console assumes the system files will be on a primary.

openSUSE installed “generic boot code” to the MBR, which behaves very similar to the Windows boot code (it’s just a bit more flexible). It will find the “active” primary (marked with an asterisk in the fdisk partition table), which is now sda4. Grub is in sda4, and it is “chainloading” to the Windows boot sector in sda5, which runs the Windows boot loader (ntldr). If you use fixmbr from the Windows CD, nothing will change!

It appears that the ~20GB was converted from a primary to a logical in order to make room for the openSUSE partitions. A good educated guess is that your Windows booting problem is being caused by boot.ini not pointing to the correct partition where the OS is now. That is, boot.ini is configured to find Windows on sda1 when in fact it is now sda5.

So I suggest that you access /dev/sda5 - your Windows “C” partition - in openSUSE, find boot.ini, and post the file contents back here. I will edit the file for you to make ntldr look for sda5 instead of sda1. That may solve the boot problem.

Turns out that boot.ini is empty.
It looks like this :

[boot loader]

timeout=

[operating systems]

Well, that will certainly make Windows unable to boot.

Here is a boot.ini file to use. Important: For booting, Windows ignores the “extended primary” partition, currently number 1 in the table. So based on the table, your boot partition numbered 5 would for boot.ini be number 4. However, what I am not sure about is if this changes when the physical sequence of the partitions on the disk is not the same as the numbering in the table - that is, while your table is 1-2-3-4-5, on the disk itself the physical partition order is 1-5-2-3-4. If Windows uses the partitions in this order rather than the table, then the boot partition would be number 1. So I have built your boot.ini using both numbers, just in case. So while I expect Windows to use number 4, I have also created a number 1. Later you can just edit out whichever line does not work; also the default is set to number 4, edit that if it turns out number 1 is what works, and edit the menu title to your liking.

[boot loader]
timeout=60
default=multi(0)disk(0)rdisk(0)partition(4)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(4)\WINDOWS="Windows XP (nbr 4)" /FASTDETECT /NOEXECUTE=OPTIN
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP (nbr 1)" /FASTDETECT /NOEXECUTE=OPTIN

The above presumes your machine uses “Windows” for its OS directory. If you upgraded to XP from, say Windows 2000 or NT, then this would be “WINNT” instead.

Please do the above very, very carefully. Otherwise Windows may throw some error message which will mislead us. I actually set up a test case, getting the hal.dll missing error due to a bad boot.ini. Fixed the boot.ini, and got the boot. So there is a good chance this should work.

Good luck.

I have inserted the lines in boot.ini without sucsess. The error is the same.

I know for sure that sda5 (/windows/C) is my NTFS-Windows partition and that sda2 (/windows/D) is the NTFS-Data partition. I know that because i recognize the files and directories in the partitions. I also reconize the size.

I use YAST to “edit” boot order in GRUB.

If i set “Windows” in GRUB to sda2 (the larger partition, no Windows) i get two “screens”

Screen 1

rootnoverify (hd0,1)
chainloader +1

**
Screen 2**

Could not start Windows 
<Windows-root>\system32\hal.dll is missing

The error message is logical beacuse on this partition there is no Windows at all.

If i set “Windows” in GRUB to sda5 (the smaller partiton with windows) i get one “screen”
**
Screen 1**

rootnoverify (hd0,4)

A disk read error occured
Press Ctrl+Alt+Del to restart

My head is spinning and i am so confused.
I know for sure that sda5 is the “Windows partition” but on boot i get a disk read error.

Btw i would like to thank you for your patience.
Merry Christmas to you all !

//Adam

Merry Christmas.

rootnoverify (hd0,1)
chainloader +1

<Windows-root>\system32\hal.dll is missing

looking at the two messages above and knowing XP will not install without putting its boot files on a primary partition, can deduce that NTLDR is on (hda0,1). You have a XP boot partition and a different XP system partition.

Put the boot.ini file in (hd0,1) , and to to boot to it. As with “mingus725” I do not know the correct intries for boot.ini but likely the (nbr4)