LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-13-2006, 08:11 PM   #1
shaolin77
Member
 
Registered: Aug 2004
Distribution: Fedora and Ubuntu
Posts: 42

Rep: Reputation: 15
Exclamation Grub Install Dual Boot


PLEASE HELP!!
Sorry to have to post this but I really need some help. I've looked at previous postings and have not been able to find what I'm looking for. One of my machines crashed over the weekend (Windows) not surprising huh?

Here is my problem:
On this rig I had WindowsXP Pro on one Physical Drive & Linux on another Physical Drive boot dual booting.

Again, each OS is installed on two seperate HDs. I used grub when I intially install linux to be able to choose which OS to boot. Since my Windows XP OS crashed I had to re-install due to some unrecoverable problems. .

After re-installing WindowsXP, Grub does not engage to give me options to boot Linux or Windows, my rig just goes into booting Windows XP. I assuming that the MBR was erased due to the reinstallation. So I need help I dont want to damage my clean install of Windows XP. Just to pre-answer some possible questions I may get from this posting....my bios are set to boot from the primary drive which contains windows, The linux distro I have is Red Hat 9, I've used the RH9 Install CD to get me to rescue linux...and this is where I have the problem. I need step by step help on how to re-install Grub I want to be careful since it took forever to get my WindowsXP configured how I had it before....PLEASE HELP ME!!!


I'm still a newbie by far....and have a lot to learn...but I may be over my head...I've read previous postings but afraid I may mess up the linux os or Windows OS by trying some of these things....

Any Assistance would be greatly appreciated!!



Shaolin

Last edited by shaolin77; 09-13-2006 at 08:13 PM.
 
Old 09-13-2006, 10:59 PM   #2
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
You don't really have to much to be afraid of. Installing/uninstalling GRUB or LILO shouldn't ruin either of your installs on either drive.
http://www.sorgonet.com/linux/grubrestore/
That website should help you alot. Look at it and we'll go from there.
 
Old 09-14-2006, 05:16 AM   #3
shaolin77
Member
 
Registered: Aug 2004
Distribution: Fedora and Ubuntu
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks for the info....I scanned through the link quickly....but I'll try it out when I get back from work.

I'll keep you posted.


Thanks Again!!
 
Old 09-21-2006, 10:42 PM   #4
shaolin77
Member
 
Registered: Aug 2004
Distribution: Fedora and Ubuntu
Posts: 42

Original Poster
Rep: Reputation: 15
Ok Fellas,
I acutally had sometime to look this through and unfortuantely this really doesnt apply to me. Since I have 1 drive installed with Windows XP Pro and the other drive installed with Red Hat 9 Linux. So if any of you linux experts can provide some help that would be great.....I would hate to attempt an clean install of RH9 just to get grub up and be able to choose which OS I want loaded.

By the way it has come to my attention that my Linux Boot disk that I created when I first installed Linux and never had to use until now doesnt work...so having to use the boot disk is not an option unless there is a way I can create one, however I do have the Install CD's for Red Hat.

PLEASE HELP!!!
 
Old 09-22-2006, 01:01 AM   #5
brokenteeth
LQ Newbie
 
Registered: Sep 2006
Location: San Diego
Distribution: Debian Linux. Kernel: 2.6.8-3-686
Posts: 4

Rep: Reputation: 0
I kinda new to all this but sounds like u need to disconnect the windows drive and boot linux to reconfigure your grub so that it does allow you to boot windows. But u need to make sure that the linux drive is the one that boots first, you do this in the BIOS. So once you have the linux drive booting from the beginning, and your grub is set up properly so as to allow you to boot windows. Just reconnect the windows drive. remember if you change any of the physical locations of the drive you will have to adjust accordingly. And i think that the site that Penguin of Wonder sugested above is a good reference.
 
Old 09-22-2006, 04:17 AM   #6
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Rep: Reputation: 15
You can restore grub by booting from a rescue disk and then reinstalling the grub loader.

If you haven't got a rescue disk then there is probably a RedHat Rescue disc ISO. If not there is a Fedora one you can download, or you could use a live CD such as knoppix. Just as long as the distro uses Grub.

From a shell you should then be able to run:

grub-install --root-directory=/dev/hdb1 /dev/hda

(replacing this with the correct device names for your system).
The example above assumes that Windows is on the First disk, and the root partition (containing the /boot directory) is the first partition on the second disk, and that they are both IDE drives. You will need to know what device names are used on your system.
 
Old 09-22-2006, 04:33 AM   #7
sysinit.d
Newbie
 
Registered: Jul 2006
Posts: 5

Rep: Reputation: 0


Well, I guess its quite simple buddy

Since earlier u were getting options for Windows n Linux as well, it means u had got GRUB installed in hd0

All u need to "grub-install hd0" after u boot ur box in rescue mode

It will install the grub in the Primary HDD and on next boot u will get the grub menu ... it shud load itself into Stage 1.5 and then give u menu options for booting Windows or Linux

Hope that fixes the problem...
 
Old 09-22-2006, 11:22 PM   #8
shaolin77
Member
 
Registered: Aug 2004
Distribution: Fedora and Ubuntu
Posts: 42

Original Poster
Rep: Reputation: 15
Whats up Fellas!!,
I want to thank all of you for the help with this problem. I was able to reinstall Grub and now I'm able to either boot Windows XP or Red Hat.

Yes Grub was installed on HD0.

I followed your advise and used the command:

grub-install hd0 and it worked.

Thanks so much!!

while in linux rescue mode....under root I accidentally removed my floopy device by doing the following rm /dev/fd0. Since I removed the device file I'm unable to access my Floppy Drive. Is there a way to get access back to my floppy.

I'm getting the following error message:

Could not mount device

The reported error was:

mount: only root can mount /dev/fd0 on /mnt/floppy


Thanks in advance


Shaolin77
 
Old 09-23-2006, 05:41 PM   #9
shaolin77
Member
 
Registered: Aug 2004
Distribution: Fedora and Ubuntu
Posts: 42

Original Poster
Rep: Reputation: 15
Whats up guys!!
IT WAS TOO GOOD TO BE TRUE!! Per my previous posting about now being able to access my linux drive....now I've discovered another problem. This afternoon I attempted to choose through the grub menu my windows XP drive...and automatically I recieved a message indicating that windows was not shutdown properly. I attempted every option (Safe Mode, Boot Normally and even Last Good Configuration)....no help windows wants to boot but after a few seconds my computer restarts.

This is what I did yesterday:


"Yes Grub was installed on HD0.

I followed your advise and used the command:

grub-install hd0 and it worked."




Again, currently now I have my Grub Menu back so I can boot linux...but something went wrong can't boot Windows XP



Please Help!!!!
 
Old 09-23-2006, 08:45 PM   #10
shaolin77
Member
 
Registered: Aug 2004
Distribution: Fedora and Ubuntu
Posts: 42

Original Poster
Rep: Reputation: 15
Ok I have some info...hopefully this will help.

When I boot XP...I'm getting

autochk program not found - skipping autocheck

Then the screen blinks, and then I get this:

STOP: C000021a {Fatal System Error} The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000). The system has been shut down.

After doing some research...some have encountered similar situations. I attempted to fix the MBR by using the fixmbr command under the Windows repair option when booting from the installation CD. This only caused to overwrite the boot record to have Windows XP boot...again I'm back to square one. Grub is gone and XP will attempt to boot...but the problem with autocheck is still there.

I did some more researching and from what I understood if your trying to dual boot with Linux it hides your NTFS partition with your Windows XP on it. As part of the boot process chkdsk calls for autochk.exe and because your partition is hidden it can't find it and gives you the error message. Below is my grub.config file:

title Red Hat Linux (2.4.20-31.9)
root (hd1,0)
kernal /vmlinuz-2.4.20-31.9 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-31.9.img
title Red Hat Linux (2.4.20-8)
root (hd1,0)
kernal /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1



what I did was run grub and attempted to unhide my partition by doing the following:

unhide (hd0,0)

I reboot my PC and still having the problems with XP.

Last edited by shaolin77; 09-23-2006 at 08:48 PM.
 
Old 09-23-2006, 08:59 PM   #11
shaolin77
Member
 
Registered: Aug 2004
Distribution: Fedora and Ubuntu
Posts: 42

Original Poster
Rep: Reputation: 15
OK!!!
After researching some more this is what I ended up doing:

1. I booted from my linux installation disk entered linux rescue
mode.
2. Using the fdisk command under linux, I typed fdisk /dev/hda
3. typed t for to change the partition type in 7 for option for
HPFS/NTFS (This causes to unhide the NTFS, option 17 makes it
hidden which is how it was intially).


4. Rebooted my PC

BAM!!!!
Windows acutally booted correctly!!


NOW...such a big headache....I still need help with getting grub installed correctly so I can have a grub menu to choose booting up either Linux or Windows XP.

what I did previously was under grub:
grub-install (hd0,0)

Which resulted in a getting my grub menu was able to boot linux but I chose windows it failed!

Any Help......I'm so close!!!

Please Help!!!

Last edited by shaolin77; 09-23-2006 at 09:02 PM.
 
  


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
Suse 10.1 Dual Boot Install GRUB help billz1010 Linux - Newbie 1 06-19-2006 11:51 PM
Messed up an attempt at dual boot install- GRUB on one, LILO on the other 0mn1z10n Linux - General 4 12-04-2005 11:57 AM
9.3/XP dual boot. Grub needs re-install after reboots rkensrud Suse/Novell 1 05-05-2005 07:09 PM
Dual boot machine Grub doesn't install marios_auth Fedora 4 10-26-2004 10:27 PM
GRUB hangs after RH9 install with dual boot config AXR23 Linux - Newbie 3 04-25-2004 09:18 PM


All times are GMT -5. The time now is 01:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration