I recently decided to edit my boot.ini file (from within WinXP) to erase an entry on my boot-up OS selection menu and thought I did it correctly. I didn't, and when I rebooted I came to an error message similar to this:
<root>\system32\hal.dll is missing or corrupt, please replace this file and try again (or something to that effect)
Here's my configuration:
I have 2 partitions - C: has WinME on it but the OS is corrupted and won't allow me to boot to it (been like this for months)
D: has WinXP Pro on it and is where I spend all my time
Here's the boot.ini file I edited (changes in bold)
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2changed to 1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2changed to 1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect erased the line containing Windows Millenium
So, I proceeded to fix my problem with the following steps:
(I backed up the original boot.ini file before I changed it, but unfortunately I forgot where I saved it :P )
1) booted to the WinXP Pro install CD and used the recovery console to try and repair the installation (didn't work)
2) In that same recovery console I tried to copy
hal.dll off the WinXP Pro CD onto the D:\windows\system32\hal.dll to overwrite the file (didn't work)
3) I then decided that I needed to edit the boot.ini file, but with no functioning OS to edit the file with I resorted to my Slackware LiveCD (CD-bootable Ver). I booted to the CD, opened up KWrite and then opened up boot.ini. After making the necessary changes I then tried to save but I got an error telling me I didn't have permission to do so.
4) I tried saving the file to a floppy but it gave me an error on that as well. So I booted to Knoppix 3.1 (CD-bootable), opened up KWrite, edited boot.ini, saved it to a floppy disk and restarted.
5) I used a Win98se boot disk to enter DOS and overwrited the corrupted boot.ini file on the HD with the edited boot.ini I had on the floppy (this step wasn't required as I could've done this from within Knoppix, but I was tired and bleary eyed)
6) Restarted and Everything's OK.
So, what's the moral of this story/guide? Don't edit the boot.ini file or any other major configuration file unless you know
exactly what you're doing. I haven't made a mistake like this in quite a while but it only takes one time for you to royally mess up your system.