LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-08-2004, 07:10 PM   #1
SanjayPethe
LQ Newbie
 
Registered: May 2004
Location: Houston, TX
Distribution: Fedora
Posts: 1

Rep: Reputation: 0
Trouble using GRUB to load Windows NT


Hi,
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
multi(0)disk(0)rdisk(0)partition(1).

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
root (hd0,0)
makeactive
chainloader +1
boot

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.

Sanjay

=========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
#boot=/dev/hda
default=0
timeout=10
splashimage=(fd0)/boot/grub/splash.xpm.gz
title Fedora Core (2.4.22-1.2188.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2188.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2188.nptl.img
title Windows NT Test 1
root (hd0,0)
makeactive
chainloader +1
boot
title Windows NT Test 2
root (hd0,1)
makeactive
chainloader +1
boot
title Windows NT Test 3
rootnoverify (hd0,0)
makeactive
chainloader +1
boot
title Windows NT Test 4
rootnoverify (hd0,1)
makeactive
chainloader +1
boot

=========End of my grub.conf===========
 
Old 05-08-2004, 08:33 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
What you've done, seems logical, but a few things...

Windows still thinks its on C (hda1) or the first partition of the disk, you've moved it so it can't find itsself ( It asking for files from C(hda1) but now its on D(hda2) ).

So you have to trick windows into think its still at the beginning try

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

The map commands swap the two partitions around in setup so windows still thinks its at the beginning of the disk.

Also the 1024 limit was on old computers. This is no longer a problem on newer computers. ( my /boot is half way across a 40Gb disk ).

The screw up with paritions I'm not sure about. But because the NT was just moved it keeped its partition number ( already 1 ) so two is of course the second created.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB doesn't load Windows XP Vladk1000 Linux - Newbie 4 09-17-2005 04:08 AM
GRUB won't load Windows Norab Linux - Hardware 1 08-19-2005 02:33 PM
Windows XP doesn't load with Grub (Suse 9.2) soldeace Linux - General 17 12-02-2004 11:04 PM
Unable to load Windows XP using GRUB TheDevo Fedora - Installation 11 11-04-2004 11:16 PM
configuring GRUB to load windows merlin371 Linux - General 1 02-28-2004 11:38 AM


All times are GMT -5. The time now is 08:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration