LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual booting Windows XP and Kubuntu where should I put boot loader? (https://www.linuxquestions.org/questions/linux-newbie-8/dual-booting-windows-xp-and-kubuntu-where-should-i-put-boot-loader-914786/)

timmybobo 11-21-2011 05:16 PM

Dual booting Windows XP and Kubuntu where should I put boot loader?
 
Ok, so on my hard drive I have the following:
/dev/sda1 NTFS SYSTEM RESERVED
/dev/sda2 NTFS C:\
/dev/sda3 ext3 /
/dev/sda4 swap
Where should I put the boot loader? Here are my options:
/dev/sda
/dev/sda1
/dev/sda2
/dev/sda3
Im guessing I put it on /dev/sda but I want to make sure.

johnsfine 11-21-2011 05:25 PM

The usual approach is to put the first part of the Grub boot loader in the MBR, which is the start of sda.

Then grub's config files should cause it to offer you a choice that makes it chainload to the Windows loader on sda2.

An alternative is to put the first part of the Grub boot loader at the beginning of sda3. You would leave the Microsoft mbr code in the beginning of sda, which unconditionally chain loads the primary partition selected for booting, which should still be sda2. That starts ntloader. I forget the details, but there is a file you can set up that will cause ntloader to offer you the choice to chainload. I think it chainloads to a file, not a partition, and I think to set that up you must also copy the first sector of boot code from sda3 to a file on C: (which is easy to do with dd in Linux).

Since you didn't say what boot loader you were considering placing on sda, I wasn't sure I should simply say "Yes it goes on sda".

timmybobo 11-21-2011 05:27 PM

Quote:

Originally Posted by johnsfine (Post 4530141)
The usual approach is to put the first part of the Grub boot loader in the MBR, which is the start of sda.

Then grub's config files should cause it to offer you a choice that makes it chainload to the Windows loader on sda2.

Forgive me if you facepalm on this question, but I want to be sure on EVERYTHING.
is the start of sda /dev/sda or /dev/sda1?

timmybobo 11-21-2011 05:35 PM

Its whichever one comes with Kubuntu 11.10 (Grub 2?)
Im new to Linux and dont understand "chainloading". Is there an easier to do this?
Actually, I dont think I explained what I am trying to do actually.
When i boot up my computer, I want GRUB to give me the choice of Windows XP or Kubuntu 11.10. Thats it. Just a dual boot with GRUB as the boot loader.

johnsfine 11-21-2011 05:36 PM

Quote:

Originally Posted by timmybobo (Post 4530146)
Forgive me if you facepalm on this question, but I want to be sure on EVERYTHING.
is the start of sda /dev/sda or /dev/sda1?

Sorry. I meant /dev/sda and certainly not /dev/sd1

I tried to be clearer that this action uses only the very beginning of sda not all of sda. But I ended up being less clear.

sda is the whole disk including at least a whole track before the beginning of sda1. The initial boot code goes into most of (not even all of) the first sector of that track that is in sda before the beginning of sda1.

johnsfine 11-21-2011 05:43 PM

Quote:

Originally Posted by timmybobo (Post 4530154)
Its whichever one comes with Kubuntu 11.10 (Grub 2?)
Im new to Linux and dont understand "chainloading". Is there an easier to do this?
Actually, I dont think I explained what I am trying to do actually.
When i boot up my computer, I want GRUB to give me the choice of Windows XP or Kubuntu 11.10. Thats it. Just a dual boot with GRUB as the boot loader.

Right. Selecting /dev/sda during the Grub2 install is the usual way and the Kubuntu installer should set up all the rest automatically.

It is the nature of open source (and sometimes corresponding answers at LQ) to offer you more choices than you really need or want.

There are more ways to set up XP and Kubuntu dual boot than you would like to hear about. But the common default way is fine.

I have heard of the installer sometimes failing to set up the config file needed for the choice to boot XP. If that happens to you, you will need to learn a bit more about chainloading than you may like. But most of the time the automatic installer gets it all correct and you never need to know the details.

timmybobo 11-21-2011 05:46 PM

Ok, its installing now. Thanks for clearing things up for me. You were a great help.


All times are GMT -5. The time now is 10:55 PM.