LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-28-2009, 01:59 PM   #1
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
Grub -dual boot related question.


Friends,
I have the following doubts:

If I am installing Windows in the first partition of my hdd, the MBR will have the Windows boot loader. This part is clear to me. But now, if I am installing Linux for a dualboot environment, where will the GRUB boot loader be loaded by default? (is it to the MBR or the partition where /boot resides?)if it is to the MBR, wont GRUB overwrite the existing contents of MBR, then
If it is not overwriting, how does the "chainloading" concept work?. Could someone explain me the concept of how the MBR contents are preserved during the dual boot process and also pls explain how grub works during a dual boot session. Because, my main thought is, GRUB must be there in the MBR, irrespective of the OSes so that it would produce a menu of options to choose between OSes and ntldr does not have this capability. Thanks

Last edited by saagar; 03-28-2009 at 02:11 PM.
 
Old 03-28-2009, 02:16 PM   #2
ganimo
LQ Newbie
 
Registered: Feb 2009
Location: Nürnberg Germany
Distribution: Debian 5.0, Ubuntu 8.10
Posts: 17

Rep: Reputation: 2
if you want to use a dual-boot envronment you have to install grub on the MBR. By installing a Linux Operating System grub will be loaded in the MBR.
For the dualboot you have to add some lines in the /boot/grub/menu.lst:


title Microsoft Windows XP Professional Edition
root (hd0,0)
chainloader +1
savedefault
makeactive

then type in a shell: update-grub
after rebooting you should be able to boot Windows and Linux.
Have Fun!
 
Old 03-28-2009, 10:43 PM   #3
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 37
Ok, but pls let me know where will the boot loader of windows go, because I have heard windows wont work if ntldr is not there in MBR. Actually what does the chainloading concept do. I am not able to get it from net.
 
Old 03-29-2009, 06:58 AM   #4
ganimo
LQ Newbie
 
Registered: Feb 2009
Location: Nürnberg Germany
Distribution: Debian 5.0, Ubuntu 8.10
Posts: 17

Rep: Reputation: 2
The Wondows bootmanager in the mbr will be overwrited by grub. Its wrong that Windows wont boot without the ntldr in the mbr! Windows needs the ntldr but the ntldr need not to be in the mbr!
now the chainloader: this feature of grub loads another bootmanager to start a operating system which needs a special bootmanager==> Windows!
yout can also see this in the lines you have to add:

title Microsoft Windows XP Professional Edition
root (hd0,0)
chainloader +1
savedefault
makeactive

after selecting windows in grub, grub will load the ntldr and you will be able to boot Windows!

ganimo

Last edited by ganimo; 03-29-2009 at 07:01 AM.
 
Old 03-29-2009, 12:18 PM   #5
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 37
thanks ganimo... it is getting clear for me now! the concept of one loader loading another loader is chain loading...ok.! Thanked for that!!!
 
Old 03-30-2009, 07:19 AM   #6
ganimo
LQ Newbie
 
Registered: Feb 2009
Location: Nürnberg Germany
Distribution: Debian 5.0, Ubuntu 8.10
Posts: 17

Rep: Reputation: 2
No Problem!
Thank you for the Thank! :-)
 
  


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
(another) Grub dual boot question with XP/Redhat agerkis Linux - Newbie 6 01-11-2011 02:14 PM
Dual boot. Grub configuration question. patufet99 Linux - Hardware 6 12-04-2005 10:47 AM
Another Grub/Dual Boot Question linda SUSE / openSUSE 15 08-21-2005 07:19 PM
grub/dual boot problem/question... wrat Linux - Newbie 2 11-28-2004 03:59 PM
GRUB/dual boot question 0perat0r Linux - Newbie 6 07-19-2004 09:40 PM

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

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