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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-12-2006, 01:08 PM
|
#1
|
LQ Newbie
Registered: Jul 2006
Posts: 18
Rep:
|
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
|
|
|
09-12-2006, 01:32 PM
|
#2
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
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?
|
|
|
09-12-2006, 01:36 PM
|
#3
|
LQ Newbie
Registered: Jul 2006
Posts: 18
Original Poster
Rep:
|
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
|
|
|
09-12-2006, 01:44 PM
|
#4
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
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.
|
|
|
09-12-2006, 03:28 PM
|
#5
|
LQ Newbie
Registered: Jul 2006
Posts: 18
Original Poster
Rep:
|
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
|
|
|
09-12-2006, 04:53 PM
|
#6
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
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.
|
|
|
09-13-2006, 03:26 PM
|
#7
|
LQ Newbie
Registered: Jul 2006
Posts: 18
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 04:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|