LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 09-27-2006, 08:04 PM   #1
tjl30
LQ Newbie
 
Registered: Sep 2006
Posts: 9

Rep: Reputation: 0
Dual booting Fedora and XP help


So I bought a second HD last weekend so that I could dual boot Linux and Windows XP. I set the jumpers on my second hard drive so it is a slave drive. Then I started up my computer with a DVD that had Fedora Core 5 on it. I went through the steps to install Fedora Core 5 (I choose it to use only the free space on my slave drive).

So the install process went very smooth and it asked me to reboot my computer. So i did and windows XP started up. So I think I have Fedora properly installed on my sound HD I just don't know how I can boot it.

Any help would be greatly appreciated, this is my first time every playing around with Linux and I cant wait to see what it looks like.

 
Old 09-27-2006, 08:39 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
You need to either change the XP boot.ini file to give you the option to boot to either Linux or XP, or, alternatively, install the GNU boot loader (GRUB) in the MBR of your "master" drive.

The later option is the easiest. In fact, you should have accepted the installer's offer to install GRUB in the MBR. But you can still do it.

Just boot from your Fedora install DVD (or the rescue CD), and enter linux rescue at the first prompt.

After the system boots in rescue mode, just enter the commands
Code:
# chroot /mnt/sysimage
# grub-install /dev/hda
# reboot
(The "#" stands for the input prompt character, not something you type.)

If you'd prefer not to overwrite the XP MBR, change the /dev/hda to /dev/hdb above, and then use your BIOS to set your system to boot from the "slave" drive instead of the "master."

To boot using the boot.ini method requires that you create a bootable MBR image as a file on your XP "C:\" drive, and have your boot.ini file look something like this:
Code:
$ cat /mnt/WinXP/c/boot.ini
[boot loader]
timeout=5
default=C:\linux.bin
#default=multi(0)disk(0)rdisk(0)partition(0)\WINDOWS

[operating systems]
multi(0)disk(0)rdisk(0)partition(0)\WINDOWS="Windows XP" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Gateway Rescue" /noexecute=optin /fastdetect
C:\linux.bin="Linux"
But you should't have to do that unless you've got special needs.

Last edited by PTrenholme; 09-27-2006 at 08:51 PM.
 
Old 09-27-2006, 09:14 PM   #3
tjl30
LQ Newbie
 
Registered: Sep 2006
Posts: 9

Original Poster
Rep: Reputation: 0
So i tried to install the GNU boot loader in the MBR of my master drive but I can not touch my master drive because the Linux partition is only on my slave drive (I think... does that make sense?).

Anyways I booted up my computer with the install disk in then went to Linux rescue like you said and put in the commands and when I typed grub-install /dev/hda then hit ENTER i got the message /dev/hdb1 does not have any corresponding BIOS drive. After that I typed reboot, got some funny prompt things about rebooting, then some how I was able to shut down my computer.

I am kind of a noob so bear with me,

So i want to try the second way using the boot.ini do you think you could explain a bit more on how to do it this way.
 
Old 09-28-2006, 05:59 PM   #4
tjl30
LQ Newbie
 
Registered: Sep 2006
Posts: 9

Original Poster
Rep: Reputation: 0
My origonal boot.ini file looked like this:
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn
So when I modded my boot.ini file I got a little scared when booting in windows and Linux did not work. But I was able to get to XP threw Gateway Rescue. Thank goodness, anyways all my Linux stuff is partitioned to my F drive.
 
Old 09-28-2006, 08:55 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Did you try the simpler way I suggested, where you make your slave drive bootable with GRUB installed on it, and then changed your BIOS to boot first from the slave drive? (i.e., grub-install /dev/hdb)

You mentioned "Gateway," and the reason I was using the "boot.ini" method was that I had installed Fedora on a Gateway laptop, and Gateway had installed a "mini Windows" on a small FAT partition, and set the boot.ini file to boot that OS first.

If you look at your boot.ini, you'll see that the initial boot is to "partition(1)," not "(0)." That's probably the small FAT partition like I have on my system.

So, if your BIOS insists on booting the "rescue" OS first, here's what I suggest:

Edit: Opps -- That's not quite right. Changes in red below.

1) Install GRUB on the slave drive. (You have to have a working GRUB installed.)
2) Boot into Fedora (either using your BIOS to boot the slave drive, or "linux rescue."
3) Attach a FAT partition, say D:\ thusley:
3a) mkdir /mnt/d
3b) mount /dev/hda2 /mnt/d -t vfat -o rw

4) Use the command dd if=/dev/hdb of=/mnt/d/linux.bin b=512 to copy the GRUB MBR to D:\linux.bin.
(This assumes that the Gateway small FAT partition is your D: drive, and is the second partition of the master drive.)
5) Boot into Windows and copy D:\linux.bin to C:\linux.bin (and, if it all works, you can come back and delete D:\linux.bin later. Oh, the reason for the FAT partition is because both Fedora and Windows can read and write to FAT partitions. Be careful, though: the dd command will happily trash any NTFS partition to which it writes. You could use a floppy or USB drive for this step if you've got one. Just change the of parameter as needed.)
6) Edit your boot.ini file to look like mine, above.

Reboot, and see if it works.

(The reason you need a working GRUB installed is that having Windows boot the copied boot image "simulates" actually booting that drive.)

Last edited by PTrenholme; 09-29-2006 at 03:24 AM.
 
Old 09-28-2006, 09:46 PM   #6
tjl30
LQ Newbie
 
Registered: Sep 2006
Posts: 9

Original Poster
Rep: Reputation: 0
OK I have two drives, my main drive is C:\ my slave drive is F:\, all my linux stuff is on the F:\ drive. There is no linux software on my C:\ drive, so how would I copy GRUB MBR to my F:\ drive? If thats what I should do. Im sry I am realy confused about GRUB and linux commands in general.
 
Old 09-29-2006, 04:04 AM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Oops! I messed up. See the changes in my prior post, above.

To answer your question, we aren't trying to install the MBR in "linux.bin," just trying to make a copy of the MBR, and then telling XP to use that copy instead of the "real thing" to start the system.

The commands I've suggested that you use are:

1) mkdir to create a new directory to use as a mount point
2) mount to attach your D: drive to that mount point (In *nik systems, you don't have seperate drives, you "attach" physical devices to your "file system," and have a single "tree" starting from your "root," called "/") the ls command can be used to "list" the contents of any "leaf" of the tree.)
3) dd to copy "raw" bytes from the MBR to a file on the D:\ drive

In Fedora, you can read a description of each command using the man command (e.g.: man cp) or, for mst commands, the [info command (e.g.: info cp).

The man command is more terse, but often writes more that will fit on a screen, so you have to "pipe" the output into another command (usually less, which lets you "scroll" up and down in the output with your arrow keys) for example, man dd | less. You get out of "less" by typing the character "q".

info is more powerful, and entering the command info will display a screen telling you to type "h" for a tutorial on how to use it. It's a good place to start learning the Linux commands.

Anyhow, it's 3 AM here now, and I'm going (back) to sleep. (I woke up at 2 and realized I'd messed up. Again, sorry.

Oh, you mentioned that your slave drive is "F:", so I'm assuming that C: is an NTFS drive for XP, D: is a FAT drive for the "rescue" stuff, and "E:" is the DVD drive. (Did you know that you can change XP's drive letters to whatever you want to use? I always make my DVD my "V:" drive, just because I think it looks nicer that way.)
 
Old 09-30-2006, 05:48 PM   #8
tjl30
LQ Newbie
 
Registered: Sep 2006
Posts: 9

Original Poster
Rep: Reputation: 0
Ok I did got a little info on my system, I have a
3 Floppy (A:)
DVD-RW (D:)
DVD (E:)

[DISK 0]Local Disk (C:) Partition NTFS {74GB}
[DISK 1]Local Disk (F:) Partition {111GB}
Partition {102MB}

The status of the Unnamed Partiton is (Active) and the status of DISK 0 (C:) is (System)

And my Boot loader looks like this
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn
So the commands
Code:
mkdir /mnt/d
mound /dev/hda2 /mnt/d -t vfat -o rw
dd if=/dev/hdb of=/mnt/d/linux.bin b=512
Will create a partion that both XP and Linux and read, then it will copy linux.bin to it, then from there I can move the linux.bin to my C drive? Also you said that the dd command can trash a NTFS partition, so would it destroy my C: Partition?

Last edited by tjl30; 09-30-2006 at 07:50 PM.
 
Old 09-30-2006, 08:56 PM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
First, it's probably a typo, but the second command in your second code block should be "mount," not "mound."

But, looking at your drive list, I see that my assumption that you had a FAT partition for your D: drive was incorrect.

You do, however, have a floppy disk drive. So you can use that to move the MBR image:
Code:
1) Install GRUB on the slave drive. (You have to have a working GRUB installed.)
2) Boot into Fedora (either using your BIOS to boot the slave drive, or "linux rescue."
3) Put a blank, formatted, floppy in the floppy disk drive.
The system should automatically mount the floppy.
If it doesn't, mount it "by hand" with:
3a) mount /dev/fd /media/floppy -o rw
4) Use the command dd if=/dev/hdb of=/media/floppy/linux.bin b=512 to copy the GRUB MBR to A:\linux.bin.
5) Boot into Windows and copy A:\linux.bin to C:\linux.bin
Then change your boot.ini file to look like this:
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
C:\linux.bin="Fedora"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP" /fastdetect /NoExecute=OptIn
if you want to default to XP after 30 seconds.

Altenatively, you could use
Code:
[boot loader]
timeout=5
default=C:\liux.bin
[operating systems]
C:\linux.bin="Fedora"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP" /fastdetect /NoExecute=OptIn
to boot to Fedora after 5 seconds.
 
Old 10-01-2006, 02:59 PM   #10
tjl30
LQ Newbie
 
Registered: Sep 2006
Posts: 9

Original Poster
Rep: Reputation: 0
I fomated a blank disk in windows does it make a diffrence where I format it?

I went into Linux Rescue mode and it did not see the floppy drive

Last edited by tjl30; 10-01-2006 at 03:58 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
dual booting fedora 5 edward233 Linux - Software 1 06-15-2006 07:35 PM
Dual booting Windows XP + Fedora 4 kcpaige89 Linux - Hardware 9 01-11-2006 11:47 PM
dual booting with fedora core2 s0berage Linux - Newbie 7 12-28-2004 09:05 PM
Dual Booting Fedora/XP Stardeath Linux - Newbie 8 08-28-2004 11:45 PM
Fedora Dual Booting Pedrof Fedora - Installation 8 03-03-2004 11:20 PM


All times are GMT -5. The time now is 04:15 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