LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dualbooting XP & FC2 with Grup (https://www.linuxquestions.org/questions/linux-newbie-8/dualbooting-xp-and-fc2-with-grup-222368/)

markuzm 08-25-2004 04:13 PM

Dualbooting XP & FC2 with Grup
 
Hello.

I just installed Fedora Core 2 on a system which had WinXP installed.

Here's some specs:

I have two Seagate harddrives which were partitioned before the install like this:

80Gb Seagate (Primary Master)
------------------------------------------
-One primary partition, 3 logical drives

C:
Primary partition, NTFS, WinXP installed in here

D:
Logical Drive #1, NTFS

E:
Logical Drive #2, NTFS

F:
Used to be logical Drive #3. I deleted the partition with WinXP admin tools to make it free space and then installed FC2 like this:

\boot ~80Mb, ext2
swap ~1Gb
\(root), ext3 (~20Gb)


160Gb Seagate (Primary Slave)
-----------------------------------------
-One primary partition, 1 logical drive, both NTFS
-Doesn't really effect the installation


I installed Grup with the non-default option (not MBR) and chose winXP as default OS. If i remember correctly, the \boot partition was hda7 and windows were in hda1.

Everything is still ok but I don't know how to boot to Fedora. When i reboot the computer, I don't get to choose the OS with Grup. It just boots into WinXP, which btw works the same way as it did before.


So my questions are:

How do I get to see the Grup's OS select screen?

Do I have to edit the MBR somehow or just install it all again and choose MBR this time?

I have the CD's. Is there something that I can do with the rescue option when I reboot while CD#1 is inside?


And yes, I'm very new in installing Linux :). Thanks in advance!

linmix 08-25-2004 04:35 PM

So you installed GRUB to the /boot partition. I suggest you do the following:

Use a rescue cd to boot into FC2 (I believe cd2 is a rescue cd).

At the command prompt type:

dd if=/dev/hda7 of=/home/username/linux.bin bs=512 count=1

This will create a .bin file with which you can start linux using the XP bootloader. Change /dev/hda7 to your /boot partition and save the linux.bin file wherever you prefer (/home/username is a good suggestion).

Now transfer the linux.bin file to your windows C:\ directory and edit the boot.ini file (this file is a hidden, read-only system file so you'll have to make it visible and allow writing).

At the end of the boot.ini file include the following line:

c:\linux.bin="(Name you would like to see in the boot menu)"

Save boot.ini and protect it again the same way it was before (you may want to make linux.bin rea-only as well, just in case).

The next time you boot XP you'll get to choose between XP and linux, and when you choose linux you'll be taken to the GRUB boot screen.

markuzm 08-25-2004 05:35 PM

Isn't there any easier way? Maybe editing grup.conf via rescue console in /boot could help?

dsegel 08-25-2004 05:49 PM

What linmix is suggesting certaily will work, but it doesn't really help you learn about the linux way of doing things, and is backwards from what most linux distros do.

The problem is that when you installed grub you told it not to install into the MBR, and so the Windows boot loader is still operating.

Fortunately, this is easy to fix - you can install grub into the MBR at any time (assuming you can boot to a command prompt) and set up grub to allow you to boot into FC2 or Windows.

1. Boot into a linux command prompt using your FC install disk 1 - at the boot: prompt type 'linux rescue' and press return. It should try to find your existing FC2 install and mount it under /mnt/sysimage (or something like that - it'll tell you where it's putting it.)

2. Find the grub binary and run it like this:

Code:

/mnt/sysimage/sbin/grub
Change the path as appropriate.

You'll now be at a grub prompt. Enter the following commands:
Code:

grub> find /boot/grub/stage1
This will show you the partition that has the grub boot files on it, such as (hd0,6).

Code:

grub> root(hd0,6)
This tells grub where your /boot partition is. Change the '6' to whatever the partition # is from the above command.
Code:

grub> setup (hd0)
This tells grub to install itself into the MBR.

Now quit our of grub and reboot:
Code:

grub> quit
bash-2.0b5# reboot

When your system starts booting now it should load the grub bootloader instead of the Windows bootloader, and assuming you had grub set up properly it should give you an option to boot into either OS. If you don't have an option to boot into Windows add something like this to your /boot/grub/menu.lst (or grub.conf) file:

Code:

###Windows XP###
title Windows XP
    rootnoverify (hd0,0)
    chainloader +1

Note that you can also reinstall the Windows bootloader by booting from the WinXP install disk, going into rescue more, and entering the 'fixmbr' command.

Note 2: If grub can't find the /boot partition stuff it's probably because it's not mounted. I'm not certain if the rescue mode mounts the /boot partition normally. If it doesn't work, say so and I'll give you some more things to try.


All times are GMT -5. The time now is 10:37 PM.