# [FAQF] IG2: How to install Gentoo in a Win XP/NT config

## trupoet

--- MOD EDIT -- the original thread has become a FAQ here  -- Bloody B. 

I really like the idea of making the dummy boot file for XP/2k/NT but the guide never went over how to make this file....how would I go about doing that?

----------

## insomniac

I prefer going the other way - using Grub first to choose between Gentoo and NT/2000/XP , then booting the desired OS.... but i'm sure there is a reason to do it your way...

----------

## Kosmo

I once had a triple installation (Win98/WinXP/Gentoo) and i didn't find a way to get the windows' in different grub options. I had an entry Windows which then gave me a second bootloader where i could choose between 98 and XP.  If i got Gentoo into the windows bootloader, i would only have had 1 boot menu

----------

## Sequentious

 *insomniac wrote:*   

> I prefer going the other way - using Grub first to choose between Gentoo and NT/2000/XP , then booting the desired OS.... but i'm sure there is a reason to do it your way...

 I'm using grub to choose between Gentoo and WinXP. It wasnt an issue to set up at all, I just followed the instructions in the Install guide and it it had a sample entry for booting Windows.

----------

## Kosmo

It's just a matter of preference really. We really can't obligate people to like Grub (or lilo), although we *all* know free (not beer*) software is better

*: i remember the term beer, but i don't seem to remember the opposite, is there any?

----------

## Sequentious

 *Kosmo wrote:*   

> It's just a matter of preference really. We really can't obligate people to like Grub (or lilo), although we *all* know free (not beer*) software is better
> 
> *: i remember the term beer, but i don't seem to remember the opposite, is there any?

 Well, we could try...

Btw, its either speech or water, im not sure which you're looking for

----------

## Kosmo

I was looking for speech, thx.  :Smile: 

Free water is the same as free beer, only the second one will get you drunk and more thirsty

----------

## Pigeon

 *insomniac wrote:*   

> I prefer going the other way - using Grub first to choose between Gentoo and NT/2000/XP , then booting the desired OS.... but i'm sure there is a reason to do it your way...

 

Here's one...  Both windows and linux are installed on my RAID controller.  (shows up in grub as hd1)  I have a second hardisk in /dev/hda.  I can't install grub on my RAID array because it corrupts the array, so I have to install it on /dev/hda.  GRUB can't boot windows from /dev/hda because /dev/hda isn't the "primary" hard disk.  I can't work around it with the map aliasing thing because windows doesn't use the BIOS to get the location of my RAID array.

Unfortunetally, this method doesn't work for me either. (sigh)

----------

## pilla

What a good candidate for a FAQ entry....

----------

## plate

Be my guest.    :Cool: 

----------

## pilla

The first post has become IG2: How to install Gentoo in a Win XP/NT config. This current thread will be its feedback thread. You can post corrections here, and the FAQ will be updated accordingly by one of the moderators.

Kudos for plate, for writting this nice piece of documentation.

----------

## dol-sen

I have a WinXP/Gentoo dual boot (someday) that I can't get to work.

My new system:

Gigabyte GA7VAX motherboard (Via(KT400 Chipset)

Asus/Nvidia GF4-440MX Video

3 - WD600BB Hard Disks, DVD, Floppy

hda1 (30gig fat32), hda2 (30gig fat32)

hdb1 (/boot ext2),  hdb2 (swap), hdb3 (/ ext3)

hdc2 (more swap), hdc3 (/home ext3)

hdd (DVD)

I first installed the base gentoo system to hdb & hdc with grub setup to hda's MBR

After the winXP install to C: (hda1) the MBR was overwritten (expected)

I then used the grub boot floppy to re-establish grub in hda's MBR.   That worked for gentoo but would not boot WinXP.  Through some searching I found this thread:https://forums.gentoo.org/viewtopic.php?t=33326

I have tried the normal grub method = WIn XP won't boot, I repaired the hda MBR for WinXP-XP boots ok /no gentoo

I have tried putting grub on hdb & setting the bios to boot from hdb: grub needed to be reconfigured as hd1 was then hd0 for grub only, but I still could not boot WinXP.

Then  sgahm pointed me to plate's FAQ.

With variations for my install I tried WinXP's boot loader.   After several tries (changing grub, forgetting to make a new bin file, etc., etc., also I dd'ed straight to c:\ </mnt/windows>:

results: the XP bootloader sends me off to a blank screen with a <dead> but blinking cursor (grub was setup (hd1),  with grub setup (hd1,0) I now get grub printed in the top left with a <dead> blinking cursor

I see that there are a few more grub methods on the other link I'll try.

I don't know if I was doing something wrong with plate's method or maybe it only works for other partitions on the same drive.

In the meantime my only way to gentoo on the new machine is my grub bootfloppy and manualy entering the commands.

Brian

[/url]

----------

## pilla

plate's method works with Linuxes in any partition (or at least, I don't see anything preventing it to work). One thing that may be in your way is that you dd'd directly to the FAT partition. Try to dd to a Linux partition, then copy it into the Win Partition.

----------

## plate

Can't be sure without having had a look at your grub.conf, but the canonical way to do this for people with separate drives for Windows and Linux is not my NT bootloader routine: Darth_Daver's howto actually makes more sense whenever one has more than just a single harddisk available.

----------

## dol-sen

I think where I went wrong using plate's method was trying to put & copy grub from a slave drive.   Then windows was booting the file from a primary drive... hence the dead boot.    I like what Darth_Daver has explained and done.   It may be the easier &safer way.

Also I think that both plate's & Dath_Daver's should be in the FAQ as well as linked into the install docs.

There are 3 threads going right now about the same or very similar problems that would probably been reduced if there was a good planning section in the install docs for us noob's.   Then most of us (at least a few) could do the install using the correct technique for grub/etc. without a lot of the agravation.

A great many thanks for all the help, keep up the good work.   :Smile: 

Brian

----------

## dol-sen

Just a final update.   I have been able to correctly setup grub using a slight modification to Darth_Davers howto.   Instead of physically swapping the primary & secondary drives (WinXP on primary, Gentoo on secondary)  I set the bios to boot from the secondary drive (hd1).

One thing to note: grub thinks that since it is being booted then the drive it is on must be (hd0) instead of (hd?), I still needed to re-map the the drives in grub (to what they actually were) to boot windows.   Gentoo still regards itself as being on (hd1) although grub thinks the same drive is (hd0).

I will post a condensed & commented grub.conf to Darth's thread for others to use as a possible variation to that method, probably tommoro after it completes a huge emerge -u world.

Thanks again for the help,   Brian   :Smile: 

P.S. I see I've evolved from n00b to Tux's little helper  :Smile: 

----------

## jimlynch11

alright i have winXP in hda1, then lindows installed on the rest of my drive

i have lilo currently installed in the MBR as my bootloader, which lets me choose between XP and linux.  how do i install gentoo to the proper partition without losing data.  i know how to add XP to the lilo menu after I have it installed, and i read the guide but just wanted to be absolutely sure before I tried it.

thanks for the help

----------

## plate

If you use Lilo to boot your entire OS collection, you don't need the method described in the FAQ discussed here. Just go with the standard CD installation guide or install from within Lindows, using the method described in the alternative guide.

----------

## Marou

I've followed the instructions in the guide exactly but can't seem to boot into Gentoo.  I get a GRUB Geom Error when loading.  Any ideas?..

Additional Info: 

Swap = hdb5

Boot = hdb6

Root = hdb7

In grub I made (hd1,5) bootable and set it up like that.  In fstab I have drives listed as /dev/hdbX

In grub.conf everything is listed grubstyle except the kernal location.

----------

## effektz

Im trying to install Gentoo but am having some trouble with Plate's guide. I have Windows XP (NTFS) in /dev/hda1. But when i follow the instructions on how to install linux, plate tells me hdaN+4 (+4 from the guide). SO i fdisk /dev/hda. n for new partition. p for primiary (e for extended is the only other option). But when i hit P, (or even e), it tell sme to select 1-4. However, in plate's guide, it tells me to make them hda5 hda6 and hda7, but i cant, i can only do hda2 hda3 and hda4...any help would be great. Thanks

----------

## goanuj

I have set up my boot.ini as in step 7.  However there is one problem that is really annoying me.  Whenever I reboot from Windows either startup or shutdown, when I choose Gentoo 1.4 from the windows boot manager, it locks up.  I have to physically reset the machine (a little button that one needs a paperclip) to depress and then upon the next boot, I am able to load up the grub boot manager.  This consistently happens every time I am in windows and then shutdown/restart and then try to boot up gentoo.  When I am in gentoo and choose to restart I do not have these problems at the next startup.

Has anyone experienced this problem?

Do you think it may have something to do with grub thinking it is on hd0?  In my setup, grub is located on hd2.

 *Quote:*   

>  One thing to note: grub thinks that since it is being booted then the drive it is on must be (hd0) instead of (hd?), I still needed to re-map the the drives in grub (to what they actually were) to boot windows. Gentoo still regards itself as being on (hd1) although grub thinks the same drive is (hd0). 

 

----------

## plate

effektz: Can't see why you wouldn't be able to add extended partitions, but unless you want to create more partitions than the default three for Gentoo you can use primary partitions, too. 

goanuj: Looks like Windows isn't reinitialising your hardware properly when you do a restart as opposed to a complete shutdown. I think it's time I added a sentence to my slightly dated routine that you shouldn't follow it at all if you install Linux and Windows on separate disks. There's no need to even think about tweaking the NT boot loader if you don't have both OS on the same disk, you know... Check Darth_Daver's Howto, that's a much more appropriate way of doing it in cases like yours.

----------

## goanuj

 *plate wrote:*   

> goanuj: Looks like Windows isn't reinitialising your hardware properly when you do a restart as opposed to a complete shutdown. I think it's time I added a sentence to my slightly dated routine that you shouldn't follow it at all if you install Linux and Windows on separate disks. There's no need to even think about tweaking the NT boot loader if you don't have both OS on the same disk, you know... 

 

here is the output of my fdisk -l, so should I or should I not use the NT boot loader? I would like to use it because it makes my life a bit easier so that I will not have to install grub on my root(boot ?) parition, I have a feeling that will be quite difficult and I may have to repartition which I do NOT want to do.

```

Disk /dev/ide/host0/bus0/target0/lun0/disc: 12.0 GB, 12072517632 bytes

255 heads, 63 sectors/track, 1467 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

                                Device Boot    Start       End    Blocks   Id  System

/dev/ide/host0/bus0/target0/lun0/part1   *         1       645   5180931    7  HPFS/NTFS

/dev/ide/host0/bus0/target0/lun0/part2           646       895   2008125    b  Win95 FAT32

/dev/ide/host0/bus0/target0/lun0/part3           896      1467   4594590    5  Extended

/dev/ide/host0/bus0/target0/lun0/part5           896       908    104391   83  Linux

/dev/ide/host0/bus0/target0/lun0/part6           909       948    321268+  82  Linux swap

/dev/ide/host0/bus0/target0/lun0/part7           949      1467   4168836   83  Linux

```

----------

## plate

Frankly, I wouldn't use it myself any longer. There's no real benefit from using the NT loader other than its familiarity with long-term Windows users. The GRUB is safe, it doesn't corrupt your drive, it's not complicated at all, and you definitely don't need to repartition. That guide I wrote applied to only one of my machines that was booting Windows by default at the time, but every other dual- or triple-boot PC I've set up since then uses the GRUB. With the erratic shutdown behaviour of Windows that your machine displays chances are you'll be better of with the GRUB. But at the end of the day, as was said in this thread a long time ago. it really doesn't matter all that much... It's a question of personal preference, not a technical necessity.

----------

## sebo

Hi,

I would like to thank the author for this interesting thread. However, I do have an issue going on when using it. 

I do have the same repartition disk:

```

Disk /dev/hda : 255 heads, 63 sectors, 4865 cylinders 

Units = cylinders of 16865 * 512 bytes 

   Device Boot    Start       End    Blocks   Id  System 

/dev/hda1   *         1      2550  20482843+   7  HPFS/NTFS 

/dev/hda2          2551      4865  18595237+   f  Win95 Ext'd (LBA) 

/dev/hda5          2551      2563    104391   83  Linux 

/dev/hda6          2564      2691   1028128+  82  Linux swap 

/dev/hda7          2692      4865  17462623+  83  Linux 

```

I followed the installation process up to chapter 17 where I modified the /etc/fstab file as follows:

```

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It is safe to drop the noatime options if you want and to 

# switch between notail and tail freely.

# <fs>           <mount point>   <type>   <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda5           /boot       ext2    noauto,noatime    1 2

/dev/hda7           /           ext3    noatime         0 1

/dev/hda6           none        swap    sw              0 0

/dev/cdroms/cdrom0  /mnt/cdrom  iso9660    noauto,ro       0 0

proc                /proc       proc    defaults        0 0

```

When I arrive to chapter 23 of the installation guide, I wrote:

```

#grub

grub> root (hd0,4) 

grub> setup (hd0,4) 

grub> quit

```

then I followed steps 5, 6 and 7 of the thread.

Now...I have a boot selection window just as I want. However, when I select Gentoo Linux, I boot enters into grub. I get the grub prompt...

Do you guys have any idea of what am I doing wrong?

Thanks!

----------

## pilla

Post your grub.conf

----------

## ozt

ok you gotta be kidding me.

I did just create partitions with Partition Magic in Windows and then booted up the livecd and followed the install.txt

----------

## pilla

What are you implying? That you don't have a grub.conf? 

 *ozt wrote:*   

> ok you gotta be kidding me.
> 
> I did just create partitions with Partition Magic in Windows and then booted up the livecd and followed the install.txt

 

----------

## ozt

of course I have a grub.conf else I wouldn't be inside Gentoo now.

But I was actually refering to the FAQ (sorry for not making that clear). I've installed Gentoo before on only one harddisk with windows preinstalled and I think some of the steps are unecessary in the FAQ, that's all

```
This is just a synthesis of tips and tricks I found on various websites to make this work. It may come in handy when you want to add Gentoo on a PC with only one harddisk that has XP preinstalled on a single NTFS partition. Everything here is based on Gentoo's basic installation guide which I followed religiously except for the partition numbering. Here is what I did: 
```

----------

## sebo

OK I get it now. Sorry for this dumb post. I think I missed a step within the install guide...I need to make the grub.conf...

Thanks again

----------

## plate

 :Smile:  That's what I thought when you said that you ended up at a GRUB prompt... Glad you solved the problem before I even noticed that this thread had new postings added. Just a quick reminder to y'all: DT&T is not a support forum, questions like that are better posted to Installing Gentoo. This thread just serves as a debate club for the Howto.  :Razz: 

----------

## koojmak

just wondering if someone could provide some explicit instructions on how i copy the *.bin file i made to a floppy disk.......tia

update.....well i found out the cp command, but in doing that it made the disk unreadable under windows....  :Sad: 

i think i'll call it a night and see what the new day brings........

----------

## fourteen20

This is my first time installing gentoo, i have used red hat for a while b4.

The problem that i have is that i am using a raid0 array on sata (Nf7-s).

I cant get my head round the grub section at all.

The way i am installing is this

/boot /dev/ataraid/disc0/part1

/swap /dev/ataraid/disc0/part2

/root /dev/ataraid/disc0/part3

win xp /dev/ataraid/disc0/part4

what grub conf would i use?

i have read most of the threads on the forums and i think they have confused me more than ever ,i find it easier to configure a kernel build than this,any help much appreciated

----------

## MonstaThrilla

Can someone expound on the whole business of making a .bin?  I'm not quite getting it.

----------

## funeagle

If I got it right you are using window's booting menu, forget the bin file forget windows use Gentoo as the primary os!

[url] https://forums.gentoo.org/viewtopic.php?t=79053 [/url]

----------

## orionrobots

I am sure I remember that when I first started using linux, there was a tool called "FIPS" which was completely free.  You would normally create a CD with a boot image, or a floppy with it, and use it to resize partitions.  It would also backup, and restore root/boot sectors of a disk (a feature which I once abused to fix a barfed one - by backing it up, changing the dumped file, and restoring that  :Rolling Eyes:  ).

The reason I mention this, is that in the original post - PM was suggested -but FIPS is free, and afaik open source.  It probably doesnt go down too well suggetsing that users will need to buy PM to use a free OS in a dual-boot environment.

I have not seen FIPS for a while, but that is because I have not dual-booted for at least 4 years now(I got a second computer - for gaming and music).

 :Smile: 

----------

## Zorn1981

I have some problem. I followed the instructions of that guide and I obtained this partition:

```

hda1   winxp

hda2   ext

hda5   boot

hda6   swap

hda7   root

```

I tried to install LILO instead of GRUB, because Grub outputs segmentation fault when installing (why?).

I modified /etc/lilo.conf in this way

```

boot=/dev/hda

image=/boot/bzImage

           label=linux

           read-only

           root=/dev/hda7

other=/dev/hda1

         label=windows

```

Then I went back to the shell and I wrote

```

/sbin/lilo

```

When I reboot, Lilo works, but I see only an entry for linux and when I select it I see only a black screen.

bye[/code]

----------

## Slyde

solved.Last edited by Slyde on Sun Mar 07, 2004 6:38 am; edited 1 time in total

----------

## Slyde

I want to extend my sincerest appreciation to plate for writing this excellent guide. New systems works beautifully! Thank you!!

----------

## Nimo

I don't know if it's already mentioned, but if you don't have Partition Magic then try to ntfsresize.

There is also a guide 'How to install Linux keeping windows' on that page, I used that guide together with the Gentoo Handbook and it worked great.

----------

## slycordinator

 *insomniac wrote:*   

> I prefer going the other way - using Grub first to choose between Gentoo and NT/2000/XP , then booting the desired OS.... but i'm sure there is a reason to do it your way...

 

The only reason I can think of is that a while back when I was a complete linux newb, I was running redhat and it used grub to choose between it and win2k.  I upgraded to WinXP only to find that I couldn't boot Linux anymore since windows installs always reset the mbr.

----------

## doubled

 *Quote:*   

> You can probably set attributes to create this as a hidden file, but I have no idea how one does that.
> 
> 

 

I believe 

```
attrib +h filename
```

will do what you are looking for.

```
attrib /?
```

 for details.

----------

## ruzer

what do you do if you install gentoo, and then you install winxp, but you forget to do step 5:

dd if=/dev/hda5 of=/tmp/yourfilename.bin bs=512 count=1

So you can only boot into winxp.

I've booted with KNOPPIX, but don't know how to get grub to do its thing

Thanks

Ruzer

----------

## dontremember

 *Nimo wrote:*   

> I don't know if it's already mentioned, but if you don't have Partition Magic then try to ntfsresize.

 

Second that!

I was handed a Dell M60 laptop at work, with WinXP and 2 NTFS partitions, so I immediately started looking for a partition editor.  I came across ntfsresize in its QTparted incarnation on the SystemRescueCD ( http://www.sysresccd.org/).  It worked beautifully!  Cut down the D: drive to 10Gb to make space for an extended partition for Gentoo, then hacked a boot partition off the end of the C: drive.  No apparent problems, not that I really care - they gave me a complete install kit for WinXP and all the company stuff I might need...

----------

## johnnyICON

Wow, it actually worked for me on the first try. Awesome tutorial!

I also used http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html just to be sure.

----------

## SilverSnake

I get this problem with a "GRUB" prompt only and nothing more. Has any solution or cause to this been found?

 *grub.conf wrote:*   

> default 0
> 
> timeout 30
> 
> splashimage=(hd1,0)/grub/splash.xpm.gz
> ...

 

 *fdisk -l /dev/hdb wrote:*   

> Disk /dev/hdb: 82.3 GB, 82348277760 bytes
> 
> 255 heads, 63 sectors/track, 10011 cylinders
> 
> Units = cylinders of 16065 * 512 = 8225280 bytes
> ...

 

Kernel name is correctly spelt... Any ideas?

----------

## wilson001

Hello!

I am wondering is it possible to install gentoo using Microsoft Virtual PC. If yes, will there be anything that I should noticed like how to do the partition?

----------

## The New Guy

This isn't my first time installing Gentoo now (actually like the 3rd or 4th *D'oh!*), but this -is- my first time installing it with WinXP already installed. This guide was extremely helpful and easy to follow. Good work man.

----------

## yoda@gentoo

1. install a windows (BUT ONLY IF YOU REALLY NEED IT !!!!!!!  :Wink: )

2. install gentoo with the "installation instructions" document.

3. where is the problem with this fucking windows  :Smile:  ??

I installed gentoo about 5 times with windows on an other partition, and i just had to make

an entry in grub.conf.

----------

## dudinatrix

Does the dual boot advice in the FAQ allow you to share files between WinXP and Gentoo?  If not, how can the setup be adjusted to allow doing so, ie by adding a shared partition?

----------

## funeagle

If you want to share a partition between linux and windows use a fat partition where both windows and linux can write to.

----------

## djvman

this is about the IG2: How to install Gentoo in a Win XP/NT config, posted by plate.

 *plate wrote:*   

> Until Linux support for NTFS emerges from the experimental stage that is reportedly going to kill your disk before you can say "wobble", you will need to resize the disk before you boot the Gentoo installation CD. I used Partition Magic 7.0 for that, mainly because I couldn't find anything else that could do this for NTFS partitions:
> 
> 1. Resize the C: drive
> 
> PM makes this very easy, just click on the resize button and let the wizard take over. All you need to decide upon is the size of the XP partition you want to keep, everything else is automatic. You need to reboot, and the PM script then neatly reslices your disk.
> ...

 

well i have been testing SystemRescueCDROM distro, wich comes with qtparted, with this tool i have resize with no problem winXP installation with NTFS.

So maybe its time for make full testing and add it to the gentoo documentation, or maybe better, make a gentoo live cd with it.

----------

## aleron

I've foobar'd this somehow.  I reinstalled gentoo, and this time I used the grub method detailed by plate (with my partition information), but when I boot the gentoo option from the NT boot loader, I end up at a grub prompt.  I don't see any warning messages, but I just have this grub prompt.  What did this noob do wrong, or omit?

/edit

I've managed to load the kernel and boot the system by issuing the right kernel command followed by boot.  But surely I left this information out of grub when I set it up manually like plate detailed (vs. using a grub config file).  How do I remedy this in a manual grub install?Last edited by aleron on Mon Jul 09, 2007 2:16 am; edited 1 time in total

----------

## Naib

wow thread-necro

lets see yr grub-conf as well as the output of fdisk -l /dev/sda  or whatever the node-name for the device you installed window/linux onto

Using NTLDR is a neat way to boot linux (I have todo it at work since IT say I can't mess with their install  :Very Happy:  )

----------

## aleron

For reference, my partitions (250gb sata drive):

```
   Device Boot    Start        End      Blocks   Id  System

/dev/sda1   *         1      24027   192996846    7  HPFS/NTFS

/dev/sda2         24028      24040      104422+  83  Linux

/dev/sda3         24041      24527     3911827+  82  Linux swap

/dev/sda4         24528      30401    47182905   83  Linux
```

I have no grub conf file, I just did it  manually like plate did in the FAQ.  As far as what I did though..

```
~# grub --no-floppy

grub> root (hd0,1)

grub> setup (hd0,1)

grub> quit
```

Then I dd'd just like he did, through it up on my ftp, then modified my boot.ini file appropriately.  However, after I left the house earlier, it occurred to me that I was probably supposed to really do something like this with GRUB (please correct me if I'm wrong):

```
~# grub --no-floppy

grub> root (hd0,1)

grub> setup (hd0,1)

grub> kernel /boot/kernel-2.6.20-r8

grub> boot

grub> quit
```

Would that be correct?

----------

## jaford

Hello!  I'm  new to gentoo/linux.  I have a million questions.  I have a MSvistas machine.

I used gentoo livecd.  It didn't ask me to designate a partition.  And, when I reboot, the option to

load gentoo instead of vista doesn't show in the boot options menu.  Would someone lead me 

out of the dark!  JWF

----------

