Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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.
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.
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.
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.
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
For grub2, there should be a directory
and a file
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.
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.
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:
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.
Originally Posted by freespace2dotcom
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.
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.
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!
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?
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.
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.