LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-29-2010, 02:02 PM   #1
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Rep: Reputation: 15
Ubuntu and Windows 7


There are many threads around about having both OS's but most seem to only refer to using one HDD. I might be wrong. I am currently building a new PC and I want to put Ubuntu on one drive and have Windows 7 on the other, and be given to option on which one to boot from (if possible).

Can I follow the general directions around the internet that state it is usually better to install windows first, then do ubuntu, or would it not even matter.

Just need a little guidance.

Thanks!
 
Old 04-29-2010, 02:08 PM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
It's matter. If install windows after ubuntu then mbr will be rewritten on master hdd.
Just install windows first, then do ubuntu. ubuntu will do the rest (add item windows in grub).
 
Old 04-29-2010, 02:13 PM   #3
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
Damn, all right that's what I thought was going to happen. I wanted Ubuntu first lol.

When I turn on the computer it will ask me which to boot right?
 
Old 04-29-2010, 02:19 PM   #4
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
If everything goes OK than you get the choice with OS to boot
 
Old 04-29-2010, 02:20 PM   #5
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
Awesome,

Thanks
 
Old 04-29-2010, 02:35 PM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by CT_0000 View Post
Damn, all right that's what I thought was going to happen. I wanted Ubuntu first lol.

When I turn on the computer it will ask me which to boot right?
If you want to install Ubuntu first, that is only a small problem. Windows install will probably trash the Linux connection to the MBR. But there are instructions available to boot again from your Ubuntu liveCD and fix the Linux connection to the MBR.

You can configure things so you would use your BIOS's boot menu to select which hard drive to boot, and each OS would boot from the MBR of its own hard drive.

You can configure things so that Linux owns the MBR of the hard drive that the BIOS boots by default and the grub menu during Linux boot offers the choice between Linux and Windows. If you install Windows first and Linux second, the Ubuntu installer sets it up that way by default so you don't need to "configure" anything. Otherwise, instructions are posted in many places and configuring this isn't very hard manually.

You can configure things so that Windows owns the MBR of the hard drive that the BIOS boots by default and the Windows loader offers the choice to chain load to Linux. That is also a manual setup with instructions available in various places.

Last edited by johnsfine; 04-29-2010 at 02:41 PM.
 
Old 04-29-2010, 02:39 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
To be precise, the Windows installer will overwrite whatever was in the MBR. (without giving you a choice.) Linux plays nice and lets you decide if something should be installed in the MBR.
 
Old 04-29-2010, 02:49 PM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by pixellany View Post
To be precise, the Windows installer will overwrite whatever was in the MBR.
With one drive, that is true. With two drives, it is probably true, but I didn't want to exclude the possibility that the OP accidentally or intentionally tweaks BIOS drive settings in such a way as to cause the Windows installer to overwrite only the MBR of the drive that won't end up as the default bootable drive.

Without knowing lots of BIOS details and other info, I couldn't tell the OP how to make that happen. I just wasn't totally ruling out the possibility that it could be done without my instructions.

For example, on at least one computer this worked:

1) Install Linux on the first drive.
2) Tell the BIOS to disable the first drive.
3) Install Windows on the second drive, which the BIOS will now tell the Windows installer is the first/only drive.
4) Tell the BIOS to enable the first drive.
5) Edit /boot/grub/menu.lst to add an entry so that grub can reverse the identities of the two drives and chainload to Windows.

So when you select Windows from the grub menu, it boots up thinking it is on the first drive and Linux is on the second. But when you select Linux from the grub menu, it boots up correctly seeing that it is on the first drive and Windows is on the second. You get the added advantage that if you remove either drive, the other is still valid and bootable.

Last edited by johnsfine; 04-29-2010 at 02:55 PM.
 
Old 04-29-2010, 02:52 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Hmmm---I think Windows seizes the MBR on whatever drive it is being installed on. Windows never asks where to put the bootloader, much less asks your permission to install it at all.

Windows assumes it owns everything.....
 
Old 04-29-2010, 02:57 PM   #10
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
I think I get it. I have two drives and ideally I want drive one to be Ubuntu and drive two to be Windows. I am only going to boot into Windows for gameplay so Ubuntu will be my primary OS for everything else.

So say linux is installed first. I install Windows to the second drive which in turn is going to mess with GRUB and not allow me to boot into Ubuntu anymore. I pop in the livecd and can fix what windows did to the mbr from that? Once that is done I can freely boot into either OS from start-up as I want? Or no?

Say if windows is on first drive, and then I install linux on second drive, the installation from the live cd will work nicely with windows and do the hard work for me? But now Windows will be on the first and ubuntu on the second?
 
Old 04-29-2010, 03:05 PM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by CT_0000 View Post
I install Windows to the second drive which in turn is going to mess with GRUB and not allow me to boot into Ubuntu anymore.
If you install Windows to the second drive without disabling the first drive in the BIOS, I'm not sure which MBR Windows will overwrite. If the BIOS lets you disable the first drive during the Windows install, that is a cleaner choice for installing Windows second.

Quote:
I pop in the livecd and can fix what windows did to the mbr from that? Once that is done I can freely boot into either OS from start-up as I want? Or no?
Whether you need to fix an MBR or not after installing Windows, you do need to edit the Linux boot menu to add the choice to boot Windows. That can only be avoided by installing Linux after Windows.

Quote:
Say if windows is on first drive, and then I install linux on second drive, the installation from the live cd will work nicely with windows and do the hard work for me? But now Windows will be on the first and ubuntu on the second?
Regardless of which drive you install Windows on, as long as you install Linux after installing Windows, the Ubuntu installer should see the Windows install and edit the boot menu for you. The Ubuntu installer should also offer you the choice to take over the MBR of the first hard regardless of which drive you install Linux on.
 
Old 04-29-2010, 03:06 PM   #12
CT_0000
Member
 
Registered: Sep 2009
Posts: 69

Original Poster
Rep: Reputation: 15
re reading your steps john, how would I go about doing step 5?
 
Old 04-29-2010, 03:16 PM   #13
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by CT_0000 View Post
re reading your steps john, how would I go about doing step 5?
I'm not sure these instructions are up to date. They may be assuming an older version of Ubuntu. In that case, hopefully someone with current Ubuntu experience will correct me.

Edit the file /boot/grub/menu.lst

Add the following lines. If you don't have a good understanding of where in the file to put them, the very end of the file is probably OK

Code:
title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
makeactive
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
GRUB won't boot into windows 7, and windows 7 recovery erases ubuntu... amiejay Linux - Newbie 2 01-03-2010 02:07 AM
Ubuntu 9.04 with dual boot (Windows XP) my Ubuntu screens freeze up gribbsy Ubuntu 4 10-20-2009 02:13 AM
LXer: Portable Ubuntu Runs Ubuntu Inside Windows LXer Syndicated Linux News 2 04-05-2009 10:07 AM
Windows xp sp2 pro//Linux ubuntu//Windows 7 ultimate PC_Head Linux - Newbie 1 01-22-2009 10:12 PM
can you install games on ubuntu that are windows?my children love ubuntu but we can't chasity Linux - Software 3 07-14-2006 01:15 AM

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

All times are GMT -5. The time now is 04:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration