LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 05-11-2005, 09:20 PM   #1
ridensnow23
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
Trouble booting new SATA partition with Grub


This past week I bought a new SATA drive and loaded Windows Server 2003 on it. However, I have played around in grub.conf and I cannot seem to get it to boot the Server 2003 partition. Please help!

Drive info:

Primary IDE channel - 40 gig driver
-Partition 1: Windows XP
-Partition2: Fedora

Secondary IDE channel - 80 gig
-Partition 1: Data (No OS)
-Partition 2: Data (No OS)

SATA Channel 0 - 250 gig
Partition 1: Windows Server 2003

fdisk -l
Disk /dev/hda: 40.0 GB, 40019582464 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 4737 17567077+ 83 Linux
/dev/hda3 4738 4865 1028160 82 Linux swap

Disk /dev/hdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 4863 39062016 c W95 FAT32 (LBA)
/dev/hdc2 4864 9729 39086145 f W95 Ext'd (LBA)
/dev/hdc5 4864 9729 39086113+ b W95 FAT32

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3188 25607578+ 7 HPFS/NTFS


Grub.conf:

#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title WinXP
rootnoverify (hd0,0)
chainloader +1
title Windows Server 2003
rootnoverify (hd2,0)
chainloader +1
title Fedora Core (2.6.10-1.770_FC3)
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-1.770_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.10-1.770_FC3.img
title Fedora Core (2.6.10-1.766_FC3)
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-1.766_FC3 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.10-1.766_FC3.img
title Fedora Core (2.6.9-1.667)
root (hd0,1)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img

Update:

I think this is becoming more of a Windows issue than a Linux issue. Having grub boot the (hd2,0) partition causes WinXP to boot. I apologize for bringing Micro$ related questions into the forum.

Last edited by ridensnow23; 05-12-2005 at 09:36 AM.
 
Old 05-12-2005, 02:47 PM   #2
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Does win2003 have the same restriction as other forms of windows, that windows can only boot from the first drive? Booting xp when calling win2003 from grub makes it sound like that is the case for win2003.

If this is the case, then use the grub map commands to fool win2003 into thinking it’s on the first drive.

grub.conf:
...
title Windows Server 2003
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd0,0) # this may need to be rootnoverify (hd2,0)
chainloader +1
makeactive
boot
...

I can never remember which rootnoverify is correct after mapping the drives, so if (hd0,0) doesn’t work, try (hd2,0).

These and other good info can be found in the Grub Manual (http://www.gnu.org/software/grub/manual/grub.html). It’s always a good idea to make a grub boot floppy to speed up the testing/configuration when having grub problems (see “Creating a GRUB boot floppy”).

An alternative method for getting two forms of windows and linux to boot is to use BootMagic, which is part of the Symantec PartitionMagic package.
 
Old 05-12-2005, 03:56 PM   #3
ridensnow23
LQ Newbie
 
Registered: May 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Success!

I copied the text right out of your post and it worked.

My Fedora is off to you WhatsHisName.

Thanx
 
Old 05-21-2005, 04:46 PM   #4
Martin0
LQ Newbie
 
Registered: May 2005
Posts: 5

Rep: Reputation: 0
I too am trying to dual boot Windows Server 2003 on a system that already has Fedora Core 3 installed, using grub.

My first hard disk has Linux on it. I want to install Windows on my second hard disk.
My DVD drive is my 3rd IDE device.

I have been following the guide notes at http://www.tldp.org/HOWTO/Linux+Win9...OWTO/proc.html

I have extended my grub.conf like so...


title Windows 2003 Server
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader +1
title Windows 2003 DVD
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd2)+1

However when I select the DVD option, I get
"Error 21: Selected disk does not exist"

This is in response to the chainloader line I think, because if I remove the two map commands for the DVD option, I still get this message.

I don't know if it's something to do with the DVD being a weird Microsoft format or what.

I guess I could temporarily make IDE1 be IDE0 and install Windows directly (without grub). I don't know what that will do with the activation/hardware configuration association.

Anyone been here?
Thanks
Martin
 
Old 05-21-2005, 06:53 PM   #5
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Martin0: If you are asking how to install windows on the second drive with FC3 on the first drive, then you will save yourself a lot of headaches by (1) disconnecting the FC3 drive (i.e., physically disconnect either the power or IDE cable), (2) installing windows on the extra drive and then (3) reconnecting the FC3 drive as the first drive, in that order.

That way, windows will be happy during the installation and you will not alter the Grub modified MBR on the FC3 drive. The bonus to doing it this way is that you can select the second drive as the first bootable BIOS drive and boot into Win2003 directly without involving Grub, if you want or ever need to.

I have set up several dual boot systems this way and it really gives you a nice back door into windows when something goes wrong on the linux drive.
 
Old 05-27-2005, 04:04 PM   #6
Martin0
LQ Newbie
 
Registered: May 2005
Posts: 5

Rep: Reputation: 0
Thanks WhatsHisName, I've taken the short cut you suggest. This works in getting my Windows 2003 installed. Unfortunately when I go back to linux (having restored my original primary IDE drive), I find I need to restore my master boot record. Once I restore the MBR, get my modified grub boot menu, I can then boot linux again. Also I can boot Windows 2003 instead. But once I boot Windows my MBR gets corrupted again.

I think I have no choice but to make Windows 2003 my permanent physical primary IDE, and use the NTLDR boot loader instead of grub :-(

Thanks
Martin
 
Old 05-27-2005, 05:24 PM   #7
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Grub administration is a little easier if you have windows on the first drive, but you should be able to put it on the second drive. It is fairly easy to start the Grub boot process from windows by modifying c:\boot.ini.

The reason for your MBR problem isn’t obvious to me. There may be some oddity about win2003. Check at the BIOS level whether the first bootable hard drive is the one containing FC3. While you had one drive disconnected, the hard drive boot order might have changed.
 
Old 05-28-2005, 03:18 PM   #8
Martin0
LQ Newbie
 
Registered: May 2005
Posts: 5

Rep: Reputation: 0
The BIOS boot sequence looks correct.

So I'm going ahead with making Win2003 disk IDE1 and Linux FC3 disk IDE2.

One question now is how change where grub is installed on my FC3 disk. Is was in the mbr, but I think it now needs to be in the 1st sector of /boot.

Would things work if I just swapped the two disks physically and copied the FC3 mbr to a file on my Win disk and referenced that file from ntldr boot.ini? Ie is there something in the mbr that knows (thinks) it is IDE0?

Thanks again
Martin
 
Old 05-28-2005, 04:30 PM   #9
Martin0
LQ Newbie
 
Registered: May 2005
Posts: 5

Rep: Reputation: 0
Well that plan seems stuffed. Whether I fix jumpers to force master/slave or go for cable select, I can't swap the drives on my IDE cable.

Game over. :-(

Martin
 
Old 05-29-2005, 01:15 PM   #10
Martin0
LQ Newbie
 
Registered: May 2005
Posts: 5

Rep: Reputation: 0
Interestingly, if I control the IDE device to boot from in my BIOS setup, I can switch between Windows and Linnux without any corruption. This implies I either made a mistake with my grub config or (I feel more likely) the modes in grub config don't have the same effect as modifying the BIOS throuh setup.

Martin
 
  


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
Installed FC4 on new SATA HD, trouble booting. cornfed Linux - Hardware 1 08-08-2005 10:29 AM
Grub not booting with Sata on fresh Gentoo install jxbryan Linux - Software 2 03-08-2005 07:02 PM
Setting up GRUB to boot a SATA partition ShastaMaroon Linux - General 2 10-27-2004 01:02 PM
vFat partition trouble on SATA drive WarmFlatSprite Linux - Hardware 4 09-28-2004 09:35 PM
Booting Win2k from Grub SATA issue davnetuk Fedora 2 08-01-2004 09:25 AM


All times are GMT -5. The time now is 04:29 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration