You are not logged in.

#1 2007-01-23 12:55:32

tinker
Member
From: Norway
Registered: 2007-01-14
Posts: 18

Grub config - dualboot Arch/Winxp

My box has two disks. I have a fresh Arch-install, meant to use all of the first disk. On the other drive is Win xp installed (still keep it for a couple of prog.) Problem is that I cannot boot xp. It's in the Grub menu. Grub was installed in the MBR. Hoping that someone could give some advice I copy my fdisk -l

[root@archbox tinker]# fdisk -l

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           5       40162   83  Linux
/dev/sda2               6          38      265072+  82  Linux swap / Solaris
/dev/sda3              39       30515   244806502+  83  Linux

Disk /dev/sdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        9732    78172258+   7  HPFS/NTFS

Disk /dev/sdd: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Then from /etc/grub/menu.lst:

# DEVICE NAME CONVERSIONS
#
#  Linux           Grub
# ------------------X-------
#  /dev/fd0        (fd0)
#  /dev/hda        (hd0)
#  /dev/hdb2       (hd1,1)
#  /dev/hda3       (hd0,2)
# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26-fallback.img


title Windows XP
rootnoverify(hd 0,6)
makeactive
chainloader +1

Dont mind the rootnoverify hd0,6) its only the last I tried.

Offline

#2 2007-01-23 13:05:16

stingray
Member
From: Lima, Peru SA
Registered: 2006-03-24
Posts: 188

Re: Grub config - dualboot Arch/Winxp

try

title Windows XP 
rootnoverify (hd1) 
makeactive 
chainloader +1

or

title Windows XP 
rootnoverify (hd1,0) 
makeactive 
chainloader +1

Offline

#3 2007-01-23 13:41:21

tinker
Member
From: Norway
Registered: 2007-01-14
Posts: 18

Re: Grub config - dualboot Arch/Winxp

Thanks for the tips, but when I tried the (hd1) it returned "Invalide device requested"
Trying (hd1,0) it says "Booting Windows XP"  (!!) but nothing happens. Only the blinking cursor. But I felt pretty close this time!

Could it bee wrong having boot-marked /dev/sdb1?
I guess it would be dangerous to put in the XP cd and try a repair? It wold perhaps kill Grub ? I have had dualboots before but now I'm confused.

Offline

#4 2007-01-23 15:56:16

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Grub config - dualboot Arch/Winxp

I recall reading somewhere that Windows had to be on your first partition to boot - now I don't know if that means it needs to be on (hd0,0) specifically or if it just means that it needs to be on (hdX,0) (ie. any drive)

Offline

#5 2007-01-23 19:00:48

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,002

Re: Grub config - dualboot Arch/Winxp

Windows has trouble booting from non-primary drives , so you need to let grub change the drive order windows sees.
The map statements below are meant to take care of that, try it out.

# (2) Windows XP Pro
title Windows XP Professional
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2007-01-23 19:51:44

tinker
Member
From: Norway
Registered: 2007-01-14
Posts: 18

Re: Grub config - dualboot Arch/Winxp

Thank You
I just tried it out, and it returned:  "NTLDR missing"
That is the Windows bootloader, isn'it? Closing in on the real problem.

Offline

#7 2007-01-23 20:49:23

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,002

Re: Grub config - dualboot Arch/Winxp

Yes, it is the windows bootloader.

Windows XP uses the boot.ini file to determine on which harddrive NTLDR and other windows system files reside.

your boot.ini file probably looks similar to this :

[boot loader]
timeout=5
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

the multi(0)disk(0)rdisk(0)partition(1)  points to the first harddrive in the system, and since you have windows now on the 2nd harddrive , it needs to be changed, probably to multi(0)disk(0)rdisk(1)partition(1) .

You'll need to use a bootable cd that allows you to edit files on ntfs partitions to change it.
The windows install cd can do that via the rescue option, or you could use something like bartpe .

After you have got this right and can finally boot into windows, it will probably want to re-activate your copy.

The real problem in this case is the way windows works ...


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB