LinuxQuestions.org
Review your favorite Linux distribution.
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 08-20-2008, 01:22 AM   #1
jnav
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Rep: Reputation: 0
Grub dual boot issue


First off I'd like to state that'd I've read the guides posted on this site and many, many other sites but nothing seems to work.

I'm trying to dual boot XP along with debian 2.6.25-2-amd64. I installed xp first then proceeded to install debian. Since the installation I haven't been able to boot to XP, just debian.

I have three SATA drives: ATA0 = windows partition, then deb partition, then other space; ATA1 = 2 NTFS partitions for files, ATA2 = 1 NTFS partition. The weird thing is when I do fdisk -l I get

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       91201   732572001    7  HPFS/NTFS

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        2677    21502971    c  W95 FAT32 (LBA)
/dev/sdb2            2678       14835    97659135   83  Linux
/dev/sdb3           14836       15443     4883760   82  Linux swap / Solaris

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       16708   134206978+   7  HPFS/NTFS
/dev/sdc2           16709       30401   109989022+   7  HPFS/NTFS
As you can see, that for some reason it "shows" the last drive to be the first one. So I did some digging around and when I look up my device.map file I get
Code:
   
(hd0) /dev/sda  
(hd1) /dev/sdb  
(hd2) /dev/sdc
Which is odd since in my menu.lst has:
Code:
title   Debian GNU/Linux, kernel 2.6.18-6-amd64  
root    (hd0,1)  
kernel  /boot/vmlinuz-2.6.18-6-amd64 root=/dev/sdb2 ro  
initrd  /boot/initrd.img-2.6.18-6-amd64  
savedefault  
   
title   Debian GNU/Linux, kernel 2.6.18-6-amd64 (single-user mode)  
root    (hd0,1)  
kernel   /boot/vmlinuz-2.6.18-6-amd64 root=/dev/sdb2 ro single  
initrd   /boot/initrd.img-2.6.18-6-amd64  
savedefault  
    
title Other operating systems:  
root  
   
title        Microsoft Windows XP Professional  
rootnoverify (hd0,0)  
savedefault  
makeactive  
chainloader   +1
So the menu.lst (and grub) show the "right" order of things but not fdisk/device.map. Anyways, I've tried many different configurations for the MS portion of grub loader and have yet to find one that'll work
 
Old 08-20-2008, 01:28 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Your windows partitions seem to be on different hard drives physically. But in menu.lst under windows title it shows hd0 which infact should be hd2 for you have windows on sdc and your device.map shows sdc to be hd2.
 
Old 08-20-2008, 01:30 AM   #3
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 302

Rep: Reputation: 32
What happens when you try to boot XP?
 
Old 08-20-2008, 01:57 AM   #4
jnav
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
Your windows partitions seem to be on different hard drives physically. But in menu.lst under windows title it shows hd0 which infact should be hd2 for you have windows on sdc and your device.map shows sdc to be hd2.
I'm confused .

I tried following these steps http://www.linuxquestions.org/questi...hooter-278748/ and tried to do
map (hd2) (hd0)
map (hd0) (hd2)

then proceeded to follow the rest of the steps and still got the same thing I usually get, "NTLDR is missing".

Quote:
Originally Posted by checkmate3001
What happens when you try to boot XP?
I either get "NTLDR is missing" or something about "grub and stage 2" (it loads quickly back to grub menu screen) depending on what I've been trying to do in grub.
 
Old 08-20-2008, 06:50 AM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
You need to try

title Windows
root (hd2,0)
map (hd2) (hd0)
map (hd0) (hd2)
makeactive
chainloader +1

Last edited by Larry Webb; 08-20-2008 at 06:52 AM.
 
Old 08-20-2008, 03:20 PM   #6
jnav
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Larry Webb View Post
You need to try

title Windows
root (hd2,0)
map (hd2) (hd0)
map (hd0) (hd2)
makeactive
chainloader +1
Did that, got filesystem type uknown, partition type 0x7

NTLDR is missing.

Is it possible that linux somehow screwed up but grub didn't? It seems like grub loader knows which partition/drive is the correct one (menu.lst) but linux doesn't (fdisk and device.map).
 
Old 08-20-2008, 04:35 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,990

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
I believe the entry should be:
title Windows
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
 
Old 08-20-2008, 09:33 PM   #8
jnav
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
I believe the entry should be:
title Windows
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
Got the same thing, NTLDR is missing.
 
Old 08-20-2008, 11:04 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,063

Rep: Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918Reputation: 1918
That message comes out of the Windoze (partition) boot sector record, so it looks that's intact at least.
As per your first post should work for XP. Did you really install into a FAT32 (rather than NTFS) partition ???.
 
Old 08-20-2008, 11:20 PM   #10
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Dont know if this will help, but it is an observation and assumptions based on
the fdisk listing that was posted.
Hope this is of some help.

Do you know for sure which of the drives that have an hpfs/ntfs file system actually contain the XP bootable system? You wrote that you installed XP first, that means it should be on sda1 - the question is "is it?"

I see from the fdisk listing that sda1 is NOT marked as bootable.

I believe you can do that (mark it bootable) with fdisk

If sda is, indeed, the bootable XP partition, you should not need the grub "map" parameters because xp well be where XP demands it to be and there is no need to try and out-fox it.

Remove the "savedefault" command - after reading the grub doc, I don't see where it does you any good (perhaps even problems)

Also, you probably should use fdisk to make sda1 bootable. The way I read the grub documentation, it doesn't sound like "makeactive" will make sda1 bootable.

Also, please review indicative information in the grub manual.
Here is a link to the grub document
 
Old 08-21-2008, 03:09 AM   #11
jnav
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by garyg007 View Post
Dont know if this will help, but it is an observation and assumptions based on
the fdisk listing that was posted.
Hope this is of some help.

Do you know for sure which of the drives that have an hpfs/ntfs file system actually contain the XP bootable system? You wrote that you installed XP first, that means it should be on sda1 - the question is "is it?"

I see from the fdisk listing that sda1 is NOT marked as bootable.

I believe you can do that (mark it bootable) with fdisk

If sda is, indeed, the bootable XP partition, you should not need the grub "map" parameters because xp well be where XP demands it to be and there is no need to try and out-fox it.

Remove the "savedefault" command - after reading the grub doc, I don't see where it does you any good (perhaps even problems)

Also, you probably should use fdisk to make sda1 bootable. The way I read the grub documentation, it doesn't sound like "makeactive" will make sda1 bootable.

Also, please review indicative information in the grub manual.
Here is a link to the grub document
Yah, I'm pretty sure I installed windows on the first drive first partition. I'm pretty sure since the other drives (NTFS data) I never touched. What I think is wrong is somehow linux thinks that the drive in the ATA0 (OS drive) is sdb instead of sda for some reason, I don't know why.

The good thing is that grub shows things correctly since it correctly states (in menu.lst) that hd0,1 is my linux partition. That's what is so troubling as well since if it sees hd0,1 as the linux partition then it should know that hd0,0 is the windows partition and boot to it.

I've looked over the gnu documents and read the troubleshooting guides as well as the command and I think I should be ok with just doing a rootnoverify (hd0,0) and be good to go, but it just isn't that way for some reason. I've also played with different variations, some with makeactive and some with savedefault and played with different mappings. I'm really dumbfounded.
 
Old 08-21-2008, 10:39 AM   #12
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
FWIW, that seems like a very old version of Debian. You might want to check the Debian website.
 
Old 08-21-2008, 11:54 AM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,990

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Your Grub menu.lst entry shows Debian on (hd0,1) which is the same as sda2.
Your fdisk output shows Debian as sdb2 (hd1,1)
Your Grub menu.lst entry shows windows on (hd0,0) which is the same as sda1.
Your fdisk output shows windows as sdb1 (hd1,0).
fdisk also shows active bootable windows partitions on sdb1 (hd1,0) and sdc1 (hd1,0). It also shows a windows partition on sda1 (hd0,0) which is not marked bootable.

Your boot partition for windows should be on the first partition of one of the drives?? Did you have all three drives connected when you installed xp? when you installed Debian?

How big is your FAT32 partition? I recall reading on a microsoft support site that booting xp from a FAT32 partition is problematic if the partition is over 32GB.

Last edited by yancek; 08-21-2008 at 11:56 AM.
 
Old 08-21-2008, 12:08 PM   #14
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
based on the fdisk and device.map info you show your linux partition is (hd1,1)
which is /dev/sdb2. Take a look at the menu.lst posted - look at the "kernel" line it shows root=/dev/sdb2 - this is consistant.

Are those sata drives connected to the sata ports on the motherboard, or are they connected to the IDE ports thru an adaptor?

Have you moved any cables?

I'm going to take another look at the grub docs and see if I can find anything else.

Last edited by garyg007; 08-21-2008 at 12:57 PM.
 
Old 08-21-2008, 12:55 PM   #15
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Try This: First using fdisk, make /dev/sda bootable then change menu.lst to show this for booting XP
Code:
title        Microsoft Windows XP Professional  
rootnoverify (hd0,0)  
chainloader   +1
 
  


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
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 02:44 PM
SuSE 9.1 XP Dual boot issue… Hung at < loading Grub > LinuxHawk Linux - General 1 10-29-2004 03:09 AM
Dual boot issue w/ WinXP Pro & Mandrake 10 using GRUB Adam A Flynn Linux - General 6 06-08-2004 10:05 PM
Grub dual boot issue simvan Linux - Newbie 8 06-04-2004 05:13 AM
Trying to dual-boot XP and RH9 with GRUB...GRUB stops right after BIOS EvilYoda Linux - Newbie 5 06-20-2003 04:38 PM


All times are GMT -5. The time now is 10:13 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