LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-12-2006, 12:08 PM   #1
pulper
LQ Newbie
 
Registered: Jul 2006
Posts: 18

Rep: Reputation: 0
winxp reinstall w/grub manual install on ubuntu causes missing hal.dll file for xp


Hi!

I have a dual boot xp/ubuntu (dapper) machine. i just did a windows reinstall and tried to install grub to get it to dual boot (which was working well before). i knew this would be a problem so i did some reading beforehand. unfortunately, i have ran into a different kind of problem. basically, winxp is fine until i do the grub manual install using the ubuntu live cd. then i cannot boot into either my ubuntu installation or my xp installation. I'm hoping someone can tell me what i'm doing wrong with grub here.

Forgive the long post, but here is what i've done and the responses:

ubuntu@ubuntu:/dev$ sudo mkdir /mnt/temp
ubuntu@ubuntu:/dev$ sudo mount /dev/hdd5 /mnt/temp
ubuntu@ubuntu:/dev$ sudo mount --bind /dev /mnt/temp/dev
ubuntu@ubuntu:/dev$ sudo mount --bind /proc /mnt/temp/proc
ubuntu@ubuntu:/dev$ sudo chroot /mnt/temp
root@ubuntu:/# sudo grub
sudo: unable to lookup ubuntu via gethostbyname()
sendmail: fatal: open /etc/postfix/main.cf: No such file or directory
Probing devices to guess BIOS drives. This may take a long time.

here is what I did @ grub prompt:
find /boot/grub/stage1
# returns (hd2,4)
root (hd2,4)
setup (hd0)

Here is the results from the above:
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 d (hd0) (hd0)1+15 p
(hd2,4)/boot/grub/stage
2 /boot/grub/menu.lst"... succeeded
Done.

now, i reboot. i get the typical "hal.dll" message. what's happening is somehow grub install above has made windows xp look for it's files on another partition. when i go into recovery mode in xp and type "dir", the files it lists are not the windows main files but a different partition. I also do not get any grub prompt (delay is set to 10 seconds).

so i decided simply to reinstall windows again. windows xp install went fine. after install and proper reboot, i decided to go into ubuntu live cd and do the manual grub install again (just like above).

when i restart, i again get the "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's interesting is that when i restart and go into the winxp recovery mode, it doesn't identify the windows installation and just gives me a prompt. again, in other words, manaully installing grub as above causes windows to try to boot from a different drive. grub also is not performing properly in that it doesn't appear on the screen at all.

this is beyond my level here so i need some more help. does anyone have any suggestions?

Paul
 
Old 09-12-2006, 12:32 PM   #2
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
There are several wierd things going on here.
Have you dual-booted on this machine before?
Can you post the results of
fdisk -l

Have you googled that hal.dll problem?
 
Old 09-12-2006, 12:36 PM   #3
pulper
LQ Newbie
 
Registered: Jul 2006
Posts: 18

Original Poster
Rep: Reputation: 0
thanks for the response. yes i have dual booted before and it was fine. i have googled hal.dll and have looked at a number of possibilities but they do not seem to apply to my case (where grub manual install is creating the problem). i will post fdisk -l a little later.

paul
 
Old 09-12-2006, 12:44 PM   #4
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
I asked for the fdisk output to see how many drives you have - are you running three hard drives in there?

Or might it be that hd(2,4) is only correct when you have the live-cd going (you were running that stuff from live-cd, right?)? On one of my machines, if I boot from a usb-stick, then grub sees that as hd0, and the hard drive as hd1, so if I installed grub the way you did, it would look in the wrong place.

If this is your problem (with ubuntu) then the only solution I know is to install grub from the hard disk, not from the live-cd. Which means you need to boot into your ubuntu install. You could try using a boot-floppy to do this, if you have a floppy drive. There is a grub utility called grub-floppy that will make you one.
 
Old 09-12-2006, 02:28 PM   #5
pulper
LQ Newbie
 
Registered: Jul 2006
Posts: 18

Original Poster
Rep: Reputation: 0
thanks again. i do have 3 hard drives and the linux partition is on the third drive.

i tried using the "super grub disk" utility as i only have a cd rom drive. this is recommended on the ubuntu site. my results were interesting.

when i went into specific booting, it stated that there is no (hd2,4) partition. so i entered edit mode and changed it a number of times to (hd2,5), (hd2,3), etc. nothing worked, so i did "geometry (hd0)". it listed a number of partitions including an ext extension at (hd0,4). i changed (hd2,4) to (hd0,4), and i was able to get into my installed ubuntu. so, it would seem that linux (or maybe grub???) is installed on (hd0,4).

within ubuntu, i typed "sudo grub" at the terminal, did "find /boot/grub/stage1" and it still indicates (hd2,4).

am i doing something wrong here? doesn't the /boot/grub/stage1 file reside in the partition for grub? what do i do to get grub working on my system again?

any suggestions would be appreciated. Thanks,

Paul
 
Old 09-12-2006, 03:53 PM   #6
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
It sounds like it's something to do with the way drives are detected at startup. Three drives means two on one cable and one on another, right? Is that third drive new to the system? Is it sharing a cable with the cd-rom?

You need to work out how what grub sees at startup, and how that relates to what you know about your disk setup. My guess is that this is complicated because what grub sees when it boots from the cd-rom is different from what it sees when it boots from the hard-disk.

If it were mine I'd
- use the super grub cd to boot ubuntu, then try to reinstall grub from the ubuntu hard-drive install, after removing the cd-rom. Just run grub with 'sudo grub' and do that find thing you did before, followed by root (hdx,y) with x,y from your find command, then setup (hd0).
- if that doesn't work, try to work out how grub is mapping your disks, compared to the output of 'fdisk -l'. You can use tab-completion in grub as well as the 'cat' command. Do this from grub on the hard drive (with and without a cd in the drive), and from the grub cd, see if there is a difference.

If you didn't even see the word 'grub' appear when you tried to boot, then it's possible that grub didn't get installed on the 1st disk.

And check the jumpers on your disks. Is there a better way to configure them - the guides will tell you that it's not a good idea to install two different types of device (like a cd-drive and a hd drive) on the same cable.
 
Old 09-13-2006, 02:26 PM   #7
pulper
LQ Newbie
 
Registered: Jul 2006
Posts: 18

Original Poster
Rep: Reputation: 0
thanks for your help bernied. I did end up using the grub super disk, and after playing around with it, got it to work. i found the "special booting" to be helpful, especially when you can alter the hd where the mbr looks for the grub file.

paul
 
  


Reply



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
Dual boot w/FC4/WinXP - hal.dll is corrupt or missing cliffhanger9 General 6 05-24-2006 12:10 PM
Windows xp boot failure after installing mandrale 9.1: hal.dll missing ilbecha Mandriva 3 01-06-2006 10:59 AM
hal.dll missing linuxbeta Amigo 4 09-19-2004 04:24 AM
GRUB and WinME/hal.dll issue with linux reinstall m_n_anderson Linux - Newbie 4 09-02-2004 08:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:44 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
Open Source Consulting | Domain Registration