LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-16-2005, 10:31 AM   #1
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Grub difficulty chainloading 2000 and XP


Hi folks,

I've had my system running for a while and can currently load all four of my installed OSes, but I'm not satisfied with the current configuration. I have Windows 2000Pro, XP Pro, SuSE 8.0 and Debian installed, plus a few data partitions. The Windows OSes are on hda, and the Linux on hdb. GRUB is on the MBR. Here is my fdisk -l output:

Code:
Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        3134    25173823+   7  HPFS/NTFS
/dev/hda2            3135        6268    25173855    f  W95 Ext'd (LBA)
/dev/hda3            6269        9825    28571602+   7  HPFS/NTFS
/dev/hda4            9826        9956     1052257+   c  W95 FAT32 (LBA)
/dev/hda5            3135        6268    25173823+   7  HPFS/NTFS

Disk /dev/hdb: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1         122      979933+  83  Linux
/dev/hdb2             132        1568    11542702+  83  Linux
/dev/hdb3            1569        1690      979965   82  Linux swap
/dev/hdb4            1691        4982    26442990    f  W95 Ext'd (LBA)
/dev/hdb5            1691        2663     7815591   83  Linux
/dev/hdb6            2664        3514     6835626   83  Linux
/dev/hdb7            3515        4365     6835626   83  Linux
/dev/hdb8            4366        4730     2931831   83  Linux
/dev/hdb9            4731        4982     2024158+  83  Linux
Here is what /boot/grub/menu.lst looks like:

Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
default		0
timeout		20
color cyan/blue white/blue

title		Debian GNU/Linux, kernel 2.6.8-1-686-smp 
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.8-1-686-smp root=/dev/hdb1 ro 
initrd		/boot/initrd.img-2.6.8-1-686-smp
savedefault
boot

title		Debian GNU/Linux, kernel 2.6.8-1-686-smp (recovery mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.8-1-686-smp root=/dev/hdb1 ro single
initrd		/boot/initrd.img-2.6.8-1-686-smp
savedefault
boot

title		Debian GNU/Linux, kernel 2.6.8-1-386 
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.8-1-386 root=/dev/hdb1 ro 
initrd		/boot/initrd.img-2.6.8-1-386
savedefault
boot

title		Debian GNU/Linux, kernel 2.6.8-1-386 (recovery mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.8-1-386 root=/dev/hdb1 ro single
initrd		/boot/initrd.img-2.6.8-1-386
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title		Windows 2000 Pro
root		(hd0,0)
savedefault
makeactive
chainloader	+1


# This entry manually added for /dev/hda3 (WinXP)
title		Windows XP Pro
rootnoverify	(hd0,2)
savedefault
makeactive
chainloader	+1


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb2.
title		SuSE 8.0 Pro (on /dev/hdb2)
root		(hd1,1)
kernel		/boot/vmlinuz root=/dev/hdb2 ro append = "acpismp=force hdd=ide-scsi 
initrd		/boot/initrd
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb2.
title		failsafe (on /dev/hdb2)
root		(hd1,1)
kernel		/boot/vmlinuz.suse root=/dev/hdb2 ro append = "ide=nodma apm=off acpi=off  acpismp=force hdd=ide-scsi 
initrd		/boot/initrd.suse
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb2.
title		memtest86 (on /dev/hdb2)
root		(hd1,1)
kernel		/boot/memtest.bin ro 
savedefault
boot

GRUB successfully chainloads Win 2000 Pro, but it doesn't work for XP. The way I currently load XP is to select Win2k from GRUB, because I have a boot.ini installed that knows about XP. So I have to go through two menus to get to XP, which currently is my most-used OS.

After reading some more of the GRUB documentation, I suspect the problem lies with the use of makeactive, for which the doc says "Set the active partition on the root disk to GRUB's root device. This command is limited to primary PC partitions on a hard disk." The footnote also says it's not necessary for most modern OSes.

What I am going to do next is remove the makeactive flag from menu.lst and try it again. What I don't recall is whether the XP partition is a primary partition or a logical one. (I used to know a lot more about this stuff, but I've forgotten a lot and it takes a lot of time to refresh.)

So, a few questions:

1. How can I check whether XP is on a primary or logical partition? (Does this have anything to do with the * or + symbols in the fdisk output?)

2. If removing the makeactive flag doesn't allow GRUB to chainload XP, what steps can I take to get it to do so?

3. What on earth is the /dev/hda5? I know of no such partition. In the Windows world, on hda I have C:\ with Win2k,
D:\ as a data partition, G:\ as XP and H:\ as a 1GB FAT32 data partition (for file-sharing with Linux). Could it just be unpartitioned space? Why does it have so many blocks?


Of course, question 2 is the most important.

Thanks,
Mike
 
Old 05-16-2005, 10:40 AM   #2
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Original Poster
Rep: Reputation: 39
Removed the makeactive flag, still didn't work. The error I get is as follows:

NTLDR is missing

I assume that NTLDR is the NT loader that GRUB expects to chainload.
 
Old 05-17-2005, 12:41 AM   #3
JrLz
Member
 
Registered: Mar 2004
Location: Jakarta
Posts: 164

Rep: Reputation: 30
for Windows, which one did you install last?
Win2000 or XP? I'm guessing it's 2000
if you installed XP first, then 2000, then you're booting using
win2000 boot files, so you must use it to boot your XP.
you just can't boot XP straight with that........

2. never found one, (if you installed 2000 later )....
don't really know, never 4-boot like you did........

1&3. you have 3 prim partitions , and 1 extd ,with 1 logical drive
/dev/hda2 3135 6268 -->extended
/dev/hda5 3135 6268 --> ntfs
your extended partition contains 1 logical drive --> hda5
starts & ends the same right? that's your extd boundary
to see what's inside hda5, you can mount it and look at it
remember , it's ntfs, make sure your kernel support it/ use
ntfs module
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Boot difficulty related to Grub and fstab? ? jiapei100 Linux From Scratch 1 02-26-2005 07:07 AM
dualboot grub chainloading copy and paste no success amarillo Linux - Distributions 4 02-23-2005 08:52 PM
Difficulty with compatibility of Grub and System Commander romad9989 Linux - Software 1 11-01-2004 07:56 PM
Difficulty setting up BT Voyager 2000 Wireless on Slackware 10.0 Apocalypse King Linux - Hardware 0 09-21-2004 12:57 PM
grub and second linux, chainloading lacrimae Linux - Software 4 07-15-2002 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:25 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration