Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual boot - Windows finds NTLDR on wrong disk
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1579
Location: Adelaide/Australia

PostPosted: Fri Mar 25, 2011 1:38 am    Post subject: Dual boot - Windows finds NTLDR on wrong disk Reply with quote

I am having a world of pain with my Gentoo/Windows dual boot.

It works, but windows is looking for NTLDR on a disk which is not the windows boot disk. Whilst it works, I want to re-use that disk for a real OS, ie, Gentoo 64 bit, but until I sort out my dual boot issue, I can't do this.

I have 4 physical SATA disks installed, 2x750G and 2x1TB

I have currently setup the 2x750G as a software mirror for my linux parititions on these disks, for a total of around 150G, the remaining 500G is partitioned as NTFS and not raided. I did this so I would have some space for windows apps, as windows can't access my linux partitions. Also, I didn't use hardware raid or raid the NTFS partitions, one, because I couldn't get windows and linux to agree that they where raided and secondly, windows is unimportant to me so it didn't need the redundancy.

The remaining 2x1TB drives currently have windows XP installed on one and the other is the one I am about to try re-use.

The thing is, in order to install windows, I had to unplug my linux 750G drives, otherwise, windows wanted to take them over. Once the install was finished, I re-plugged in my linux drives, tweaked my grub and off I went.

The problem is, it appears that the 1TB drive that does NOT have windows on it seems to have the NTLDR on it and I can't seem to convince windows otherwise.

The only difference between the two disks MBR is the partition table and disk serial number.
/dev/sdd drive unique code, as per http://en.wikipedia.org/wiki/Master_boot_record#Disk_identity

A summary of my disks is as follows :-
Code:

/dev/sda1 - mirrored Linux Partition
/dev/sda2 - mirrored Linux Partition
/dev/sda3 - mirrored Linux Partition
/dev/sda4 - unmirrored NTFS Partition
/dev/sdb1 - Fully NTFS - this is the one I want to re-use
/dev/sdc1 - mirrored Linux Partition
/dev/sdc2 - mirrored Linux Partition
/dev/sdc3 - mirrored Linux Partition
/dev/sdc4 - unmirrored NTFS Partition
/dev/sdd1 - Fully NTFS - this is my windows system disk


My BIOS has the 750G drives first, followed by the 1TB drives second, which corresponds to how they are plugged into the computer physically - it's a bit difficult matching the BIOS codes to the physical drive.


Part of my GRUB configuration is as follows :-
Code:

# Boot automatically after 10 secs.
timeout 10

# By default, boot the first entry.
default 0

# Fallback to the second entry
fallback 1


title  Gentoo Linux
root (hd0,0)
kernel (hd0,0)/vmlinuz  root=/dev/md2 video=uvesafb:1280x1024-32@75,mtrr:3,ywrap fbcon=scrollback:64K vmalloc=192M

# For booting Windows
title Windows XP Pro (works)
map (hd0) (hd3)
map (hd3) (hd0)
rootnoverify (hd3,0)
makeactive
chainloader  +1


My Grub Device map file (/boot/grub/device.map) is as follows
Code:

(hd0)   /dev/sda
(hd1)   /dev/sdb
(hd2)   /dev/sdc
(hd3)   /dev/sdd
(hd4)   /dev/sde


The problem is, this grub config loads up the NTLDR on /dev/sdb1, using the BOOT.INI, which contains
Code:

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(2)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(2)partition(1)\WINDOWS="Microsoft Windows XP Pro (Disk_04!! booting to disk 2 - dont want this)" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Pro (disk 0)" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Pro (disk 1)" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(3)partition(1)\WINDOWS="Microsoft Windows XP Pro (disk 3)" /noexecute=optin /fastdetect


I want it to find the NTLDR on /dev/sdd1.

My full disk configuration is as follows :-
Code:

root@lyalls-pc:tmp
# fdisk -l /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7e7728fe

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048  1953521663   976759808    7  HPFS/NTFS
# fdisk -l /dev/sdd

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x751850fa

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *          63  1953503999   976751968+   7  HPFS/NTFS
root@lyalls-pc:tmp
#

The other two disks, that form part of my linux setup are as follows, FYI
Code:

root@lyalls-pc:tmp
# fdisk -l /dev/sda

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x25642ced

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      257039      128488+  fd  Linux raid autodetect
/dev/sda2          257040      755054      249007+  fd  Linux raid autodetect
/dev/sda3          755055   250758584   125001765   fd  Linux raid autodetect
/dev/sda4       250758585  1465144064   607192740    7  HPFS/NTFS

root@lyalls-pc:tmp
# fdisk -l /dev/sdc

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xcf13089a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *          63      257039      128488+  fd  Linux raid autodetect
/dev/sdc2          257040      755054      249007+  fd  Linux raid autodetect
/dev/sdc3          755055   250758584   125001765   fd  Linux raid autodetect
/dev/sdc4       250758585  1465144064   607192740    7  HPFS/NTFS




And, just for completeness, the partitions /dev/sda1, sda2, sda3 are mirrored to sdc1, sdc2 and sdc3, as folows:-
Code:

root@lyalls-pc:tmp
# mdadm --detail /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Sun May  4 02:03:42 2008
     Raid Level : raid1
     Array Size : 128384 (125.40 MiB 131.47 MB)
  Used Dev Size : 128384 (125.40 MiB 131.47 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Mar 24 02:41:22 2011
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 8713277e:a5a53e53:6380bb51:d558465e
         Events : 0.534

    Number   Major   Minor   RaidDevice State
       0       8       33        0      active sync   /dev/sdc1
       1       8        1        1      active sync   /dev/sda1
root@lyalls-pc:tmp
# mdadm --detail /dev/md2
/dev/md2:
        Version : 0.90
  Creation Time : Sun May  4 02:03:53 2008
     Raid Level : raid1
     Array Size : 248896 (243.10 MiB 254.87 MB)
  Used Dev Size : 248896 (243.10 MiB 254.87 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Fri Mar 25 11:48:23 2011
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 044822e8:930680c9:c5575e94:a15fe948
         Events : 0.29899

    Number   Major   Minor   RaidDevice State
       0       8       34        0      active sync   /dev/sdc2
       1       8        2        1      active sync   /dev/sda2
root@lyalls-pc:tmp
# mdadm --detail /dev/md3
/dev/md3:
        Version : 0.90
  Creation Time : Sun May  4 02:04:01 2008
     Raid Level : raid1
     Array Size : 125001664 (119.21 GiB 128.00 GB)
  Used Dev Size : 125001664 (119.21 GiB 128.00 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 3
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Fri Mar 25 11:48:33 2011
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : a17f1555:48da1c4a:9d47f984:1186b778
         Events : 0.2038536

    Number   Major   Minor   RaidDevice State
       0       8       35        0      active sync   /dev/sdc3
       1       8        3        1      active sync   /dev/sda3
root@lyalls-pc:tmp
#


/dev/md1 is my /boot partition
/dev/md2 is my /root partition
/dev/md3 is my LVM partition - where all my other filesystems live
_________________
...Lyall


Last edited by lyallp on Fri Mar 25, 2011 7:27 am; edited 1 time in total
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1261
Location: Idaho, USA

PostPosted: Fri Mar 25, 2011 5:53 am    Post subject: Reply with quote

I'm confused as to which version of Windows you're trying to install. The only two I know of that do this are the NT6 series (Vista and 7).
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1579
Location: Adelaide/Australia

PostPosted: Fri Mar 25, 2011 6:10 am    Post subject: Reply with quote

Windows XP, it's already installed, works, dual boots. It's just finding the NTLDR on the wrong disk...
_________________
...Lyall
Back to top
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1261
Location: Idaho, USA

PostPosted: Fri Mar 25, 2011 6:39 am    Post subject: Reply with quote

What does \boot.ini say?
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1579
Location: Adelaide/Australia

PostPosted: Fri Mar 25, 2011 7:28 am    Post subject: Reply with quote

As mentioned in the original message (I edited it to specifically state BOOT.INI)

The problem is, this grub config loads up the NTLDR on /dev/sdb1, using the BOOT.INI, which contains
Code:

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(2)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(2)partition(1)\WINDOWS="Microsoft Windows XP Pro (Disk_04!! booting to disk 2 - dont want this)" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Pro (disk 0)" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Pro (disk 1)" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(3)partition(1)\WINDOWS="Microsoft Windows XP Pro (disk 3)" /noexecute=optin /fastdetect

_________________
...Lyall
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Tue Mar 29, 2011 11:34 pm    Post subject: Reply with quote

So edit your boot.ini file and remove the offending entry.
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1579
Location: Adelaide/Australia

PostPosted: Tue Mar 29, 2011 11:50 pm    Post subject: Reply with quote

I have another BOOT.INI on another disk, which is the one I want. Hence, I identified the one I don't want, so I know I am finding the right/wrong one.

If I remove or change the current BOOT.INI in any way, the windows system won't boot.

I think the problem is the arrangement of disks such that the MBR is looking in the primary interface, when the windows disk is in the secondary (or something similarly obscure).

My current feeling is I will have to re-arrange the physical plugs of the disks, potentially lose grub, temporarily, and re-install grub using the rescue disk. I just don't want to screw my system over completely.
_________________
...Lyall
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Wed Mar 30, 2011 12:01 am    Post subject: Reply with quote

Why?

Go into bios, turn off all the disks that don't have windows on them.
Boot up to your windows disk, and start the recovery console and tell it to repair the installation.

Then, it should reset up your MBR and boot.ini, and everything else.

After that, make sure that windows boots up, then, reboot to the bios, turn the other disks back on, and you should be good.
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1579
Location: Adelaide/Australia

PostPosted: Wed Mar 30, 2011 4:43 am    Post subject: Reply with quote

This is basically how I ended up in this situation.
I unplugged my Linux disks so windows would leave them alone, I installed windows then re-enabled my linux disks and twiddled things till things booted.
Unplugging/disabling the linux disks simply leaves me with a working, bootable windows. nothing to repair. It's the fact that the windows disks are being shuffled around after I re-enable the linux disks, and I think windows is expecting to find itself in a particular place, that is my problem.
_________________
...Lyall
Back to top
View user's profile Send private message
Knute
Guru
Guru


Joined: 28 Jun 2004
Posts: 362
Location: Fargo, ND

PostPosted: Wed Mar 30, 2011 12:29 pm    Post subject: Reply with quote

Windows expects to find itself on the first partition of the first disk in the system.

From what you said, you left sdb and sdd active when you loaded windows. If you disable sdb as well, then windows should stop booting, and therefore there would be something to fix. Right?
_________________
Knute
----------
The human race has one really effective weapon, and that is laughter.
-- Mark Twain

If you want proof of that, take a look at windows sometime. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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