LinuxQuestions.org
Visit Jeremy's Blog.
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 11-30-2012, 01:23 AM   #1
freespace2dotcom
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Rep: Reputation: Disabled
Dual Boot Win7&Mint


Hello, everyone!

I've been trying to move to Linux for some time now, but recent events have finally broken the proverbial camel's back.

I have a system, which has both Win7 and Linux Mint on it.

I have installed both OSes on completely separate HDD's, and I installed both of them while the HDD for the other OS was disconnected. I couldn't figure out any other way to keep either of them from attempting to write something to the other and making one or both unbootable, or in Windows' case, impossible to install. (Gotta love how it expects to be able to use a second HDD for a System Volume)

I can now boot either OS from either drive, but in order to do so, I have to go into my CMOS settings and change the HDD boot order every time I want to change OSes. I would like to know if there isn't some way to configure my system to choose which drive I want to boot from on startup without having to go into CMOS. Surely it can be done. If this was a few years ago I would have just tinkered with Windows' boot.ini until I got it, but Microsoft sure loves taking the power out of a power user's hands. I'm brand new to Linux so I'm in the dark on this side. Can anyone here help?
 
Old 11-30-2012, 07:27 AM   #2
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,788

Rep: Reputation: 211Reputation: 211Reputation: 211
Clarifying information...

Windows 7 and Mint 14(?) are installed on two internal HDDs? Is Windows 7 installed with two partitions, an initial small booting partition and one with the OS itself?

There is no UEFI BIOS or EFI partitions involved? If so, post back with the details. Things are then seemingly more arcane.

Otherwise, I would think that you would arrange your BIOS and HDDs so that Mint boots first, then open the Grub2 bootloader and edit it to chainload the other HDD with Windows. You can select which HDD Grub2 looks to for Windows, and select the Windows partition, the smallest one if there are two.

I may not have suggested anything you don't already know, but as I haven't had to do this myself, I am wont to lead you astray.

The Internet will give you more information on chainloading, or there may come a post that is more informative.

Last edited by thorkelljarl; 11-30-2012 at 08:18 AM.
 
Old 11-30-2012, 08:58 AM   #3
RaviTezu
Member
 
Registered: Nov 2012
Location: India
Distribution: Fedora, CentOs, RHEL
Posts: 164

Rep: Reputation: 24
So, you're are unplugging the Windows HDD every time in order to boot the linux Mint.

& vice versa??


If yes, your bios should detect the HDD(Linux/Windows) which is connected & should boot from it.
 
Old 11-30-2012, 09:47 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,983

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
With both drives attached, select to boot Mint. Open a terminal and run sudo update-grub. Watch the output. It should show that a windows installation was detected. Reboot the computer to Mint again to verify there is/are windows entries. You may have more than one if you have a recovery partition. You can then set the Mint drive to first boot priority and have the option to boot either Mint or windows. If there is a problem, you may have to change the windows entry to map it as windows usually won't boot off what it percieves to be a second drive. Post back the results.

boot.ini hasn't been used in windows since xp.
 
Old 11-30-2012, 10:30 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by yancek View Post
Open a terminal and run sudo update-grub.
I hope it is that simple to set up.

Regardless of whether the setup is that simple (or instead needs some manual editing of grub files) the basic operation is simple. On each boot, Grup will present a menu that includes chain loading to the other drive.

Quote:
You can then set the Mint drive to first boot priority
If I'm following correctly, the OP would have already done that in order to boot Mint to follow your first instruction. Then there is no reason to ever undo it. The BIOS would always be set to boot the drive containing Mint and a Grub menu from that drive would offer the choice to boot Windows instead.

Quote:
If there is a problem, you may have to change the windows entry to map it as windows usually won't boot off what it percieves to be a second drive.
Some extra details for the OP regarding that point:

A data structure passed from the BIOS to the boot code tells the OS which is drive 0 and which is drive 1. In selecting the Mint drive to boot first, the BIOS probably also selects it to identify as drive 0. You can have commands in a Grub control file that tell Grub to switch the identities of drives 0/1 when it chain loads to Windows. If those commands were not inserted by whatever automatic edit of the grub files occurred when you did update-grub, then you need to edit that in yourself.

Grub and Grub2 have important differences in the syntax of the configuring text and in what needs to be done to get that configuring text to be used during boot. thorkelljarl has assumed you have grub2 installed in Mint. I don't know which you have. When you look up the online documentation for details of chain loading to Windows, make sure the choice of grub vs. grub2 for that documentation matches the one you actually have.

The relevant text file(s) managing grub should be in the directory
/boot/grub/

For grub2, there should be a directory
/etc/grub.d/
and a file
/etc/default/grub
containing the text you use to manage grub, while the files in /boot/grub/ are created automatically and should not be manually edited.

Look there and see if that helps you understand. If you are confused by what is there, post info and/or contents from there to get more specific advise.

Last edited by johnsfine; 11-30-2012 at 10:40 AM.
 
Old 11-30-2012, 12:16 PM   #6
freespace2dotcom
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you, all.

I have Mint 12 installed. I've had in put on a USB thumb drive a while ago, and finally had the patience to figure out how to get it to install on a disk correctly. I had too many HDDs, all internal, and formatted NTFS, and several are GUID which probably only complicates things. So the simplest solution was to simply unplug them all save the one for the linux install on EXT4. That worked. Right now I have only two HDDs connected to the PC. A 90GB with Windows, and a 120GB with Mint. The plan is to get them all connected running on both OSes but one step at a time.

I hadn't even heard of Grub before this, and I'm just learning as I go. I understand how the BIOS works and sends info to the OS, but am very unfamiliar with how Linux operates as a whole.

As it turns out, I have the original Grub and not Grub2.

Correct me if I don't understand this correctly. This command "Sudo update-grub" will create a menu when attempting to boot to the Linux drive. At this point (hopefully) the menu will recognize the Windows loader because of the update. If for some reason Windows is not able to be chosen from this menu, then I need to manually tweak certain files in the Grub Directory in a manner not dissimilar to the boot.ini that used to be used by Windows.
 
Old 11-30-2012, 12:43 PM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Grub is actually simpler than grub2.

For grub, you directly edit the menu.lst file in /boot/grub to control what entries exist in the menu grub displays and what each entry does and how long the menu is displayed before it times out and selects the default.

A typical entry in menu.lst for a situation similar to yours is:
Code:
title=Windows 7
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1
title=Windows 7 indicates what goes in the menu to represent this choice.
rootnoverify (hd1,0)
identifies the partition to boot (the zero'th partition on the drive which the BIOS identified as drive 1). You might need to change that to (hd1,1) if you have an OEM partition or other extra partition before the bootable Windows partitions.
Next two lines swap the identities of drive 0 and drive 1 in the data that will be given to the Windows bootloader.
makeactive is probably unnecessary, but shouldn't do any harm. Your Windows partition is probably permanently marked as the "active" partition.
chainloader +1 is the command to actually transfer control to the boot code in that partition.

Post your /boot/grub/menu.lst file and someone can tell you what other things must be added or changed in order to make sure the menu is actually displayed and you get the default you want after the timeout you want.

Quote:
Originally Posted by freespace2dotcom View Post
As it turns out, I have the original Grub and not Grub2.
Are you sure? I might have misled you regarding the naming. Most documentation now says "Grub" when they mean Grub2 and "Legacy Grub" when they mean what used to be Grub. You can easily tell by looking for or in the files I mentioned.

Last edited by johnsfine; 11-30-2012 at 01:12 PM.
 
Old 11-30-2012, 01:52 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,983

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
I have Mint 12 installed. I have the original Grub and not Grub2.
If you do in fact have the original Grub Legacy installed you should be able to go to the /boot/grub/menu.lst file and make the entry suggested above by johnsfine. I would be surprised if you had Grub Legacy, it wasn't default on Mint 12. That would be the first thing to verify. If you have always been selecting to boot the different systems off the different drives in the BIOS, I would not expect you to have any entry for windows in the Mint boot menu so doing update-grub would be the starting point.

If you find you actually have Grub2, go to the link below which has a sample menuentry for mapping drives in Grub2. In Grub2, drives are numbered from zero, partitions from one. If you do have Grub2 and this entry boots, copy the menuentry to /etc/grub.d/40_custom file.

http://forums.justlinux.com/showthre...mapping-drives
 
Old 11-30-2012, 02:41 PM   #9
freespace2dotcom
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
All right. It looks like I was wrong. On closer inspection it is in fact Grub2. Whoops!

On the plus side, I did the "sudo update-grub" command and it sucessfully updated and found Windows. The grub menu that appears when booting the Mint drive also lists Win7 as an option to boot. I can now dual boot either OS without relying on setting the CMOS settings. Didn't even have to edit anything!

Lucky!

Thanks a bunch!

One quick question before I go: In regards to updating to newer versions of Mint... Should I install them fresh as I did with 12, or is there a handier way to update it? Do I even need to anytime soon?
 
Old 11-30-2012, 02:53 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,983

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Lucky!
That's for sure. I'm surprised it was that easy but not knowing your setup, glad it worked.

You can upgrade Mint from within the operating system. According to the Mint site below, Mint 14 was just released. Usually you need to upgrade version to version. I've not done this with Mint so you might research it. In your case, that would mean going from 12 to 13 and then to 14. It would probably be easier (faster at least) to do a new install after backing up any important data.

http://www.linuxmint.com/download.php

The site below has instructions on upgrading from Mint 12 to Mint 13:

http://blog.linuxmint.com/?p=2031
 
Old 11-30-2012, 05:40 PM   #11
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,788

Rep: Reputation: 211Reputation: 211Reputation: 211
Not my choice...

Were I to go from Mint 12 to Mint 14, I'd do a fresh installation. Updating can bring problems that a clean install avoids.

I assume that you don't have much in the way of files on your Mint 12, you having just installed it. You can easily repeat the modification of Grub2 that you made on Mint 12 and you are in business in one move.

I like Cinnamon, but I use KDE on openSUSE 12.2

Last edited by thorkelljarl; 11-30-2012 at 05:52 PM.
 
  


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
[SOLVED] Dual-boot not working with Win7 & Arch (installation problem?) Krauger Linux - Newbie 12 03-04-2012 08:46 PM
Mint/Win7/Dual Boot/Usb/ Preferably no data loss LinuxNoobX Linux - Newbie 11 01-23-2012 01:35 AM
Dual boot problem - Win7 & Linux defmania Linux - Hardware 3 01-28-2010 07:34 PM
Grub 22 error using dual boot of Win7 and Linux Mint brianste Linux - Newbie 12 12-30-2009 09:31 PM
Problems creating a dual boot WinXP (Win7) & Fedora Core9 on HP XW6400 andygravity Linux - Newbie 3 09-13-2009 06:08 PM


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