LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to boot Linux (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-boot-linux-735733/)

RBB 06-26-2009 01:19 AM

Unable to boot Linux
 
I had linux installed on my hard drive and i installed XP over it.
Now that i can only access my windows partition not linux.
Windows has overwritten the boot file.
However i was able to reach to the linux shell in text mode with the Linux CD's but could not create a boot file for it said some missing package.
So I ran the DD command and placed the output file in the Windows drive and changed the boot.ini file to boot from that file.
Now when i start my PC i get a option to load linux and windows,
windows works but linux give me a system32/hal.dll is missing or corrupt error.
Please suggest a way to dual boot Linux and OS.
Thanks in advance
RBB

Wim Sturkenboom 06-26-2009 01:29 AM

Your post is missing some details.
Which distro? Which bootloader (grub or lilo)? Wubi install?

Although I'm not familiar with the finer details (specially when grub is the bootloader), but you should be able to restore the bootloader in the MBR.

With Lilo it should be in the line of (commands in italics):
boot from Linux (rescue) CD
create a new mountpoint somewhere (e.g. mkdir /newmountpoint)
mount the linux partition (/dev/sdaX or /dev/hdaX) on e.g. /newmountpoint (e.g mount /dev/sdaX /newmountpoint if I'm not mistaken)
chroot /newmountpoint
lilo
reboot

For GRUB, you can search for something like grub restore bootloader or supergrub

Uncle_Theodore 06-26-2009 01:36 AM

Before chrooting you might want to issue the command
mount -t proc proc /newmountpoint/proc
Also, it's a good idea to run chroot as

chroot /newmountpoint /bin/bash

jdkaye 06-26-2009 01:58 AM

My impression is (and I may well be mistaken so check it out) that you can't install windows after having installed linux. Windows does something nasty to the mbr. What I have always heard and read is that you first install windows and then install linux on top of that. You will then be able to boot up in either OS.
cheers,
jdk

RBB 06-26-2009 02:17 AM

Wim,Theodore Thanks a millon for the Reply.

There are a few things iam still confused with..

I havent configured my linux boot yet.Linux was installed first.

Its a RH5 linux..

I get a missing package library error when i choose the MBR at recovery process...

would this process of creating a new mountpoint and loading from the mountpoint, solve the problem.
if we could somehow manage to load linux we can configure the linux system to dual boot.
iam new to all this.anyway let me try that after a word from u guys.
Thanks again

RBB 06-26-2009 02:21 AM

Jdk,
u r correct. Iam really finding it hard now.
Should have checked all this b4 installation.

jdkaye 06-26-2009 02:25 AM

Quote:

Originally Posted by RBB (Post 3586780)
Jdk,
u r correct. Iam really finding it hard now.
Should have checked all this b4 installation.

Live and learn. :)
Cheers,
jdk

vap16oct1984 06-26-2009 02:34 AM

Hi,
Pls rember always install windows first then install linux.
If u install linux first and then secon windows then windows
will over write the linux boot loder and u will not able to boot linux.
TTHis is exactly what happen here.

Now have there are two ways to recover it.
1)reinstall grub boot loder in resque mode.
Steps:- boot the system in resque mode.
#chroot /mnt/sysimage
#grub-install /dev/hda
2)other wise install winows first then linux.

RBB 06-26-2009 05:01 AM

I Will Try that.
Thanks vap.

Angry_Tommy 06-26-2009 08:31 AM

there is completely no difference between installing windows as a first OS or not. the only problem in that case is that windows will put its own boot manager in MBR on hard disk. thats it! no more files or changing data on linux partitions etc. if you install linux after windows and WON'T put windows as a secondary system in lilo or grub you will get exacly the same situation like with windsows' bootloader (except that in windows case it wont ask you for any secondary systems - mainly because mswindows is *the best and only wise choice* haha).

so there IS NO rule to install windows first and linux after that. you can easly fix it by booting from livecd and replace windows bootloader with your own (lilo or grub).

good luck

Wim Sturkenboom 06-26-2009 10:07 AM

I tend to agree with Tommy here. I mean, does everybody who has a dual-boot with Windows need to do a full Linux install again after Windows had to be reinstalled?

;)

jdkaye 06-26-2009 10:27 AM

Quote:

Originally Posted by Wim Sturkenboom (Post 3587181)
I tend to agree with Tommy here. I mean, does everybody who has a dual-boot with Windows need to do a full Linux install again after Windows had to be reinstalled?

;)

I'm not arguing. I believe I expressed considerable reserve in my post.
cheers,
jdk

yancek 06-26-2009 07:10 PM

Quote:

does everybody who has a dual-boot with Windows need to do a full Linux install again after Windows had to be reinstalled?
No. Just the bootloader files. Windows overwrites the master boot record on any install without giving an option as far as I know. All that need to be done is reinstall Grub from your Linux Install CD.

vap16oct1984 06-27-2009 11:45 PM

thats why in general we suggest to install windows first as it's has ability to
overright mbr. But it not a big issue as u can insatall bootlodder in linux as well.

The main point is that we make it dul boot thats it. And there are many ways to a things.
We can use any methods that u want.

paulsm4 06-27-2009 11:58 PM

False:
Quote:

my impression is (and i may well be mistaken so check it out) that you can't install windows after having installed linux.
True:
Quote:

Windows does something nasty to the mbr.
True:
Quote:

Steps to recover dual-boot mbr if windows trashes it:
1) boot the system into "rescue mode" with the linux cd/dvd
2) chroot /mnt/sysimage
3) grub-install /dev/hda (or whatever drive your linux boot partition should be)


All times are GMT -5. The time now is 08:32 PM.