LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Dual Boot Win XP/Fedora 6 (https://www.linuxquestions.org/questions/fedora-35/dual-boot-win-xp-fedora-6-a-554008/)

Techno T 05-15-2007 05:28 AM

Dual Boot Win XP/Fedora 6
 
I have just finished installing “Fedora 6” on a second hard-drive (Slave) in combination with “Windows XP” on my primary hard-drive (Master). The installation program has put grub on my first drive. The problem is that the computer automatically boots into XP and it does not give me the option to boot into Linux.

I am a newbie to Linux and any help would be appreciated. P.S. my XP drive is formatted as NTFS which might be part of the problem?

Samotnik 05-15-2007 05:39 AM

In /boot/grub/menu.lst alter option <default_boot> to number of your favorit system.

Glennzo 05-15-2007 05:42 AM

Is there a boot menu or does it just boot to XP with no other option and no chance for user interaction? If you get no boot menu you will likely need to re-install GRUB using the Fedora install CD1 or DVD.

pixellany 05-15-2007 07:50 AM

This may help: http://pixellany.com/boot.html

(My attempt at a GRUB and booting mini-tutorial)

Techno T 05-15-2007 07:56 AM

Quote:

Originally Posted by Glennzo
Is there a boot menu or does it just boot to XP with no other option and no chance for user interaction? If you get no boot menu you will likely need to re-install GRUB using the Fedora install CD1 or DVD.

Hmm, tried to do that but it tells me that it can’t find the kernel and refuses to replace Grub!!

Glennzo 05-15-2007 12:27 PM

I don't want to insult you but you did everything exactly as you were supposed to with the rescue method? Did rescue give any errors like it can't find the partition? Did you chroot /mnt/sysimage? What happens when you type grub-install /dev/hda?

Techno T 05-16-2007 03:13 AM

Quote:

Originally Posted by Glennzo
I don't want to insult you but you did everything exactly as you were supposed to with the rescue method? Did rescue give any errors like it can't find the partition? Did you chroot /mnt/sysimage? What happens when you type grub-install /dev/hda?

When I type (grub-install /dev/hda) it gives the message (/dev/hdb2 does not have any corresponding bios drive). I tried the same command again and this time it told me (sbin/grub: Not found)

Glennzo 05-16-2007 08:04 AM

When you boot the rescue mode and are at the command prompt type fdisk /dev/hda or fdisk /dev/sda. Post the output of that command here. If you look at the output it might help you discover your boot partition.

Techno T 05-17-2007 02:06 AM

Disk /dev/hda: 60.0 GB, 60022480896 Bytes 255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Id System
/dev/hda1 * 1 7288 7 HPFS/NTFS


Disk /dev/hdb: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Id System
/dev/hdb1 7224 14462 17 Hidden HPFS/NTFS
/dev/hdb2 * 1 13 83 Linux
/dev/hdb3 14 7223 8e Linux LVM

I just ran (grub) and tried to manually install it (root (hd0,0)) and it gives the following output (Filesystem type unknown, partition type 0x7). Looks like I will have to create a FAT32 part to put grub on the disk?:scratch:

Glennzo 05-17-2007 09:01 AM

The correct syntax would be grub-install /dev/hda. I've seen many posts regarding grub and LVM. I've never used LVM so I'm not a lot of help. I don't even know if you need to point to /dev/hdb2 or /dev/hdb3 to get the system to boot. Oh, and no, I don't think you need to create a FAT32 partition. Everyone that uses NTFS boots just fine that way.

stoat 05-17-2007 04:31 PM

Hi Techno T & Glennzo,
Quote:

Originally Posted by Techno T
I just ran (grub) and tried to manually install it (root (hd0,0)) and it gives the following output (Filesystem type unknown, partition type 0x7). Looks like I will have to create a FAT32 part to put grub on the disk?

That did not work because your Fedora /boot directory is (hd1,1) not (hd0,0). Creating a FAT32 partition can be useful but is not necessary for that reason.
Quote:

Originally Posted by Techno T
When I type (grub-install /dev/hda) it gives the message (/dev/hdb2 does not have any corresponding bios drive).

When the grub-install command is run in that way, it will read the device.map file. It returned that error because /dev/hdb is not mapped to a BIOS drive in the device.map file (a common thing). If you add the --recheck option to the grub-install command, it will ignore the device.map file, probe devices instead and write a new device.map file. For a simple hardware setup like yours with just two IDE drives, I am fairly certain that grub-install with the --recheck option will get things right. Try the command like this...
Code:

/sbin/grub-install --recheck /dev/hda
WARNING: This command will install GRUB in the master boot record of /dev/hda. That is a popular and normal thing to do, but you have not yet clearly indicated that you understand that is what you have been trying to do. Installing GRUB there will remove the normal boot code that has been booting XP. This can be reversed later with various utilities. If this grub-install command runs successfully, you will see the GRUB menu at bootup from now on. You will choose XP or Fedora from the menu. If you do not choose, the default system will boot after a certain time. You can set the default system and the time delay by editing /boot/grub/grub.conf. There is a slight possibility that you will need to additionally tweak grub.conf to get XP to boot. Finally, if you have not done so, you should stop all of this and backup your important data and files on the XP drive.

harley51 05-17-2007 07:14 PM

If you have a Floppy Drive
 
Fedora Core 6 Install

This by all means may not work for everybody.

I run an Intel D865perl motherboard with 2.6 gig Intel processor with 1 gig of ram. Two 250 gig
hard drives. The first hard drive is for Windows XP. Second hard drive is for Fedora and data
backups.

Drive 2 the first 40 gig is Fedora and the second 210 gig is for files backups and Norton ghost 2006
images. Which I never doing anything without a current image file it will save your butt.

Install Fedora Core 6 on the second hard drive and use the automatic partitioning tool but don't
put grub on your Master MBR put it on the first sector on your second drive. When you get to the
Boot Loader Configuration screen make sure you check the Configure advanced boot loader
options. The next screen will give the option where to put Grub Boot Loader. It should say like
hda or hdb. Hda is usually your XP Drive. From their finish loading. Put it on hdb.

Now duel booting using XP boot manager (My Preference. I don't like third party boot managers.)

Use your rescue CD to boot to Fedora.
Hit enter at the boot prompt.
Hit enter for English
Hit enter for us
Setup network select no
At the rescue screen select continue
At the next rescue screen hit enter
Now you have a prompt sh-3.00#
At the prompt type in chroot /mnt/sysimage
If hdb2 is Not your boot partition, change it as appropriate. Type: df then determine which hda#
Run the command dd if=/dev/hdb2 of=boot.lnx bs=512 count=1
You should see
1+0 records in
1+0 records out
Type ls and you should see a file named boot.lnx
Put a blank floppy disk in your a: drive
Type mcopy boot.lnx a:
It should have copied the file to your a: drive

Now reboot to Windows

Copy boot.lnx to your root directory
Right click on your boot.ini file select properties and uncheck read only click ok
Double click your boot.ini file and add one line at the end it should read
C:\boot.lnx="Fedora Core 6". Then save it. When you reboot your XP boot
manager will come up and you can chose Fedora it jumps to the Grub Boot manager on your
second drive.

My file looks like this

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(0)(1)\windows
[operating systems]
multi(0)disk(0)rdisk(0)partition(0)(1)\windows="Microsoft Windows XP Pro SP2"
/fastdetect /NoExecute=OptIn
c:\boot.lnx="Fedora Core 6 Project"

You call it anything you want

harley51 05-17-2007 07:17 PM

If you only have a CD Burner
 
Fedora Core 6 Install

This by all means may not work for everybody.

I run an Intel D865perl motherboard with 2.6 gig Intel processor with 1 gig of ram. Two IDE 250 gig
hard drives. The first hard drive is for Windows XP. Second hard drive is for Fedora and data
backups.

Drive 2 the first 40 gig is Fedora and the second 210 gig is for files backups and Norton ghost 2007
images. Which I never doing anything without a current image file it will save your butt.

Install Fedora Core 6 on the second hard drive and use the automatic partitioning tool but don't
put grub on your Master MBR put it on the first sector on your second drive. When you get to the
Boot Loader Configuration screen make sure you check the Configure advanced boot loader
options. The next screen will give the option where to put Grub Boot Loader. It should say like
hda or hdb. Hda is usually your XP Drive. Put it on hdb. From their finish loading.

Now duel booting using XP boot manager (My Preference. I don't like third party boot managers.)

Use your rescue CD to boot for Fedora or your DVD or #1 install CD.
At the boot prompt press F2 or type linux rescue.
Hit enter for English
Hit enter for us
Setup network select no
At the rescue screen select continue
At the next rescue screen hit enter
Now you have a prompt sh-3.00#
At the prompt type in chroot /mnt/sysimage
If hdb2 is Not your boot partition, change it as appropriate. Type: df then determine which hda#
(Note: Mine reads /dev/hdb2)
Run the command dd if=/dev/hdb2 of=boot.lnx bs=512 count=1
You should see
1+0 records in
1+0 records out
Type ls and you should see a file named boot.lnx
At the prompt type mkdir /download
At the prompt type cp boot.lnx /download (Note: do a cd /download and then ls to see if it copied it
there if it did move on to next step)
Type mkisofs -o data.iso -r /download (Note: type ls you should see a file called data.iso)
At the prompt type dmesg your going to have to find your cd Burner in here. ( Note:It's a lot of info)
( Mine reads hdc: memorex 16x-DDL-IN, ATAPI CD/DVD-ROM drive)
(Mine reads hdd: Memorex DVD16+/-DL4RW1D2,ATAPI CD-/DVD-ROM drive)
From here insert a CD-R or A CD-RW into the CD burner
Type cdrecord -v dev=/dev/hdd data.iso
It should have copied the file to your CD burner (Note: If you have another Windows Computer you
Can check to see if the file is there. It should have the boot.lnx on it.)

Now reboot to Windows

Copy boot.lnx to your root directory
Right click on your boot.ini file select properties and uncheck read only click ok
Double click your boot.ini file and add one line at the end it should read
C:\boot.lnx="Fedora Core 6". Then save it. When you reboot your XP boot
manager will come up and you can chose Fedora it jumps to the Grub Boot manager on your
second drive.

My file looks like this

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(0)(1)\windows
[operating systems]
multi(0)disk(0)rdisk(0)partition(0)(1)\windows="Microsoft Windows XP Pro SP2"
/fastdetect /NoExecute=OptIn
c:\boot.lnx="Fedora Core 6 Project"

You call it anything you want

Techno T 05-18-2007 03:52 AM

It's coming closer to a solution!!
 
Thanks for all the feedback,

In the meantime I have managed to get fedora up and running and have made it my (C:/hda) drive. So now my drive with XP is the (E:/hdb) drive in Grub lingo this means (hd 0,2 and hd 1,0) or something along those lines. It just makes more sense. Now all I have to do is getting my XP to boot from the grub boot loader. And with all your suggestions and a bit of reading I should be able to work it out. Once again Thanks for your suggestions, will let you know once I get it up and running.

hardfluidity 05-18-2007 05:26 AM

id didn't know that u could put grub on one drive or MBR and have it point to anouther drive.
has anyone done this yet? and dose it work?

stoat 05-18-2007 01:08 PM

Quote:

Originally Posted by hardfluidity
id didn't know that u could put grub on one drive or MBR and have it point to anouther drive. has anyone done this yet? and dose it work?

Sure. Even the XP boot loader will do that. The GRUB configuration file, grub.conf, can usually be configured to launch any operating system on any drive that is recognized by the system BIOS.

Junior Hacker 05-19-2007 01:48 AM

I'ts a major pain adding Linux to XP boot loader compared to setting up Grub properly. During installation, if you selected to install grub in /dev/hda, everything should have worked without issues. Here are the instructions I pass around to fix FC6 grub boot loader:

Boot from Fedora Core Linux 1st CD or DVD and type the following commands at shell prompt:
Code:

boot: linux rescue
Just follow on screen instructions, when prompted let installer search Linux installation. If the search operation is successful, your Linux installation will be available at special directory called /mnt/sysimage.
Prepare system for GRUB reinstallation
Code:

# chroot /mnt/sysimage
# cd /boot/grub

Install grub to the drive set to boot in the bios (normally the primary drive), if it is the first drive which is a SATA (SCSI) drive, use this command (replace 'sda' with 'hda' for ATA IDE drive):
Code:

# grub-install /dev/sda
If above command returned any error, return with –recheck option to probe a device map even if it already exists:
Code:

# grub-install --recheck /dev/sda
Exit from chrooted enviroment and reboot Linux:
Code:

# sync;sync;exit;exit
# reboot


Junior Hacker 05-19-2007 02:06 AM

Quote:

Originally Posted by harley51
Now duel booting using XP boot manager (My Preference. I don't like third party boot managers.)

There's no need and never was a need to have a duel between Grub and XP boot loaders, you only need to install one or the other to boot as many OS's as you want. The only real contributing factor in deciding which one, should be, "ease in configuration/installation".
I prefer bootitng which blows both of those away because it eliminates chain-loading vulnerabilities etc., but preference does not answer the poster's question does it?. Any boot loader can do the job flawlessly when installed properly, does not matter if it's first, third, or fifth party, technology is available to everyone to use and enjoy. Telling people not to use what they want to use based on preference is poor advice.
Is there a plausible reason why you recommend not using grub?

Telling yourself not to use third party software is like telling your employer not to give you a raise in pay, (I'd rather stay behind and fall into poverty).

Techno T 05-19-2007 03:11 AM

Minor hiccup!!
 
Thanks harley51,

I followed your instructions and almost everything works, the only hiccup is now that if I select “Fedora Core 6” to be booted, all I get is a blinking cursor and it refuses to boot. “XP” works fine, if I boot fedora directly it works fine also.:scratch:

stoat 05-19-2007 09:08 AM

Hello again Techno T & everyone else,

Quote:

Originally Posted by Techno T
In the meantime I have managed to get fedora up and running and have made it my (C:/hda) drive. So now my drive with XP is the (E:/hdb) drive in Grub lingo this means (hd 0,2 and hd 1,0) or something along those lines. It just makes more sense. Now all I have to do is getting my XP to boot from the grub boot loader.

That sounded like you had Fedora booting with the GRUB bootloader and only had to tweak grub.conf to get it to boot XP. I predicted that possibility in a previous post in this thread. It is usually simple to fix that.

Quote:

Originally Posted by Techno T
Thanks harley51,

I followed your instructions and almost everything works, the only hiccup is now that if I select “Fedora Core 6” to be booted, all I get is a blinking cursor and it refuses to boot. “XP” works fine, if I boot fedora directly it works fine also.

harley51's excellent instructions were on setting up the XP boot loader to boot both systems. You seem to have reversed yourself here. And that's okay. You must do this the way you want. But here is something for you to consider. I intend no disrespect for harley51 and his nice instructions, but I have always experienced inconsistent results using the dd command to create the copy of stage1 for this procedure. So have others. I don't know why. So, if you never get the binary file created with the dd command to work, try using the utility BOOTPART to do the same thing and more. This free utility works in Windows XP and will copy GRUB stage1 to a binary file in the XP root directory and edit the XP boot.ini all in one step. And it has never failed to work when I had trouble doing this using dd. I learned how to use it from Mauriat Miranda's tutorial. Mauriat's tutorial is light on details but very adequate since the subject is so simple. If you should need more details, just ask. Or, read the information in the "So have others" link above. The details are published there.

Anyway, good luck to you with what ever boot loader you decide to use. Either one will be okay.

Techno T 05-19-2007 07:08 PM

Close but no bananas!
 
Thanks Stoat,

Useful info, looks like I have some tinkering to do. I checked my install. log in Fedora and somehow I still managed to install grub into the MBR of my second hd. I tried to create a grub floppy according to the instructions mentioned in the grub manual but got an error message instead. Anyway it is hardware “Dual-boot” at the moment, have to fix it so that it will work like it is supposed to!!

harley51 05-19-2007 10:19 PM

Techno T
 
If you get a blinking cursor that means the dd command did not work correctly which has happened before just run it again. Providing you followed the instructions accordingly. And Junior Hacker this was my preference on what I like to do. You can chose your own way we're all here to help each other and we all have different ways which can be very interesting. Please keep your comments to your self. The method that I put out was written back in the Red Hat 1 days by someone else and I have refined it over the years to fit the current Distros.


All times are GMT -5. The time now is 02:48 PM.