LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2009, 02:19 AM   #1
RBB
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Rep: Reputation: 0
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
 
Old 06-26-2009, 02:29 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
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

Last edited by Wim Sturkenboom; 06-26-2009 at 02:31 AM. Reason: Added grub info
 
Old 06-26-2009, 02:36 AM   #3
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
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
 
Old 06-26-2009, 02:58 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
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
 
Old 06-26-2009, 03:17 AM   #5
RBB
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 06-26-2009, 03:21 AM   #6
RBB
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Jdk,
u r correct. Iam really finding it hard now.
Should have checked all this b4 installation.
 
Old 06-26-2009, 03:25 AM   #7
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by RBB View Post
Jdk,
u r correct. Iam really finding it hard now.
Should have checked all this b4 installation.
Live and learn.
Cheers,
jdk
 
Old 06-26-2009, 03:34 AM   #8
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
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.
 
Old 06-26-2009, 06:01 AM   #9
RBB
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
I Will Try that.
Thanks vap.
 
Old 06-26-2009, 09:31 AM   #10
Angry_Tommy
LQ Newbie
 
Registered: May 2009
Location: Leeds
Distribution: Gentoo, Arch Linux
Posts: 25

Rep: Reputation: 17
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
 
Old 06-26-2009, 11:07 AM   #11
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
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?

 
Old 06-26-2009, 11:27 AM   #12
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by Wim Sturkenboom View Post
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
 
Old 06-26-2009, 08:10 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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.
 
Old 06-28-2009, 12:45 AM   #14
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
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.
 
Old 06-28-2009, 12:58 AM   #15
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Unable to boot Linux Fedora v6 kwits Linux - Laptop and Netbook 2 02-01-2007 09:29 AM
Unable to boot linux on laptop KETrel Linux - General 6 09-01-2006 06:58 PM
Unable to boot linux-2.6.7 protias Linux - General 3 07-31-2004 06:35 AM
unable to boot redhat linux 8.0 tux12881 Linux - General 3 02-11-2004 03:19 PM


All times are GMT -5. The time now is 02:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration