You are not logged in.

#1 2008-12-19 19:48:07

mongoose088
Member
Registered: 2008-09-14
Posts: 32

Dual Booting Windows and Arch (SOLVED!)

Hello all, I'm having trouble getting a windows partition activated again. (Windows was on here for many years, then I installed arch on a separate partition.)

Here is the layout of fdisk -l:
Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        7833    62918541    7  HPFS/NTFS
/dev/sda2            7834       12039    33784695   83  Linux
/dev/sda3           12040       12161      979965   82  Linux swap / Solaris

sda1 is the windows partition, and sda2 is the arch partition. The linux partition SHOULD be primary bootable (have the * next to it),but all my attempts to do this have failed. (I've used "testdisk" to change the flags, but for some reason it keeps reverting back to setting sda 1 as primary bootable after a reboot or 2).

This is the pertinent section of /boot/grub/menu.lst:
title  Arch Linux
root   (hd0,1)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/f3be3baa-3b62-460c-8801-64b0b1cca$
initrd /boot/kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,1)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/f3be3baa-3b62-460c-8801-64b0b1cca$
initrd /boot/kernel26-fallback.img

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

I have a . . . modified . . . copy of XP Professional, which comes with a recovery console to reinstall the MBR if it's necessary.

From what I've researched, I somehow need to reinstall grub to the second partition, make the second partition primary bootable, then rewrite the MBR on the first partition, and correct any command errors in menu.lst, but I haven't really figure out a way to do it.

Thanks in advance for your help!

Last edited by mongoose088 (2008-12-20 21:48:18)

Offline

#2 2008-12-19 20:03:55

detox332
Member
From: University of Pittsburgh
Registered: 2007-06-12
Posts: 63

Re: Dual Booting Windows and Arch (SOLVED!)

i have almost the exact setup as you on my comp...did you install grub to the mbr?


Arch64
KDE4 user

Offline

#3 2008-12-19 20:11:24

flowheat
Member
From: Pittsburgh, PA
Registered: 2008-09-23
Posts: 94

Re: Dual Booting Windows and Arch (SOLVED!)

I think what you're looking for is:

http://www.supergrubdisk.org/

Edit:

After re-reading your post it looks like all you really need to do is install grub to /dev/sda.  That should be your MBR.  You should be able to do that with just the Arch install disk.

Last edited by flowheat (2008-12-19 20:13:42)

Offline

#4 2008-12-19 21:29:16

mongoose088
Member
Registered: 2008-09-14
Posts: 32

Re: Dual Booting Windows and Arch (SOLVED!)

I read up on some documentation of installing GRUB to the MBR.

So far, I went into ArchLive (from the cd) and did the following

grub> root (hd0,1)
grub> setup (hd0)
The installation reports success with no errors, but the problem persists. Arch linux will boot fine, but when I select XP it flashes my configuration, like so:
title Windows XP

rootnoverify (hd0,0)
makeactive
chainloader +1

then kicks me back to the OS select GRUB screen. Did I install it to the wrong place?

EDIT:
I decided to issue this command:
grub> setup(hd0,1)

It reported some errors, then arch couldn't mount the ntfs partition because of possible MFT cluster errors.
Using testdisk, I repaired the boot sector and MFT clusters, then using ArchLive reinstalled grub with grub>(hd0)

Arch and Arch Fallback will boot correctly, but now the windows side shows an error:


rootnoverify (hd0,0)
makeactive
chainloader +1
Loading stage2Read Error (or something to this extent)

I wonder if this error brings me closer or farther to a solution?

Thanks for the replies so far!

Last edited by mongoose088 (2008-12-20 05:41:43)

Offline

#5 2008-12-20 07:11:41

Xauthority
Member
From: ../
Registered: 2008-11-03
Posts: 61

Re: Dual Booting Windows and Arch (SOLVED!)

Hi mongoose088,
grub> setup(hd0,1) was trying to install grub onto your NTFS/WinXP partition, what is not possible because NTFS is not supported from GRUB.

rootnoverify (hd0,0) 
makeactive
chainloader +1
Loading stage2Read Error (or something to this extent)

This is because you have screwed the MBR of your win partition I think, by trying to install Grub on Windows,
I would first try fixmbr from the win install cd and then reinstall grub from the arch install CD http://wiki.archlinux.org/index.php/Reinstalling_GRUB
Hope this helps!

Offline

#6 2008-12-20 17:17:33

mongoose088
Member
Registered: 2008-09-14
Posts: 32

Re: Dual Booting Windows and Arch (SOLVED!)

I used fixmbr from the windows cd, and followed the reinstalling grub wiki to the letter, but I still get a stage2 read error when booting windows.

Supposing all possibilities of getting windows to work are exhausted, how can I safely reinstall windows to a partition? I imagine I just use the windows install disk in some kind of manual mode to set it to a partition, then reinstall grub to the mbr. Of course, that might just lead me back to the same problem big_smile

Offline

#7 2008-12-20 17:25:57

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: Dual Booting Windows and Arch (SOLVED!)

You don't have to worry about picking a partition for Windoze as it pretty much likes to install on the first partition anyway.  If that's your final decision, then reinstall away and then reinstall grub using your arch cd as mentioned above.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#8 2008-12-20 18:29:45

mongoose088
Member
Registered: 2008-09-14
Posts: 32

Re: Dual Booting Windows and Arch (SOLVED!)

I think I'll probably do that then, because it's filled up with all kinds of things I don't use anymore anyway. I'll try it and report what results I get.

EDIT:

I completely formatted the first partition, and using my windows XP cd I reinstalled it to the first partition. Obviously, this got rid of grub, so using the instruction from the wiki on "Reinstalling GRUB" I restored it and now BOTH partitions work flawlessly. Thanks again to the arch community, you guys are really the best!

Last edited by mongoose088 (2008-12-20 21:49:53)

Offline

Board footer

Powered by FluxBB