Has anyone else had trouble using GRUB to load Windows NT when the numbering of the disk partitions does not match the layout? I am becoming convinced that there is a bug in GRUB that prevents it from booting NT on my configuration. I have experimented with various options. However, I realize I am just learning, and have a long way to go, so it may just be me doing something stupid. But I can't think of what! Here are the gory details (I know its long, but I tried a lot of things)!
I really would appreciate any suggestions anyone can offer!
I have an old Dell Inspiron laptop with Windows NT on it. I want to make it a dual boot machine with the Windows NT and Fedora Linux distributions. Unfortunately, I do not have the NT installation disks, since I inherited this machine.
The NT installation is just over 8GB i.e. it just crosses the 1024 cylinder limit. I have an additional 10GB of free space after this partition. I do not want to reduce the size of the NT partition further. I cannot load Linux and make it a bootable partition after the NT partition because it is beyond cylinder 1024. The entire disk upto the end of the NT partition has the HPFS and NTFS file systems (no FAT). After reading on boot loaders and partitions, here is what I thought would work:
1) Move the NTFS partition (an NT installation) out by about 100MB using Partition Resizer v1.3.4 ( found at zeleps dot com (since I can't post a URL yet!)), to create about 100MB of free space at the start of the disk.
2) Install linux with /boot in this 100MB at the start of the disk and the rest of it beyond the NT partition. As part of this, GRUB was installed as the boot loader in the MBR.
3) Modify the Windows boot.ini (using Capture). Modify the Windows NT boot entry to be multi(0)disk(0)rdisk(0)partition(2) instead of
4) Configure the GRUB bootloader to load allow selection of Windows NT or Linux. I don't remember the details of the commands, but it doesn't matter too much now since its redundant with some of the items described below.
5) At the end of this, I could boot Linux, but not NT (just resulted in a blank screen with cursor in top left corner). I am not sure where the problem was. I suspect it could be in the way the hard disks are numbered, because the NT partition was still showing as hda1 and the /boot as hda2 though the /boot was located before the NT one. This is maybe the way presizer leaves it after moving the partition, and I am not sure if this causes problems.
6) I undid these changes by deleting /boot, running the Fedora install to put it after the NT installation and then using presizer to move the NT partition back to the start of the disk. I also fixed the boot.ini file to refer to the first partition, and replaced GRUB in the MBR with the MBR written by fdisk. The system will now boot to Windows NT, but has no Linux. At this point, the boot loader on my laptop is the boot loader installed by fdisk/mbr.
7) I prepared a GRUB boot disk and was able to boot into NT using the commands:
title Windows NT Test 1
8) I then moved my Windows NT partition out by about 100MB to make space for the Linux /boot filesystem using Partition Resizer v1.3.4 as before, and tried to boot into Windows NT using GRUB as before. This did not work although I tried numerous variations of the (hd0,0) parameter above. Note that the machine was not bootable at all when I did this, presumably since the Windows NT boot files (ntldr, boot.ini, etc) are not physically where they are expected to be.
9) I moved the Windows NT partition back, booted into it and prepared a Windows NT boot disk using format a: /u, and copied the ntldr, ntdetect.com and boot.ini files onto this disk.
10) I moved the Windows NT partition out by 100 MB again, and was able to boot into it using the newly prepared Windows NT boot disk. I had to specify the first partition on the first HD to be able to do this in the boot.ini file:
multi(0)disk(0)rdisk(0)partition(1)\WINNT="NT, First harddisk, first partition" /sos
11) I installed Linux (Fedora) with /boot in the 100MB free at the start of the disk, and the rest of it beyond the Windows NT. I replaced the laptop boot loader with GRUB. I was able to boot into Linux when I did this. However, I still cannot boot into Windows NT with GRUB. I see the GRUB commands and then just a black screen with the cursor in the top left.
12) It seems to me that GRUB is not able to chainload the ntldr if the Windows partition is not at the start of the disk, because I do not see any of the options in my boot.ini ever show up. I am not sure why this should be. It may have something to do with the way my partitions are numbered after Partition Resizer v1.3.4 moved them - they are not sequential by location - instead they are sequential by creation order. Running parted produces an error about not being able to align the partition properly and shows the following geometry. As you can see, partitions 1 and 2 are not numbered in the same order as their location on the disk. I do not know if this causes GRUB any heartache, but the NT loader seems to do fine with it.
Disk geometry for /dev/hda: 0.000-19077.187 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
2 0.031 101.975 primary ext3
1 102.006 8103.098 primary ntfs boot
3 8103.098 18567.312 primary ext3
4 18567.312 19077.187 extended lba
5 18567.343 19077.187 logical linux-swap
13) I can't think of what else to try with GRUB. My grub.conf is attached, and none of these options work. I guess the next thing I will try is to see if I can boot into Linux from my NT boot disk. If that works, I guess I could copy the NT loader to the MBR and use it to boot both systems. But this defeats the intention - I WANT to be able to use GRUB to boot both systems, because that is GRUB's stated purpose (Grand UNIFIED Boot Loader!). If it cannot do so, it is a bug and needs to be fixed. I am also uncomfortable with having to rely on a proprietary tool to allow me to use linux and another system on the same machine, more from the principle than anything else.
14) I NEED HELP! Any suggestions welcome.
=========Here is my grub.conf===========
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
title Fedora Core (2.4.22-1.2188.nptl)
kernel /vmlinuz-2.4.22-1.2188.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
title Windows NT Test 1
title Windows NT Test 2
title Windows NT Test 3
title Windows NT Test 4
=========End of my grub.conf===========