Fedora Core 4, Windows XP and Grub

Hi, I'm a Linux newbie and having looked through the various threads relating to my problem I still don't have a solution so would appreciate some pointers. First of all my setup is an Asrock 939 Dual Sata2 mobo, with AMD Athlon 64 3200 cpu, 1GB of RAM, 160GB SATA HD, 80GB PATA HD and 3GB PATA HD, Asus DVD/CD R/W a ...

Everything Linux 1798 This topic was started by ,



data/avatar/default/avatar05.webp

11 Posts
Location -
Joined 2005-12-19
Hi, I'm a Linux newbie and having looked through the various threads relating to my problem I still don't have a solution so would appreciate some pointers.
 
First of all my setup is an Asrock 939 Dual Sata2 mobo, with AMD Athlon 64 3200 cpu, 1GB of RAM, 160GB SATA HD, 80GB PATA HD and 3GB PATA HD, Asus DVD/CD R/W and of course a floppy drive.
 
The 160GB HD has Windows XP Pro 64-bit installed and the drive is split into 3 partions, 100GB for windows os and windows programmes, 40GB & 20GB for user files.
 
The 3GB HD is also used for user files with the intention of these being accessible to windows and linux.
 
The 80GB HD has Fedora Core 4 (64-bit version) installed.
 
The windows installation was done first and was working ok.
 
I then installed FC4. During the installation process it said that it was going to load GRUB in the MBR on /dev/sda which is the 160GB SATA drive.
 
The installation process identified that 'sda' was the 160GB SATA drive which it split into sda1 and sda2 (which appeared to be further split into sda5 and sda6 which matched the 40GB/20Gb split), 'hda' was the 80GB HD and 'hdb' was the 3GB HD.
 
During installation the 80GB HD (hda) was split in to:
 
1 /boot ext3 102MB
2 VolGroup00 LVM PV 78058MB
 
The VolGroup00 was then split in to:
 
LogVol00 / ext3 78016MB
LogVol01 swap 1984MB
LogVol02 /home ext3 17152MB
LogVol03 /tmp ext3 1056MB
LogVol04 /usr ext3 17152MB
 
After installation and on reboot the pc restarted and went straight into windows.
 
Then I looked on the web for pointers on what might be the problem. Restarting the pc with the 1st FC4 disk and selecting linux rescue I tried 'grub-install --recheck /dev/sda' with the following result:
 
(fd0) /dev/fd0
(hd0) /dev/hda 80GB HD
(hd1) /dev/hdb 3GB HD
(hd2) /dev/sda 160GB HD SATA
 
I then rebooted the pc and this time got a blank screen with
GRUB_ in the top left hand corner.
 
I then went back into linux rescue and tried 'grub-install /dev/sda' and 'grub-install /dev/hda' but got the same results.
 
So I can't even get into windows at the moment.
 
I then took a look at the grub.conf file and got the following:
 
# 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 partion. 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=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 .................... (random letters/numbers here)
title Fedora Core (2.6.11-1.1369_FC4)
root (hd1,0)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/VolGroup00/LogVol00 rhgb
quiet
initrd /initrd-2.6.11-1.1369_FC4.img
title Window XP
rootnoverify (hd0,0)
chainloader +1
 
The first thing that I notice is that the hd references in the grub.conf do not match with the hd references from the grub-install --recheck operation e.g in grub.conf it refers to Fedora Core root hd1 and Windows XP hd0 where as Fedora Core is actually on hd0 and Windows XP is actually on hd2 in the --recheck list.
 
Apologies for the long listing but hopefully there is enough info to allow you to point me in the right direction rather than you having to ask more questions first.
 
Thanks for your help.
 
Dave.
 

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic



data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
What is the bios set to boot from first, the sata drive; or hdd0, which would be the primary master drive?
 
Your sata drive is not the MBR, if there are pata drives in the system and the bios is set to boot the pata (primary master) first.
 
You also seem to have a /boot partition, which leads me to believe that somewhere in the install you told Fedora to make a boot drive, which would hold the grub data. Given the complex nature of the drives in your system, did you let Fedora partition your paata drive for the installation, or use the expert partitioning utility to set the partitions on the drive. This may answer a few things.
 
I don't use logical volumes on my system, but try this. If the bios is set to boot from the primary master (pata drive), change it to the sata drive, save the changes, reboot, and see what happens.
 
However, stop trying to reinstall grub. There was an answer to this question in an earlier post, I will try to find it.


data/avatar/default/avatar05.webp

11 Posts
Location -
Joined 2005-12-19
OP
Hi danleff,
 
Thanks for the reply.
 
First of all the bios is set to boot in the following order:
 
Floppy Drive
DVD/CD Drive
SATA Drive
 
Under Hard Drives within the bios the order is:
 
SATA Drive
80GB PATA Drive
3GB PATA Drive
 
This is the first time I have used a SATA drive and did not realise that this would not be the MBR.
 
The 80GB PATA drive (Linux) was partitioned during the install process, although I did setup some of those partitions during the installation based on a Fedora book I had been reading prior to installation, I don't recall setting up the /boot partition.
 
Going through 'linux rescue' I have had a look in the /boot partition and grub.conf is there along with other files.
 
Because I was blinkered by thinking that the MBR was on the SATA drive I never even thought about switching the drive sequence in the bios to boot the linux HD first. I will try this later today and let you know what happens.
 
Presumably I would still need to amend the grub.conf file to show that for example the splashimage is actually on hd0 (the 80GB HD) and not hd1 (the 3GB HD) as is currently shown or is the drive numbering in grub.conf different to that given under grub-install --recheck?
 
Cheers
 
Dave


data/avatar/default/avatar05.webp

11 Posts
Location -
Joined 2005-12-19
OP
Hi again danleff,
 
Ok here's where I'm now at:
 
I have changed the bios so that the boot sequence is now:
 
Floppy drive
DVD/Cd drive
80GB PATA drive (Linux)
 
The hard drive sequence in the bios is now:
 
80GB PATA (shown as hd0 in grub-install --recheck)
160GB SATA (shown as hd2 in grub-install --recheck)
3GB PATA (shown as hd1 in grub-install --recheck)
 
The grub.conf file was change to:
 
# 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 partion. 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=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 .................... (random letters/numbers here)
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,0)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.img
title Window XP
rootnoverify (hd2,0)
chainloader +1
 
This hopefully sorted out the difference I mentioned in my last post.
 
I then rebooted the pc and now I get the menu screen
 
If I select Fedora Core it all boots up ok and I arrive at the user log in screen.
 
If however I select Windows XP I get:
 
Booting 'Windows XP'
 
rootnoverify (hd2,0)
chainloader +1
 
and it just hangs there
 
From reading one of the other posts I amended the grub.conf file to read:
 
title Window XP
rootnoverify (hd2,0)
map (hd2)(hd0)
map (hd0)(hd2)
makeactive
chainloader +1
 
Then when I select Windows XP from the menu I get:
 
Booting 'Windows XP'
 
rootnoverify (hd2,0)
makeactive
chainloader +1
 
and it just hangs there.
 
From reading another post I amended the grub.conf file to read:
 
title Window XP
rootnoverify (hd2,0)
map (hd2)(hd0)
map (hd0)(hd2)
makeactive
chainloader (hd2)+1
 
Then when I select Windows XP from the menu I get:
 
Booting 'Windows XP'
 
rootnoverify (hd2,0)
makeactive
chainloader (hd2)+1
 
Missing operating system
 
and it just hangs there.
 
If I amended the grub.conf file to read:
 
title Window XP
rootnoverify (hd2,0)
map (hd2)(hd0)
map (hd0)(hd2)
makeactive
chainloader (hd0)+1
 
Then when I select Windows XP from the menu I get:
 
Booting 'Windows XP'
 
rootnoverify (hd2,0)
makeactive
chainloader (hd2)+1
 
GRUB _
 
and it just hangs there.
 
So at least I can now get into FC.
 
I just need to get into XP now so any thoughts would be appreciated.
 
As an aside what is the difference between grub.conf and menu.lst? From what I have seen so far they both contain the same info.
 
Thanks for your help so far.
 
Dave


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
Sorry for ther delayed response, I've been on the road. I think I see the problem. Try the following for the Windows grub entry;
 
title Window XP
map (hd2)(hd0)
map (hd0)(hd2)
makeactive
chainloader (hd0)+1
 
Remember, you reversed the mapping, so all references for the Windows drive should be hd0. Do not use a rootnoverify line.
 
You can test this without editing the grub.conf file, via the grub menu on boot, to see if it works first.
 
Depending on your version of grub, when you get the grub splash screen, try hitting the esc key. If this does not get you into the grub edit mode, hit the "e" key.
 
Once you are in edit mode, you can edit the lines of code by highlighting the entry to change, hit the "e" key. Then edit the line and hit the "enter" key to temp. save the change on that line. Do the same for each line that need editing. Once you are finished, then hit the "b" key to see if the changes result in a good boot.
 
If this works, you can make the changes in the grub.conf file for good.


data/avatar/default/avatar05.webp

11 Posts
Location -
Joined 2005-12-19
OP
No worries about the delay in replying, I been finding my way around FC4 and finding a few more problems !! Nothing to worry about for now though.
 
Ok, I have tried the changes that you suggested and now when the pc starts up I get the menu screen, so I select Window XP, the screen goes blank momentarily before returning to the menu screen, which if I'm not quick enough (timeout currently =5) then boots up into FC4.
 
If I select Windows again it just goes back to the menu and so on.
 
So at least I'm not now hanging up at the
 
Booting 'Windows XP'
 
rootnoverify (hd2,0)
chainloader +1
 
screen!!
 
Anyway hope you have a good Xmas and may all you linux problems in 2006 be easy ones
 


data/avatar/default/avatar17.webp

1 Posts
Location -
Joined 2006-01-02
Hello, i too have a question similar to this. i intalled fedora for the first time but after the installation i get the GRUB _ just blinking.and i cant input anything.
i have an Aurora AMD FX-53 160GB HD partitioned into 21GB for Linux and the rest for XP. im new to Linux so im not too sure on what to do. i intalled the 64bit version of fedora.


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
In order to answer any questions, we need to know a little more about your installation.
 
What version of Fedora did you install? There was a problem in earlier versions of Fedora Core 2 and doing an installation on Windows machines with NTFS filesystems.
 
If this is a Fedora Core 4 installation, move on.
 
Is Windows XP on a NTFS filesystem or fat32. If you don't know, then it's likely NTFS.
 
Did you defrag the XP partition before you installed Fedora?
 
Most likely, Grub was installed on a /boot partition duing the installation, if you chose just to let Fedora partition your hard drive for ther installation. If this is the case, then the /boot partition needs to be set active. If you allowed grub to be installed to the MBR (Master Boot Record) then we can move on.
 
I assume that this system has a sata hard drive? Just one drive
or a raid array?
 
If a single drive system (not two drives on a raid array);
 
Boot the Fedora cd disk #1 (installation disk).
 
At the installation menu, type in linux rescue (hit the enter key)
 
If it finds your FC install, that went OK, and you probably don't have grub installed properly.
 
Once the system loads, at the terminal prompt, Type in chroot /mnt/sysimage
 
then type;
 
cd /boot/grub this is where your grub files are.
 
type cat grub.conf and note which hd it is referring to.
 
If this does not work for some reason, type in df and this will show you where the root drive is, usually the first entry (line).
 
Then type;
 
grub-install --recheck/dev/xxx
 
Wher xxx after the /dev/ is the drive that Fedora says that your hard drive is located. Leave out the numerical value.
 
So, if cat grub tells you the drive is sda1, then type in;
 
grub-install --recheck/dev/sda
 
This may take a minute or so and should just return a command prompt with no errors. Once it does, type in reboot and see if grub comes up normally.
 
I will be on the road until Saturday, so others can pipe in if needed until I get back.


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
g0kth, I just switched my system over to sata only. If you are still having the problem, I may be able to resolve it, as I have my drives set up close to yours.
 
Are you still at the sata drive to be your first boot device?
 
Please note that I will not be back online until Saturday am, as i will be on the road.


data/avatar/default/avatar20.webp

1 Posts
Location -
Joined 2006-01-07
Hello,
 
I have installed FC4 on an old PIII dual 900mhz with 3 SCSI drives and I am having similiar problems as described earlier in this thread.
 
FC4 installed ok, I choose the 3rd drive and let the install do the partitioning.
 
When I boot the PC it goes to Windows, the grub menu never appears.
 
I booted linux in rescue mode from the 1st CD and followed danleff's instructions from 2006-01-04 10:54:06.
 
device map as follows...
fd0 /dev/fd0
hd0 /dev/sda (windows install disk/ntfs)
hd1 /dev/sdb (ntfs)
hd2 /dev/sdc (linux installed on this device)
 
df shows....
 
/dev/VolGroup00/logVol00 mounted /
/dev/sdc1 mounted /boot
 
I could not find the grub.conf file in the /boot/grub
grub-install --recheck/dev/xxx created a few files in the dir but not grub.conf
 
Any suggestions would be much appreiciated. Thanks
 
 


data/avatar/default/avatar18.webp

2 Posts
Location -
Joined 2006-01-07
I am having a similar problem that I almost have fixed. The problem you have is that you installed the Grub bootloader on your MBR. This happens to erase your windows bootloader, so when Grub tries to tell windows to upload, it can't. IDK how to fix that problem but i hope this information is of some use.


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
Originally posted by kcpaige:

Quote: I am having a similar problem that I almost have fixed. The problem you have is that you installed the Grub bootloader on your MBR. This happens to erase your windows bootloader, so when Grub tries to tell windows to upload, it can't. IDK how to fix that problem but i hope this information is of some use. 
 
This is only partially correct. Grub replaces the Windows bootloader, but not the boot.ini file, which grub references/ looks for to boot Windows.
 
Most likely the issue is that by allowing Fedora to partition your linux drive, it created a /boot partition, where the grub files are located. If you chose the /boot partition to install grub, not the MBR, then that partition needs to be set active to get grub to boot correctly. This is a common problem if you are not careful what you do - or just accept the defaults to install grub, rather than note where Linux suggested grub to be installed.
 
There is a good deal of debate about this, but the issue usually is where grub was installed, to the MBR or a /boot partition created by your linux distro.
 
The problem is fixable, if you know what you did during the installation. If you know where grub was installed, then you can fix the partition designation for booting either system, Windows or Linux.
 
I always install grub to the MBR with no problems, but you need to pay attention to what you did during the installation.
 
If you run grub-install during rescue mode, you need to assure that you have gone to sysroot before running the command. This places the Linux installation as it is if you booted directly into it, thus referencing everything correctly.
 
If you see no grub.conf or menu.lst file in the root /boot/grub directory, then this is the issue. Or, you never really installed grub (told the installer not to install/use grub at all as a bootloader).


data/avatar/default/avatar05.webp

11 Posts
Location -
Joined 2005-12-19
OP
Hi Danleff
 
First of all a belated happy new year and secondly apologies for the delay in resonding to your question.
 
My setup is still the same with Win XP on the SATA drive and FC4 on the PATA drive.
 
Since my last post the only thing I have tried is following Chapter 4 'Boot Methods' in Linux in a Nutshell. Here under the section on 'Dual-booting Linux and Windows NT/2000/XP' I have copied 'bootsect.lnx' from my Linux PATA drive across to the C drive on the Win XP SATA drive and modified the boot.ini file for Win XP to have a menu item for Linux.
 
Now with the SATA drive as the boot drive I get the menu and on selecting Win XP it boots ok but if I select Linux it just hangs, so in effect it is the reverse of when the PATA drive is the boot drive in which case I can run Linux but not Win XP.
 
So to run the required operating system I currently have to select the appropriate drive in the BIOS. Not ideal but at least I can select one or the other.
 
So if you have a solution I can try fire away and I'll give it a go.
 
 


data/avatar/default/avatar19.webp

5 Posts
Location -
Joined 2006-01-17
Originally posted by danleff:

Quote:g0kth, I just switched my system over to sata only. If you are still having the problem, I may be able to resolve it, as I have my drives set up close to yours. 
Are you still at the sata drive to be your first boot device?
 
Please note that I will not be back online until Saturday am, as i will be on the road.
 
 
i also am sata only...and my machine boots straight into windows...i have tried the above mentioned ideas correctly (i think) and am not getting a grub screen at all...i have
 
sda1 windows
sda2 programs for windows
sdb storage hard drive
sdc fedora install
 
all that is per the installation menu in fedora...
 
when i do a grub-install check i also have a fd0 in there which i have no idea what that is...any help would be appreciated as i'd love to start checking out fedora...and i believe the default install for grub is to the MBR


data/avatar/default/avatar19.webp

5 Posts
Location -
Joined 2006-01-17
i can find grub on the sdc, but i'm yet to figure out how to get it to load...any insight would be awesome


data/avatar/default/avatar19.webp

5 Posts
Location -
Joined 2006-01-17
you around dan


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
fd0 is the floppy drive.
 
Where did you install grub? On the MBR (of sda) or on a boot partition created by Fedora? If on a boot partition, then that partition needs to be set active before grub is found. Otherwise, you are booting from the MBR, where grub is not located.
 
This step is often missed or misplaced during an installation by the user.


data/avatar/default/avatar19.webp

5 Posts
Location -
Joined 2006-01-17
thanks for the reply as i really want to get this working...
 
ok, when installing i chose the MBR (i've done this many many times now) but for some reason it looks like it's installing to the boot partition regardless...i can try to install again and see if it works and if not then how do i set the boot partition active...
 
also, since my last post i changed my 3rd hd to the first boot drive...it found grub and loads windows, but when i try to select fedora (2 fedora options) it says unknow format or unknown device configuration or something like that, i will try again tonight to check on that
 
you said earlier that sata setups are different, is that correct? all 3 of my hd's are sata with the only other devices being my cd drives which are both ide, does this matter?


data/avatar/default/avatar19.webp

5 Posts
Location -
Joined 2006-01-17
thoughts?


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
Originally posted by xZeler8:

Quote:ok, when installing i chose the MBR (i've done this many many times now) but for some reason it looks like it's installing to the boot partition regardless...i can try to install again and see if it works and if not then how do i set the boot partition active...
 
Do you mean that you keep installing grub, or the whole installation of Fedora? Let's stop doing this and look at the problem as it stands now.
 
What do you mean by grub seems to be installing in the boot partition regardless? Do you mean a seperate /boot partition on the Fedora drive, or the /boot directory within Fedora? If the latter, some of grub's files are normally installed here.
 
Did you do a reinstall of Fedora after you switched the drive designations (I assume in the bios?). This might explain a few things. Please do not do this, as then you have the possibility of the grub main bootloader in multiple locations on your hard drives. If you reinstalled Fedora after changing the bootloader, then you have one oin the original MBR on sda and another on the MBR of the sdc drive. The MBR is always the first boot drive designation in the bios. So, if you switch the drive designation to sdc to boot first, then install to the MBR.... unless you designate specifically were grub is to be installed during an installation.
 

Quote:also, since my last post i changed my 3rd hd to the first boot drive...it found grub and loads windows, but when i try to select fedora (2 fedora options) it says unknow format or unknown device configuration or something like that, i will try again tonight to check on that 

Quote:you said earlier that sata setups are different, is that correct? all 3 of my hd's are sata with the only other devices being my cd drives which are both ide, does this matter? 
 
What I mean by this is that Linux sees the drives differently. On ide drives, the designation is usually hda. hdb etc...
 
On sata drives, it is usually sda, sdb...
 
Also, sata does not designation primary master , primary slave etc...rather the order that the cables are connected to the mainboard for each sata drive. So, the first sata connector on the motherboard is sda, the second sdb...
 
The cdrom drives and other ide devices have no effect on this, as they are assigned the same way as any other ide drive, hdc....depending on what connectors they are attached to and jumpered for.


data/avatar/default/avatar40.webp

11 Posts
Location -
Joined 2004-07-26
I too am having this issue.
 
I have three ide hard disks.
 
The first is Windows XP and the second is where I have installed VC. The third is connected to a raid controler.
 
Anyways in order to boot linux I have to change hard drives in the bios. From the first to the second.
 
So I guess that screws it up seeing as during install no hard drives are enabled. Thats how I have to boot off a CD .
 
Well here is the grub.conf file:
 

Code:
# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE:  You do not have a /boot partition.  This means that#          all kernel and initrd paths are relative to /, eg.#          root (hd2,0)#          kernel /boot/vmlinuz-version ro root=/dev/hdf1#          initrd /boot/initrd-version.img#boot=/dev/hdf1default=0timeout=5splashimage=(hd2,0)/boot/grub/splash.xpm.gzhiddenmenutitle Fedora Core (2.6.11-1.1369_FC4)  root (hd2,0)    kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet       initrd /boot/initrd-2.6.11-1.1369_FC4.imgtitle Other    rootnoverify (hd1,0)    chainloader +1
I find it stranges it says there is no boot directory when there is. 
I choose to install the boot loader on hdf partition which is the second hard disk during install.
 
But when I try and boot linux it becauses the first hard disk, is that correct?
 
So how do I got about changing the active partition? That is if I understood this topic at all.
 
Oh and I tried running:
 
grub --install -recheck /dev/hdf
 
and
 
grub --install /dev/hdf
 
But it says its and invalid device which is pretty strange since if I cd /dev/ hdf is right there.
 
So any help would be great.
 
Thanks a lot,
 
Will