LinuxQuestions.org
Help answer threads with 0 replies.
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 01-06-2009, 04:43 PM   #1
etcetera
Member
 
Registered: Aug 2004
Posts: 107

Rep: Reputation: 15
How to dual boot Unix and Windows - grub configuration


The box is Sun Ultra 40. It has 3 disks:
1st with Solaris 10
2nd also Solaris 10 (mirror of 1st)
3rd has Windows XP

I want to boot into Solaris by default and chose Windows XP if I have to. (Might add the 4th disk with Linux)

How do I edit /boot/grub/menu.lstn file to reflect this? Does this look like a good entry?

title Windows
root (hd2,0)
chainloader +1

#: bootadm list-menu
The location for the active GRUB menu is: /boot/grub/menu.lst
default 0
timeout 10
0 Solaris 10 5/08 s10x_u5wos_10 X86
1 Solaris failsafe



Here are the disks:

#: format
Searching for disks...done

c1t2d0: configured with capacity of 136.71GB

AVAILABLE DISK SELECTIONS:
0. c1t0d0 <DEFAULT cyl 36469 alt 2 hd 255 sec 63>
/pci@0,0/pci10de,376@a/pci1000,3150@0/sd@0,0
1. c1t1d0 <DEFAULT cyl 36469 alt 2 hd 255 sec 63>
/pci@0,0/pci10de,376@a/pci1000,3150@0/sd@1,0
2. c1t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@0,0/pci10de,376@a/pci1000,3150@0/sd@2,0
Specify disk (enter its number): ^D

Last edited by etcetera; 01-06-2009 at 04:50 PM.
 
Old 01-07-2009, 09:27 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,330

Rep: Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404
If you have Grub installed to the master boot record and your windows is on the first partition of the third drive, the entry you have below should work:

title Windows
root (hd2,0)
chainloader +1

I don't know what the rest of the information pertains to?
 
Old 01-07-2009, 09:38 AM   #3
etcetera
Member
 
Registered: Aug 2004
Posts: 107

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by yancek View Post
If you have Grub installed to the master boot record and your windows is on the first partition of the third drive, the entry you have below should work:
OK thanks
How do I know if Grub is installed in the master boot record?
I think it is, because what's in that config file, I get prompted every time it boots.
 
Old 01-07-2009, 10:50 AM   #4
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Unfortunately Windows does not like to be booted from a drive other than the first drive in the BIOS boot order or (hd0), so to boot Windows from (hd2) you usually need to use Grub's mapping technique:
Code:
title Windows
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
Also, using the above notation specifies the Windows partition directly with (hd2,0), so fortunately Grub does not have to be installed to the MBR of your Windows drive. The above entry assumes that Windows is on the 3rd drive in the BIOS order, so if your Windows drive is instead 2nd in the BIOS boot order you could use:
Code:
title Windows
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
Usually the easiest way to know for sure is to just try both entries above and see which works. Let us know how it goes or if you run into problems.
 
Old 01-08-2009, 12:40 AM   #5
etcetera
Member
 
Registered: Aug 2004
Posts: 107

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by CJS View Post
Unfortunately Windows does not like to be booted from a drive other than the first drive in the BIOS boot order or (hd0), so to boot Windows from (hd2) you usually need to use Grub's mapping technique:
Code:
title Windows
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
problems.
Thank you! That was exactly what I needed. Now it dual boots into both OS. Can you explain the above "map" commands?

Should be easy to add another hard drive to GRUB with any flavor of Linux.

I wonder if I should upgrade to a newer version of GRUB, mine is 0.95.
 
Old 01-08-2009, 07:50 AM   #6
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Quote:
Originally Posted by etcetera View Post
Thank you! That was exactly what I needed. Now it dual boots into both OS. Can you explain the above "map" commands?

Should be easy to add another hard drive to GRUB with any flavor of Linux.

I wonder if I should upgrade to a newer version of GRUB, mine is 0.95.
If you plan on trying out some distros like Ubuntu's latest Intrepid release, then it would be a good idea to upgrade your Grub to 0.97.29.19 or later so that it supports the newer ext3 partitions that use a 256 byte inode size rather than the older 128 byte standard. If you use a previous version of Grub like yours to try and boot a Linux distro that is on a newer 256 byte inode size ext3 partition, Grub will choke and give you an "error 2". And about the "mapping" commands, they basically switch the device numbers around so that when you go to boot Windows on (hd2), Windows thinks its being booted from (hd0). Anyway, glad to hear it worked OK for you; cheers and have fun trying new distros.
 
  


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 and Dual Boot Configuration Problem bgearhart Linux - Newbie 2 04-27-2007 03:00 AM
dual boot - Grub won't boot Windows on /windows/D partition biosol SUSE / openSUSE 9 04-09-2006 09:14 PM
Grub/Dual boot - Windows partition restored via dd won't boot pazzport Ubuntu 1 01-06-2006 02:29 PM
Dual boot. Grub configuration question. patufet99 Linux - Hardware 6 12-04-2005 11:47 AM
GRUB and Dual-boot configuration rgbrock1 SUSE / openSUSE 9 07-21-2005 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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