Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
a TIP for Dual-Booting with Windows XP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Mr-GolinuX
n00b
n00b


Joined: 10 Mar 2004
Posts: 17
Location: Tampa Bay, Florida

PostPosted: Mon Apr 05, 2004 6:38 am    Post subject: a TIP for Dual-Booting with Windows XP Reply with quote

Dual booting Linux with Windows XP can be tricky and sometimes leave you with an "unbootable" system. With some crafty partition management when you initially setup your hard drive, you can have more control of your Windows XP OS installation location and additionally, give yourself an easy fix in the event of an MBR catastrophy**

Its a little known fact, but you can "force" XP to use a boot partition and then install the rest of the OS on any partition you want. This is a lot more flexible than being forced to install the entire XP OS only onto the first partition of the first drive.
This is particularly nice, because then I am able to put my swap partition and my "OS of choice", Gentoo, on the inside sectors of the hardrive which have much faster access time :wink: ...hmmm, im thinking this was another keen plan from Microsoft to hog these fast sectors by default and make themselves look good in the process.

note 1: the boot partition size MUST be 120meg, minimum, and must be the first partition. I made mine 150meg to be safe

note 2: you will have to make a 2nd boot partition for Linux if you wish to have one

note 3: you will need to use fdisk or some other partitioning tool to define the first partition on the disk as 120mb+ "win-anything" partition. During setup, XP will automatically recognize, format, and utilize this partition as the "boot" partition




** I had a MBR problem once after installing GRUB, I tried reinstalling GRUB and even manually configuring GRUB at the command line. I also tried the Windows XP's fixmbr and fixboot commands from the rescue disk ...but no logical fixes seemed to work.

The Fix: I just made a new small (3-5gig) partition on the system and did a new install of XP to this partition. Afterwards the new Windows XP installation booted right up, and then I edited the boot.ini file to add my old XP installation. This was possible because "BOTH" XP installations share the same boot partition and boot files :wink: ...of course you can edit the boot.ini to your liking and even delete the new XP installation once you add the old installation to the boot.ini.

Here's an example of my boot.ini:

[boot loader]
timeout=60
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional NEW" /fastdetect
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windows XP Professional OLD" /fastdetect



...I have never had problems with GRUB before or after that problem though, and I never did find the reason for the problem either...so I just chalked it up to alien intervention...lol. :mrgreen:


_________________
impossibility itself does not exist, it's merely a virtue of improbability...

Go LinuX.org


Last edited by Mr-GolinuX on Wed Apr 07, 2004 6:33 am; edited 5 times in total
Back to top
View user's profile Send private message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Mon Apr 05, 2004 7:04 am    Post subject: Reply with quote

Hi Mr-GolinuX,

Nice writeup.

This kind of resembles my setup. I also have a modified boot.ini file to boot two sets of Windows installations.

One question: what do you mean by?
Quote:
Its a little known fact, but you can "force" XP to use a boot partition and then install the rest of the OS on any partition you want.


Is this some option to the setup, or just having a first primary bootable partition available will make Windows behave as suggested? The latter seems to be somewhat true as my experience goes.
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
Mr-GolinuX
n00b
n00b


Joined: 10 Mar 2004
Posts: 17
Location: Tampa Bay, Florida

PostPosted: Mon Apr 05, 2004 8:05 am    Post subject: Reply with quote

Mr-Golinux wrote:
Its a little known fact, but you can "force" XP to use a boot partition and then install the rest of the OS on any partition you want.
Luud wrote:
Is this some option to the setup, or just having a first primary bootable partition available will make Windows behave as suggested? The latter seems to be somewhat true as my experience goes.


Oops, I guess that wasnt clear was it :?

The later would be right, you would need to use fdisk or some other partitioning tool to define the first partition on the disk as 120mb+ "win-anything" partition. XP will then automatically recognize, format, and utilize this partition as the "boot" partition.


Oddly enough, in the XP partition manager, XP labels the "boot" partition as the "system" drive and the "system" partition is labeled the "boot" drive...lol :lol:


The original post has been edited for clarity
_________________
impossibility itself does not exist, it's merely a virtue of improbability...

Go LinuX.org
Back to top
View user's profile Send private message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Mon Apr 05, 2004 8:48 am    Post subject: Reply with quote

Thanks for the reply,

I think you might not need fdisk when using the windows XP (Pro) cd as you can create various partitions during the installation. If what you say is true: "windows will automatically detect and format the partition", then you do not need a separate fdisk.

What I observe though, is that windows will only allow you to format the partition you selected for the installation. Or does it also require you to select the type of formatting (FAT / NTFS) for the not yet formatted 'boot' partition?

:wink: This is getting more a windows than a Gentoo thread... (*oooh the shame * :oops: )
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Mon Apr 05, 2004 9:21 am    Post subject: Reply with quote

Moved from 'Installing Gentoo' to 'Documentation, Tips & Tricks'.
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
Mr-GolinuX
n00b
n00b


Joined: 10 Mar 2004
Posts: 17
Location: Tampa Bay, Florida

PostPosted: Mon Apr 05, 2004 10:06 am    Post subject: Reply with quote

Luud wrote:
What I observe though, is that windows will only allow you to format the partition you selected for the installation. Or does it also require you to select the type of formatting (FAT / NTFS) for the not yet formatted 'boot' partition?


XP will not offer the separate boot partition as an option during install, so it will appear that it is not allowed... However, after you select "your" partition for the OS installation, if you watch really close when setup begins, you will see XP format the "boot" partition first, and then the partition you have selected for the OS install. XP then automatically loads the appropriate start-up files to the "boot" partition

I havent seen any official documentation on this feature(?), but I thought I would share this info anyway, since it has proved itself to be very helpful to me in more than one aspect. :wink:

_________________
impossibility itself does not exist, it's merely a virtue of improbability...

Go LinuX.org
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Mon Apr 05, 2004 12:10 pm    Post subject: Reply with quote

This is a great guide - I had this problem as well when I tried to dual boot gentoo and windows. I didn't know how to fix it however so i just had to format and install only gentoo. Ill live :D
Back to top
View user's profile Send private message
madmango
Guru
Guru


Joined: 15 Jul 2003
Posts: 507
Location: PA, USA

PostPosted: Mon Apr 05, 2004 4:43 pm    Post subject: Reply with quote

I don't mean to be rude, but how is this a tip?

Have this done anyway when I set up my machine to dual boot between MS-DOS (good lord, yes) and winxp. My first partition is a 500 meg dos (fat16) one, the second is a ntfs winxp one.

But, I'm having a little trouble telling grub when to boot into xp. My fdisk output (linux) shows I've got

/dev/hda1 as a fat16 boot
/dev/hda3 as a Win95/LBA
/dev/hda4 as a NTFS

that uses all my primary partitions

/dev/hda6 is linux (mounted on /boot)
/dev/hda7 is swap
/dev/hda8 is linux (/)

But when I tell grub to boot from hda4 (root (hd0,3)) or hda3 (root (hd0,2)) i get errors, and when i tell it to boot from (hd0,0) i just get the grub screen again.
_________________
word.
Back to top
View user's profile Send private message
Mr-GolinuX
n00b
n00b


Joined: 10 Mar 2004
Posts: 17
Location: Tampa Bay, Florida

PostPosted: Tue Apr 06, 2004 6:50 am    Post subject: Reply with quote

madmango wrote:
I don't mean to be rude, but how is this a tip?

It's not rude at all, you have a valid question...
It would only be considered a tip for people that dont know about this somewhat undocumented feature(?) of XP/NTFS.

My examples only site some possibilities that exist in a dual boot environment with Linux and XP. In your case Windows has a much more ubiquitous presence on your hard drive which goes far beyond the scope of this small "tip"... but, you might find these 2 pages helpful: PAGE1 & PAGE2




madmango wrote:
My fdisk output (linux) shows I've got

/dev/hda1 as a fat16 boot
/dev/hda3 as a Win95/LBA
/dev/hda4 as a NTFS

that uses all my primary partitions

/dev/hda6 is linux (mounted on /boot)
/dev/hda7 is swap
/dev/hda8 is linux (/)


Hmmm..thats an odd output from fdisk, Im guessing hda2 must be your extended partition. Did you by chance partition this disk with the fdisk from Dos? Ideally you should use the latest version of fdisk to insure compatability with all file systems and partition sizes.

FYI: you can have up to 4 primary partitions -or- 3 primary partitions and 1 extended partition that contains a number of logical partitions.

Sorry if my answers are out in left field, but Im only guessing from the info you've provided. Can you post the contents of your /boot/grub/grub.conf file? It might shed some light on your problem.

_________________
impossibility itself does not exist, it's merely a virtue of improbability...

Go LinuX.org
Back to top
View user's profile Send private message
Mr-GolinuX
n00b
n00b


Joined: 10 Mar 2004
Posts: 17
Location: Tampa Bay, Florida

PostPosted: Wed Apr 07, 2004 6:21 am    Post subject: Reply with quote

madmango wrote:
But when I tell grub to boot from hda4 (root (hd0,3)) or hda3 (root (hd0,2)) i get errors, and when i tell it to boot from (hd0,0) i just get the grub screen again.


Im not sure about your current grub.conf , but these additions might work to boot your windows & dos...


title Windows XP
root (hd0,0)
makeactive
chainloader +1

title Dos
root (hd0,0)
makeactive
chainload /bootsect.dos



..but that may confuse the windows bootloader that you elicit to perform the OS loading in the first place. If that happens, you will have to follow the instructions on THIS page to make it possible. :wink:
_________________
impossibility itself does not exist, it's merely a virtue of improbability...

Go LinuX.org
Back to top
View user's profile Send private message
Luud
Apprentice
Apprentice


Joined: 05 Jun 2003
Posts: 246
Location: Netherlands

PostPosted: Wed Apr 07, 2004 7:04 am    Post subject: Reply with quote

Hi madmango, something you said makes me wonder:
Quote:
But when I tell grub to boot from hda4 (root (hd0,3)) or hda3 (root (hd0,2)) i get errors, and when i tell it to boot from (hd0,0) i just get the grub screen again.

Where dit you setup grub? Is it in the MBR or is it on (hd0,0)?

This would setup your boot partition as on (hd0,0) and install grub in the MBR:
Code:

grub> root (hd0,0)
grub> setup (hd0)


Good luck
_________________
"Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally
Back to top
View user's profile Send private message
maalth
n00b
n00b


Joined: 06 Jun 2003
Posts: 56
Location: Can't tell you...

PostPosted: Tue Apr 13, 2004 3:02 pm    Post subject: Boot partition size Reply with quote

I wanted to mention that you don't need a large boot partition. The minimum partition for /boot is 32M. I use 32M boot partitons on both my laptop and my gaming machine (yes, they both dual boot), I have never had a problem with my system not booting. I've always used small boot partitions since I installed slackware for the first time many years ago. There's actually very little in the boot partition that requires a significant amount of space.
_________________
Screw you guys, I'm going home...
Back to top
View user's profile Send private message
emilio
n00b
n00b


Joined: 13 Apr 2004
Posts: 2

PostPosted: Tue Apr 13, 2004 3:58 pm    Post subject: Reply with quote

If you put the first partition to windows you wont have this trouble again.

Actualy, it doesnt boot if the number of partitions before his partition changes.

If he is the first, and forever the first, then you'll never have this trouble again.

I had this trouble in the past, and instaled windowsXP/Slackware in many computers (friends and relatives).
Thats is what i concluded from my experiences.
_________________
----
I speak Perl.
Back to top
View user's profile Send private message
maalth
n00b
n00b


Joined: 06 Jun 2003
Posts: 56
Location: Can't tell you...

PostPosted: Wed Apr 14, 2004 12:24 am    Post subject: First partitions Reply with quote

My first partition on my second machine isn't windows. And I have installed Windows as the second OS in the past and still never had trouble.
_________________
Screw you guys, I'm going home...
Back to top
View user's profile Send private message
adamsjw2
n00b
n00b


Joined: 26 Feb 2004
Posts: 52

PostPosted: Wed Apr 28, 2004 5:28 pm    Post subject: Reply with quote

Thanks to all who have posted. This thread has been extremely helpful.
May I ask for some guidance.
My partitioning scheme looks like this.

/dev/hda1 HPFS/NTFS (bootable)
/dev/hda2 linux boot ext2
/dev/hda3 swap swap
/dev/hda4 linux root ext 3

After I upgraded to Kernel 2.6.5 my WinXP partition will no longer boot. My Gentoo boots perfectly however. My grub is setup as per the documentation with the WinXP line being:

title= Windows XP
root (hd0,0)
chainloader +1

when I add makeactive it still doesn't help.

What should I do? Should I reintall WinXP again and the boot from my LiveCD and reinstall grub in the MBR? The only reason I have XP is for MS Access and that's it. If the portage version of KNODA wasn't broken, I'd ditch XP all together. I just don't want to kill my Gentoo because It's taken 2 weeks to get it built the way I want it.
TIA,
Jim
Maysville KY USA
Back to top
View user's profile Send private message
proxy
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 260
Location: Chantilly, VA

PostPosted: Thu Apr 29, 2004 4:31 am    Post subject: Reply with quote

i do my multibooting slightly differnt, and i dont need to waste as much boot space:

here is my general layout (milage may vary)

Code:

/dev/hda1 linux boot (/boot)
/dev/hda2 NTFS (Windows)
/dev/hda3 linux root (/)
/dev/hda4 linux swap (swap)


obviously you can use extended partitions to get more out of it. Anyway here is the procedure. you can make /boot any size you want so long as it fits your kernel and grub (or lilo)

you then install windows FIRST (if you install windows after linux it will overwrite the MBR replacing grub as your boot loader)

then you install linux and install grub, then you simply tell grub to chainload to (hd0,1) and you are set.

the reason why i chose this layout it is that it simplifies your grub config a lot, only thing you do special is setup the chainloading entry in the config.

proxy
Back to top
View user's profile Send private message
adamsjw2
n00b
n00b


Joined: 26 Feb 2004
Posts: 52

PostPosted: Fri Apr 30, 2004 6:17 pm    Post subject: Found a Fix Reply with quote

Hi all,
To get my WinXP partition back, I booted with the XP CD, then selected the recovery console. There's a DOS based tool FIXBOOT that I ran, followed by FIXMBR. After that, I booted from the GENTOO liveCD and reinstalled grub in the MBR and that did it.

I'd love to know why it quit booting WinXP in the first place, but now that I'm back running, I'll not worry too much about it. I'd love to get rid of XP, but until the Knoda package is fixed, I'm still relying on MS Access for my DB.
Thanks for all your suggestions and all your help.
Now if I could mount the NTFS partition I would be good to go. I'm still getting "Kernel Doesn't Support NTFS" messages, even though I'm using Kernel 2.6.5-r1 and I have the NTFS FS compiled into the kernel.
Jim A.
Maysville KY USA
Back to top
View user's profile Send private message
kumarei
n00b
n00b


Joined: 07 May 2004
Posts: 5

PostPosted: Sat May 08, 2004 2:22 pm    Post subject: Reply with quote

I'm a complete newbie, and have never worked with partitions before. Could anyone explain how I would go about using fdisk to create a setup similar to proxy's?
Also, I have an 80 GB HD, and I was wondering if anyone could recommend how much space to each partition.
If anyone could help, I would greatly appreciate it.

Thanks,
Nate
Back to top
View user's profile Send private message
kumarei
n00b
n00b


Joined: 07 May 2004
Posts: 5

PostPosted: Sat May 08, 2004 5:15 pm    Post subject: Reply with quote

Nevermind, stupid question. Didn't read far enough into the manual.

As a more valid question, though, how do I set the type for a Windows NTFS partition?
Back to top
View user's profile Send private message
SwooshingRob
n00b
n00b


Joined: 16 Mar 2004
Posts: 50

PostPosted: Sun May 09, 2004 8:36 pm    Post subject: Reply with quote

Here is the partion table for my main drive:
1: Boot 32 Meg. Boot partition for both WinXP and Linux.
2: Swap 1Gig. Shared swap area for WinXP and Linux.
3: XP System 10 Gig NTFS
4: XP Data 10 Gig NTFS
5: Linux / 30Gig reiserfs
6: Linux /home 30 Gig reiserfs
7: Linux experimental 30 Gig. Currently Reiser4
8: Shared 10Gig VFAT

I'm very happy with this setup. My next system I'm about to build will have similar setup.
Oh, and don't worry too much about the inner tracks being fastest on a modern drive. The outer 10% are a bit slower, but the inner 90% will have very little variation in access time.

Quote:
As a more valid question, though, how do I set the type for a Windows NTFS partition?

I think the command is 't' in fdisk, if I remember correctly.
Back to top
View user's profile Send private message
tins
n00b
n00b


Joined: 18 Jul 2003
Posts: 20

PostPosted: Mon May 17, 2004 1:25 pm    Post subject: When XP won't boot... Reply with quote

adamsjw2 wrote:

title= Windows XP
root (hd0,0)
chainloader +1

You may also try:
Quote:

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

That did it for me when I had this very problem.
Back to top
View user's profile Send private message
o0the_llama0o
Tux's lil' helper
Tux's lil' helper


Joined: 10 May 2004
Posts: 89
Location: santa cruz

PostPosted: Thu May 20, 2004 7:02 am    Post subject: Reply with quote

adamsjw2 wrote
Quote:
Now if I could mount the NTFS partition I would be good to go. I'm still getting "Kernel Doesn't Support NTFS" messages, even though I'm using Kernel 2.6.5-r1 and I have the NTFS FS compiled into the kernel

linux is case sensitive
try
Code:
mount /dev/PARTITION -t ntfs /MOUNTPOINT


also i noticed that your /dev/hda1 is HPFS/NTFS i also have a HPT372N Raid controller and have no idea how to mount my Raid 0 array correctly

everytime i try to mount, it says bad superblock or something
ive got the hpt366 module running=(support for hpt36x and hpt37x according to the kernel config file) am i missing anything? what if i tell it its a scsi drive instead of ide?
Back to top
View user's profile Send private message
Medrakil
n00b
n00b


Joined: 22 May 2004
Posts: 9

PostPosted: Sat May 22, 2004 6:37 pm    Post subject: Reply with quote

Does WinXP need to be installed on the first partition of the first disk? but that's where gentoo is! >_< I figured i could let it have the fourth primary somewhere close to the end.. :/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum