Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Installing Gentoo 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
funeagle
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2003
Posts: 102
Location: London

PostPosted: Fri Aug 29, 2003 11:17 am    Post subject: HOWTO: Installing Gentoo with Windows XP Reply with quote

A lot of you guys (including me) had problems installing Windows XP with Gentoo using GRUB, here is a working configuration. I am writing these steps from my memory, so please confirm each step as you use them whether they are correct so that this can go to the Documentation, Tips & Tricks section later.

If you want to install Windows on a different HDD than Gentoo, you can jump down and just look into the grub.conf and use the map instructions at the section 'Windows XP Casual'

If you want to install Windows on on the same HDD follow these steps:

First of all you have to install Windows, the critical step is to put it on the first partition or create a small partition for its boot binaries, this is very IMPORTANT! Windows can't boot if its binaries are not on the first partition. I didnt know this when I was installing my system, this so I had to give up my linux boot partition for Windows. :cry:

On my system I have 7 partitions now, 1 boot partition, 1 swap, 3 equally sized for Gentoo, 1 NTFS for Windows and 1 FAT32 for sharing files between Windows and Gentoo's.

Code:

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1         4     32098+   4  FAT16 <32M
/dev/hda2             5      9964  80003700    f  Win95 Ext'd (LBA)
/dev/hda5             5        69    522081   82  Linux swap
/dev/hda6            70      1374  10482381   83  Linux
/dev/hda7          1375      2679  10482381   83  Linux
/dev/hda8          2680      3984  10482381   83  Linux
/dev/hda9   *      3985      5942  15727603+   7  HPFS/NTFS
/dev/hda10         5943      9964  32306683+   b  Win95 FAT32


If I I were you, I would create a boot partition for Windows and a boot partition for Linux separately (for security reasons)

Code:

Device Boot Id  System            Size
/dev/hda1   4  FAT16 <32M         8 MB - I think this is the smallest possible
/dev/hda2   f  Win95 Ext'd (LBA)  This is the extended partition
/dev/hda5  83  Linux              32 MB - Linux boot partition
/dev/hda6  82  Linux swap         ? MB - Your swap (I use 512 MB)
/dev/hda7  83  Linux              ? MB - Linux (I use 10 GB)
/dev/hda8  83  Linux              ? MB - Linux (I use 10 GB)
/dev/hda9  83  Linux              ? MB - Linux (I use 10 GB)
/dev/hda10   7  HPFS/NTFS         ? MB - Windows (I use 15 GB)
/dev/hda11  b  Win95 FAT32        ? MB - Windows (I use 32 GB)


If I remember correctly I created the partition with Gentoo's fdisk and then rebooted and installed Windows on the drive H:

Before installing Gentoo you might want to save your boot sector and your Windows boot partition

Code:

dd if=/dev/hda bs=512 count=1 of=/mnt/destinationpartition/mbr.BIN
dd if=/dev/hda1 of=/mnt/destinationpartition/WinBoot.BIN


Install Gentoo :-)

Configure grub to use the mbr (we want to use GRUB as the loader not the Windows :wink:)

Code:

grub
grub> root (hd0,5) (Your boot partition)
grub> setup (hd0) (Where the boot record is installed; here, it is the MBR)


Here is my grub.conf:
(Don't just copy, substitute for your partition names hda5, hda6 etc.)

Code:

# Boot automatically after 30 secs.
timeout 5

# By default, boot the first entry.
default 2

# Fallback to the second entry.
fallback 1

splashimage=(hd0,5)/boot/grub/splash.xpm.gz

# For booting GNU/Linux
title  Gentoo
root (hd0,5)
kernel (hd0,5)/boot/bzImage root=/dev/hda6

# For booting Backup GNU/Linux
title Gentoo-BACKUP
root (hd0,7)
kernel (hd0,7)/boot/bzImage root=/dev/hda8

# For booting XP GNU/Linux
title Gentoo-XPeriment
root (hd0,6)
kernel (hd0,6)/boot/bzImage root=/dev/hda7

# For booting Windows XP
# This Windows resides on the same HDD (hd0)
title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1

# For booting Windows XP
# This Windows resides on a different HDD (hd1)
title Windows XP Casual
# *Caution:* This is effective only if DOS (or Windows) uses BIOS to
# access the swapped disks. If that OS uses a special driver for the
# disks, this probably won't work.
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
makeactive
chainloader +1


I hope it helps :!:

Edit (keywords): dual 2000


Last edited by funeagle on Thu Oct 16, 2003 8:00 pm; edited 2 times in total
Back to top
View user's profile Send private message
Jeedo
Apprentice
Apprentice


Joined: 02 May 2003
Posts: 202
Location: Akureyri, Iceland

PostPosted: Fri Aug 29, 2003 1:03 pm    Post subject: Reply with quote

this is what i used when i dual booted, and i changed it to work on your system: (/dev/hda9)

Code:

title Happy Gay Fun Loving Operating System
rootnoverify (hd0,8)
chainloader +1


try using that for windows
Back to top
View user's profile Send private message
GentooBox
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1168
Location: Denmark

PostPosted: Fri Aug 29, 2003 3:01 pm    Post subject: Reply with quote

Hi...

maby you can help me a little :)
I have Windows XP currently installed on this box i am writing from now, and i want Gentoo on this box, but i want to keep windows xp so that i can play CC- generals. (the only game i play)

this is what my harddisk looks like:

Start{
4.4 gb space for windowsXp
90 gb for backup
10 gb unpartitioned space
}

i want to install Gentoo on the last 10 gb, but i am afraid of installing the grub on the partition that windows uses.

what should my root (hd0,0) be ?
and what about setup (hd0) ?

EDIT:

Well.... i think that i just should overwrite the windows MBR, and then just make a link to the windows xp partition.

what is chainloader ?
_________________
Encrypt, lock up everything and duct tape the rest
Back to top
View user's profile Send private message
funeagle
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2003
Posts: 102
Location: London

PostPosted: Fri Aug 29, 2003 3:25 pm    Post subject: Reply with quote

first do fidsk -l /dev/hda
then find there which is your linux partition
if it is hda3 then your root should be

root (hd0,2)
setup (hd0)

if its hda4 then root (hd0,3) etc.

if you do info grub you will find it there as:

Quote:

- Command: chainloader [`--force'] file
Load FILE as a chain-loader. Like any other file loaded by the
filesystem code, it can use the blocklist notation to grab the
first sector of the current partition with `+1'. If you specify the
option `--force', then load FILE forcibly, whether it has a
correct signature or not. This is required when you want to load a
defective boot loader, such as SCO UnixWare 7.1 (*note SCO
UnixWare::).


I dont understand what do you mean by linking to your partition but
what actually grub does is it executes the code found on that +1 sector instead of using your linux kernel
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Fri Aug 29, 2003 4:05 pm    Post subject: Reply with quote

Moving from Installing Gentoo. Thanks for writing up something on this issue!
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
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