You are not logged in.

#1 2009-04-08 20:03:05

michas
Member
Registered: 2009-04-08
Posts: 6

[SOLVED] GRUB and Windowx XP

I have problem with dual boot of Arch Linux and Windows XP Home. I had had Linux and I have installed Windows XP later. I can set in BIOS to boot from PATA Primary Master to boot Windows or boot from SATA Primary to boot GRUB and Arch Linux. It works. However I cannot boot Windows from GRUB. Well, I need help to configure it.

My working part of menu.lst for Arch:

title Arch Linux X
root (hd0,2)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/ebc407a3-906c-4b82-af60-567aa6367f42 ro
initrd /boot/kernel26.img

I have tested few configurations for Windows:

title Windows
rootnoverify (hd*,*)
makeactive
chainloader (hd*,*)
boot
title Windows
rootnoverify (hd*,*)
makeactive
chainloader +1

I have tested many numbers of disk and partitions in places of stars, without positive effects. I have not found other entries examples for Windows. I have no idea what to do next.

I have 3 HDD:
PATA Primary Master (/dev/sda)
PATA Primary Slave (/dev/sdb)
SATA Primary (/dev/sdc)

My partitions are:
/dev/sda1 – extended Flags: lba
/dev/sda5 – NTFS (with Windows XP)
/dev/sda2 – NTFS Flags: boot

/dev/sdb1 – NTFS Flags: boot
/dev/sdb2 – FAT32 Flags: lba
/dev/sdb3 – JFS

/dev/sdc3 – EXT4 (with Arch Linux)
/dev/sdc2 – SWAP
/dev/sdc1 – EXT3

Order is from Gparted.

I think boot for Windows is somewhere on /dev/sda and boot for Arch Linux/GRUB is somewhere on /dev/sdc. Could anyone help me to set my to boot Windows XP from GRUB?

*****************************************************
*****************************************************
I have found a solution.
The good entry for Windows XP on my computer:

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

Last edited by michas (2009-04-09 00:39:06)

Offline

#2 2009-04-08 20:16:04

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 750

Re: [SOLVED] GRUB and Windowx XP

title Windows
rootnoverify (hd0,4)
makeactive
chainloader +1

Offline

#3 2009-04-08 20:31:10

michas
Member
Registered: 2009-04-08
Posts: 6

Re: [SOLVED] GRUB and Windowx XP

Thank you for answer. Unfortunately it does not work. I have got "Not such partition..." or something like this. I have tested hd(1,4) and hd(2,4) too.

Offline

#4 2009-04-08 20:53:39

Shodan
Member
From: Finland
Registered: 2008-08-25
Posts: 30

Re: [SOLVED] GRUB and Windowx XP

Windows can only boot from the first partition, so you need to fake that using 'map'
This might work for you:

title Windows
map (hd0,0) (hd0,4)
map (hd0,4) (hd0,0)
rootnoverify (hd0,4)
chainloader +1

Last edited by Shodan (2009-04-08 20:55:35)

Offline

#5 2009-04-08 21:34:06

michas
Member
Registered: 2009-04-08
Posts: 6

Re: [SOLVED] GRUB and Windowx XP

Thank you for answer. However, it does not work. GRUB does not find any partition there. I am not sure if the Windows XP is on hd0. I think there is the Arch. I have tested map with hd(1,4) too. There was unknown execution format or something like this.

Offline

#6 2009-04-08 21:41:54

Shodan
Member
From: Finland
Registered: 2008-08-25
Posts: 30

Re: [SOLVED] GRUB and Windowx XP

Well your Arch boots from (hd0,2) which is sda3, which you list as nonexistant.
Post the output of 'mount' and 'fdisk -l' please.

Offline

#7 2009-04-08 22:15:49

michas
Member
Registered: 2009-04-08
Posts: 6

Re: [SOLVED] GRUB and Windowx XP

# fdisk -l                                     

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x206c206b                     

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2        3824    30708247+   f  W95 Ext'd (LBA)
/dev/sda2   *        3825        9729    47431912+   7  HPFS/NTFS
/dev/sda5               2        3824    30708216    7  HPFS/NTFS

Disk /dev/sdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2d632d62

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2550    20482843+   7  HPFS/NTFS
/dev/sdb2            2551        5100    20482875    c  W95 FAT32 (LBA)
/dev/sdb3            5101        7297    17647402+  83  Linux
/dev/sdb4   *           1           1           0    0  Empty
Partition 4 does not end on cylinder boundary.

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdfcfdfcf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        6535       19457   103803997+  83  Linux
/dev/sdc2            6273        6534     2104515   82  Linux swap / Solaris
/dev/sdc3               1        6272    50379808+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdf: 1048 MB, 1048576000 bytes
33 heads, 56 sectors/track, 1108 cylinders
Units = cylinders of 1848 * 512 = 946176 bytes
Disk identifier: 0x440b440a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *           1        1109     1023874+   6  FAT16
#mount
/dev/sdc3 on / type ext4 (rw)
none on /dev type ramfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)

Offline

#8 2009-04-08 22:36:28

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: [SOLVED] GRUB and Windowx XP

i'd go with

title Windows
rootnoverify (hd0,1)
makeactive
chainloader +1

if that doesn't work, it's beyond me sad

Offline

#9 2009-04-08 23:19:35

df3n5
Member
Registered: 2009-04-08
Posts: 25

Re: [SOLVED] GRUB and Windowx XP

Does the "cat" command work on ntfs partitions?

I'd keep trying :
cat hd(0,0)/WINDOWS/system
cat hd(0,1)/WINDOWS/system
.
.
.

Maybe you'll find out the right partition number that way?

Offline

#10 2009-04-09 00:33:17

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] GRUB and Windowx XP

There must be a shuffling of drives somewhere ..
hd(0,2) is most definitely sda3 while it is mounted as /dev/sdc3 which would be hd(2,2)

I presume you have grub on the MBR of /dev/sda?

How you manage to boot at all with your present setup is beyond me.

Maybe reinstalling grub to the MBR of /dev/sda1 and then use hd(2,2) for booting arch?
If I were you I would back up everything to an external usb-disk (if you've got one) and repartition with 'fdisk'.
See - it tells you here that your partitions are _not_ in disk order!!

Offline

#11 2009-04-09 00:33:58

michas
Member
Registered: 2009-04-08
Posts: 6

Re: [SOLVED] GRUB and Windowx XP

Thank you for help. I have found a solution.

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

Offline

#12 2009-04-09 00:48:35

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] GRUB and Windowx XP

I'm sorry, but that seems insane to me.
There should _always_ be _two_ maps, mostly to swap say sda and sdb - in which case you have map (hd1) (hd0) and map (hd0 (hd1)
What you are doing above is really to hide hd(0,0) behind hd(1,1). It is _not_ automatic that that hd(0,0) then emigrates to hd(1,1).
Then you use rootnoverify on hd(1,1) which means that hd(0,0) is now hidden ???
*shaking head* I really have no idea what is happening here - and I thought I knew about grub - duh!!

OK - you have managed to get it to work (heaven knows how) but I do believe you are on a somewhat dangerous path.
I would still advocate my solution from above - back it all up and repartition properly (and why - you dont have to answer - do you have sooo many ntfs/vfat partitions? Lump them alltogether or at most into 2 different ones - and the same goes for linux, one for the OS itself and one or two for your personal stuff. Oh - and not to forget - a small general bootpartition (ext2) on /dev/sda1

Last edited by perbh (2009-04-09 00:52:40)

Offline

#13 2009-04-10 18:58:03

michas
Member
Registered: 2009-04-08
Posts: 6

Re: [SOLVED] GRUB and Windowx XP

That seems insane to me too. And I think I like it.
This computer is quite old. It used to run Fedora Core 4 and was my first successful try to use Linux as primary Operating System. I have done few mistakes and have lerned few things.

Offline

Board footer

Powered by FluxBB