PDA

View Full Version : grub reinstall?



Goldy3311
2nd May 2006, 09:21 PM
So I've installed FC5 on my desktop, installation went smoothly, after some minor fiddling around. So I installed on a second sata drive, a 150GB WD Raptor left completely for Fedora. I've got XP Pro on the first drive. After installation, grub wouldn't even come up, it just booted straight into Windows. So I just installed grub on the first sata drive so fedora would boot. Well, that worked just fine but here's the issue: now when booting, grub shows up, offers to boot windows so I hit enter. It thinks for a second then just comes right back to the OS list. Here's grub.conf:


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=15
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.16-1.2096_FC5smp **NEW**)
root (hd1,0)
kernel /vmlinuz-2.6.16-1.2096_FC5smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.16-1.2096_FC5smp.img
title Fedora Core (2.6.15-1.2054_FC5smp **OLD**)
root (hd1,0)
kernel /vmlinuz-2.6.15-1.2054_FC5smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.15-1.2054_FC5smp.img
title Windows XP Pro
rootnoverify (hd0,0)
chainloader +1

Everything looks to be ok here, unless I'm missing something. Anybody got any ideas?

Goldy

Seve
2nd May 2006, 10:35 PM
Can you boot to FC from your current grub?
Seve

Goldy3311
3rd May 2006, 01:16 AM
Seve--

Yeah I can boot FC just fine. But when booting, if I choose to boot into Windows, it sits there for a few seconds then comes right back to the OS list.

Goldy

bob
3rd May 2006, 03:02 AM
Looks like a classic case of: The FedoraJim (now just jim) Tutorial! http://www.fedorajim.homelinux.com/

Goldy3311
5th May 2006, 06:28 AM
checked it out but a couple questions: he's talkin about master and slave drives, i've got sata drives. that going to make any difference? #2 - I've already installed and I've got everything configured the way I want it, think there's any way I can get it to recognize Windows without having to install again? Maybe editing grub.conf by removing the secondary OS section or something?

Goldy3311
5th May 2006, 08:31 AM
After installing FC5 on my desktop on my second sata drive (sdb), I couldn't boot FC. So I installed grub on the first sata drive where Windows resides (sda). Now I can't boot Windows. I have another thread going here (http://forum.fedoraforum.org/forum/showthread.php?t=107727) addressing kind of the same problem but I've got some different questions now. It seems that there's no way to fix the 'not able to boot windows problem' with anything short of formatting again (please correct me if there is a way) so I've got an idea that logically seems like it would work, but I wanted to check before I screw anything up more than it already is.

So here's the question: Can I reinstall grub to the drive where fedora resides, unplug that drive from the mobo but leave the XP drive plugged in, and reboot with the XP disc and do a fixmbr to get windows booting again? After that I figured I could follow jim's guide (http://www.fedorajim.homelinux.com/?q=node/2) to get the NTLDR and GRUB to play nice. Does this sound feasable or is there a much easier way to get both fedora and windows running happily without formatting either drive?

bob
5th May 2006, 11:54 AM
No, it won't make a difference. The master and slave settings are important to IDE systems but not to SATA of course. The 'mapping' will tell the computer how to locate Windows. Try adding that before making any other changes and you may be set right now:

title Windows XP Pro
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader +1

bob
5th May 2006, 12:11 PM
I've merged the threads since they're essentially on the same subject. No sense getting questions and responses in two different areas - tougher to keep track of and confusing to everyone. Well, at least confusing to me, but at age 60 most things are.....

Goldy3311
5th May 2006, 06:53 PM
well at least I'm making progress! Not very good progress, but progress nonetheless I suppose. So I made the additions to grub.conf and after a reboot, I choose windows. Screen goes black then comes up with
Booting 'Windows XP Pro'

map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader +1

GRUB (with a blinking cursor) Where do I go from here?

Seve
5th May 2006, 08:07 PM
well at least I'm making progress! Not very good progress, but progress nonetheless I suppose. So I made the additions to grub.conf and after a reboot, I choose windows. Screen goes black then comes up with
Booting 'Windows XP Pro'

map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader +1

GRUB (with a blinking cursor) Where do I go from here?
Hello:
You might want to enter you BIOS and change the default Hard Drive for booting? Ya never know it might be the ticket. If it does not work then change back to what it was before. At least that variable will have been taken care of.
Next:
Can you post the output of fdisk -l ?

You have only 2 hard drives right?
The Windows bootloader may be corrupted...just a guess at this point. You can test it by changing the boot order in your BIOS and see if windows boots (without seeing grub at all). If you cannot boot to Windows then likely you mbr on the Windows HD is fubarred? You can boot from a Windows install disk and choose the recover mode and select the installation and at the C: prompt type fixmbr enter and say yes. Then reboot and Windows should be bootable again.

Then you can re-install grub based upon the output of fdisk -l and you should be good to go.
Seve

Goldy3311
5th May 2006, 08:43 PM
I gave changing the BIOS boot order a shot; no dice. I just get an "Error loading operating system" message. I also tried unplugging both drive (not at the same time of course) and that didn't work either.

here is fdisk -l:
[root@localhost ~]# fdisk -l

Disk /dev/sda: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 18240 146512768+ 7 HPFS/NTFS

Disk /dev/sdb: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 18241 146416410 8e Linux LVM
[root@localhost ~]#


You have only 2 hard drives right? Yes, only the two SATAs. I agree with you; I think the NTLDR is corrupted because I tested by changing the boot order and got that error message.

If you cannot boot to Windows then likely you mbr on the Windows HD is fubarred? LOL, fubarred...I like that :)

If I boot from from the Windows CD and repair the MBR, I'll be able to boot Windows again. But fedora won't boot so I'll then have to go into linux rescue and install grub again, right? If I do that though, I have a feeling I'll be right back where I started.

Thanks

Seve
5th May 2006, 08:54 PM
LOL, fubarred...I like that :)

If I boot from from the Windows CD and repair the MBR, I'll be able to boot Windows again. But fedora won't boot so I'll then have to go into linux rescue and install grub again, right? If I do that though, I have a feeling I'll be right back where I started.

Thanks
Well not for sure .. at least not yet. Keep the faith baby. :)
Number One it will allow you to boot to Windows Correctly.which is good.
From there we know that the Windows mbr / bootloader is okay. then all you should have to do is as you indicated, which is boot from the FC5 install disc and get to chroot /mnt/sysimage and do a grub install --recheck /dev/sda and have a look at the output of that command where it references /dev/sda = (hd0,0) etc. just in case.
Provided there is nothing funky in your BIOS, at this point can't think of a reason as to why it will not work. :cool:
Post back your results.
Seve

Goldy3311
5th May 2006, 08:57 PM
Wouldn't I need to do grub install --recheck /dev/sdb instead of sda?

Seve
5th May 2006, 09:12 PM
Wouldn't I need to do grub install --recheck /dev/sdb instead of sda?
No not really, if you want to install grub on your FC5 disk .. you would be correct. however, you would then have to change the boot order in your BIOS from drive A for Windows to drive B for FC5. Depending upon which OS you wanted to boot from.
Assuming you do not want to do that, then you need to do [B]grub install --recheck /dev/sda which is where you will boot [BIOS] from and grub will pick up and configure the windows install etc.
Give it a shot ............... it's borked now you have nothing to lose... :) If it does not work (chances are slim) then post back, I will help.
Seve

Goldy3311
5th May 2006, 09:14 PM
fair enough. I'll post in a bit..

Goldy3311
5th May 2006, 09:33 PM
ok well that didn't work. I booted with the XP disc and did a fixmbr and after a reboot it just went right back to grub, still not being able to boot windows. So I changed the boot order in BIOS and the same thing happened. Any thoughts?

Seve
5th May 2006, 09:44 PM
Hello:
Wow...I would suggest disconnecting the drive that you have FC5 installed on and try fixing the Windows mbr again. Then confirm that Windows boots properly (albeit without the other drive for now). If for some reason it does not then try resetting the BIOS to setup defaults and give it another go. You want to get the Windows boot issue solved first, before you go any further.
What are the options that you have availabe in your BIOS with respect to the Controller that you have your SATA drives attached to? Do they make sense ? are both drives attached to the same SATA controler etc. Have you updated to the latest BIOS?
Seve

Goldy3311
5th May 2006, 10:02 PM
ok so I disconnected the FC5 drive, did a fixmbr, didn't work. Reset the BIOS to defaults (other than booting from CD) and did a fixmbr and a fixboot and it gave me a "NTLDR is missing. Press any key to restart" message. Looks to me like formatting is the only way to go. Any other suggestions before I reload everything?

Goldy3311
5th May 2006, 10:05 PM
ok so I disconnected the FC5 drive, did a fixmbr, didn't work. Then tried resetting BIOS to defaults (other than booting from CD), did a fixmbr and a fixboot. then it give me this "NTLDR is missing. Press any key to restart" message. Looks like formatting is the way to go now. Any other suggestions before I pull the plug?

Seve
5th May 2006, 10:32 PM
ok so I disconnected the FC5 drive, did a fixmbr, didn't work. Then tried resetting BIOS to defaults (other than booting from CD), did a fixmbr and a fixboot. then it give me this "NTLDR is missing. Press any key to restart" message. Looks like formatting is the way to go now. Any other suggestions before I pull the plug?
Well it looks like your Windows boot loader is MIA. Not sure why as you did a fixmbr? This is kind of odd...?
I am fresh out of ideas at the moment..unless I missed something? You have only 2 h drives one which had Windows on it and one which had FC5 on it? No others were connected. According to the output of fdisk -l /dev/sda was windows and /dev/sdb was FC5 ? In your BIOS if you selected you /dev/sda drive only to boot from it coughed up an error? even after you repaired the mbr?
I don't know how or what your BIOS options are but it may be worth a shot having a look? I have an ASUS NF4 board as well with NV raid controller that is effectively set to JBOD via the BIOS [which has 3 SATA 11drives attached with XP/FC532/FC564 and a SIL controller with a SATA 11drive attached, as well as having an IDE and Optical Drive attached and I know it can get confusing.
How about booting from the Windows disc and choosing the repair option?
Seve

Goldy3311
5th May 2006, 10:41 PM
I have no idea what the heck is going on here. I've tried everything I can think of, even searching Microsoft's site to fix it. I'm sick of dealing with it so I'm just going to format the drive and reinstall windows. No big loss, its only about two months old anyways = not much on it. Before I install Fedora again though, I'll be sure to follow jim's guide for dual booting with multiple drives: http://www.fedorajim.homelinux.com/?q=node/2. Thanks for all your help; I'll post back with (hopefully good) results.

Goldy

Seve
5th May 2006, 10:56 PM
I have no idea what the heck is going on here. I've tried everything I can think of, even searching Microsoft's site to fix it. I'm sick of dealing with it so I'm just going to format the drive and reinstall windows. No big loss, its only about two months old anyways = not much on it. Before I install Fedora again though, I'll be sure to follow jim's guide for dual booting with multiple drives: http://www.fedorajim.homelinux.com/?q=node/2. Thanks for all your help; I'll post back with (hopefully good) results.

Goldy
Good luck :)
Seve

b_martinez
6th May 2006, 03:59 AM
Just in case he comes back.......
Shouldn't he have done the 'fixboot' command from the Windows XP recovery console, seeing as how he got the 'NTLDR missing' message?
Bill

bob
6th May 2006, 04:20 AM
Bill, he's already tried that without success. Looks like a reinstall is his best option.

Anama Minos
6th May 2006, 09:15 AM
far out martinez you are right down the road from me. (colorado springs here) maybe some day i will show up and exploit your wealth.... yeah, right i know but it makes a good punch line.

Goldy3311
6th May 2006, 07:06 PM
Bob is correct, I already tried a 'fixboot', to no avail. Don't know how this happened but the XP drive somehow got formatted to FAT32 instead of NTFS and the ENTIRE drive was full (how does 150 gig get filled up two months after installing? Got me..). Anyway, a complete format of the Windows drive cured the problem (so far) although I'm having some driver issues. Nothing a BIOS update won't cure though.

Wow, this seems to be becoming a Colorado thread, with Bill from Pueblo and Anama from the Springs and me from Broomfield. Gotta love it :) I'll post back when I get FC up and running again..

Goldy

b_martinez
6th May 2006, 07:14 PM
Bob and Goldy3311 ---->Sorry , all I caught was the 'fixmbr' part. My bad. And my apologies.
Anama Minos -----> Anything is possible, yet my 'wealth' consists of family and not goods.

Bill

Anama Minos
7th May 2006, 06:12 PM
lol sounds like my finances, but my door is always open and anybody is welcome to share in my beans and rice and fried potatoes, just so long as my landlady doesn't freak completely out.

fixboot looks like somebody compiled a bat file saying something like path=c:windows\windows\system32\
fdisk/mbr
it must also have a path pointer to format but if it changes your drive over to a FAT instead of NT maybe it is sloppy coding.

forget not, gentle readers, that FAT would see an NTFS the same way it sees a Linux ext2fs, as an invisible non DOS partition and will report it as 100% usage. Mayhaps the .sys files were overwritten with FAT32, and command.com and io.sys and config.sys are all trying to read a perfectly good (i know, microsux +perfect +good = an extreme contradiction in terms) and otherwise useable NTFS system.

another little side effect that would make it seem like a full disk is that wnblows in all its flavours makes every empty byte on the disk as part of the swap file.

See how easy that was? for the price of electricity to run the internet for 5 minutes you got just as clearly confusing an answer as if you had dialed up microsoft and paid $35.

Anama Minos
7th May 2006, 06:28 PM
i have win M E as the hd1,0 = hdc on the fdisk -l output, also as output from grub-install --recheck.
would it work to make that "hd1,0 = hdc1" instead?

I am going to try reinstalling my base system (fc4) which will overwrite the current grub, alas i have no dvd burner, so i have to do that from some truly freaked up CDs. I do have the DVD.iso saved onto hard disk and can mount it, cd to it and run update from it but that won't automatically rewrite the grub. I might have to break down and resort to the dreaded and much feared command line, and God help me here do everything in "expert" mode.

Anama Minos
8th May 2006, 06:11 PM
well, as of 1:30 this morning i now have, once again, a functioning dual boot machine ... and there was much rejoicing.
Probably has something to do with DOS arrogance, it wants to be the star the only star and nothing but the star attraction. The windows disk, which is a supreme waste of 10 gigs of disk space, is now hd0,0.

Brains.... the other other white meat....

Minesweeper is NOT just a waste of time... it is an extremely frustrating waste of time done in sequential progression.....