LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-07-2015, 07:37 PM   #1
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Rep: Reputation: Disabled
Grub2 difficulties


I have 4 disk drives. The 1st is a 256G SSD with an msdos partition table and boots Windows 7. The next 2 are Windows 7 data drives and have GPTs. The 4th is 3TB GPT I have dedicated to Linux.

My PC case allows me to easily remove and insert hard drives, so thats what I did when installing Linux (Mint 17.1 to be precise).

The 4th drive is EFI and contains Mint and grub2. Via my BIOS, I can say whether to support legacy or EFI partitions or both and which to boot first. By saying legacy first, the BIOS boots Windows if I do nothing. By saying UEFI first, it boots Mint on the 4th drive via grub2.

So now I want to use grub2 to dual boot. I can't seem to get it to work. I've read and read info on grub2 and played and played around with it, but after having to repair my MBR on the Windows drive, I decided to ask for help.

How can I get grub2 to work????? I'm at a loss as to how to proceed.
Do I need to reinstall Linux without EFI?
Do I need to install grub2 into the MBR of the first drive?
How will this impact Windows boot?
Is there simply a 40_custom file entry that will work for me?
 
Old 02-08-2015, 10:11 AM   #2
/dev/dog
Member
 
Registered: Nov 2014
Location: US
Distribution: Debian
Posts: 39

Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by Bill Melater View Post
How can I get grub2 to work????? I'm at a loss as to how to proceed.
Do I need to reinstall Linux without EFI?
Do I need to install grub2 into the MBR of the first drive?
How will this impact Windows boot?
Is there simply a 40_custom file entry that will work for me?
Hi

I am a noob with Linux but I will try to help. I did some searching, and booting to your 3TiB drive cannot be accomplished with BIOS booting. You need to use UEFI with that disk. I had a setup where I had a GPT disk with a BIOS Protected Partition. My computer is old, I can only boot BIOS. On that disk I booted Linux with various partitions for each mount point, not for any real reason, just to test it out and learn. On another disk I had Win8.1 booting from an MBR. Grub2 on my GPT disk was able to boot Windows no problems. However, both booted from BIOS.

The problem is that Windows ONLY boots using UEFI on a GPT disk. And it ONLY boots using BIOS on an MBR disk. So the way I see it, you have 3 choices:
1) Reinstall Windows on your GPT reformatted SSD. Grub2 could then be installed to the SSD, and you could then boot both OS's using UEFI.
2) Install Grub2 to your MBR SSD, boot both OS's using BIOS, and leave your Windows7 intact. *Risks*
3) Install Grub2 to your GPT disk, boot Linux using UEFI. *Risks*

Risks for 2) There may be a risk you would not be able to boot Linux, and a lesser risk that if you could boot Linux, it would only boot using BIOS.
Risks for 3) Your current situation really. Only boot Windows in BIOS mode and Linux in EFI mode.

I would research GRUB a little more to see if there are any modules that would allow you to switch to using BIOS for a specific boot entry.

My recommendation is #1. Booting would be fast and you would be happy.

Thanks
 
Old 02-08-2015, 01:08 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
I think you are better off leaving it the way it is.
A UEFI/GPT install uses a FAT32 partition near the beginning of the drive and the efi files for both Mint and windows usually go on this partition, particularly if you are using only one drive. Since you have multiple drives, I'm not sure this would be the case. The other problem is that MBR BIOS only supports up to 2TB so if you installed Grub to the mbr of the SSD, I would not expect you would be able to use the last 1TB on the 3TB drive. That's my understanding but I'm not using UEFI so someone else will have more information.
 
Old 02-09-2015, 07:52 AM   #4
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thanks for the replies, guys!

So it seems that grub2 cannot handle both EFI and MBR. Is there a multi-boot loader that can? It seems to me that my situation cannot be that unique. These things should be able to boot any OS and any configuration. And always being able to boot Windows should be an especially stringent requirement. Just sayin'.

Anyway, I have a couple more options to try now. Either make Windows boot EFI or make Linux boot MBR. Or make some portion of LINUX cohabitate with Windows on disk 1. Which would be making it MBR too.

Which Linux directories would I minimally need on the first disk to completely install grub2 there? I'm thinking at least /boot. I could carve 10 or 20GB out for that. But would I need / to be there too? If so what would be a good size for that? I can carve all of the sub-directory partitions onto the 3T drive. What if I left /boot on the / partition and made it about 30GB? Would that suffice for about anything?

I'm not sure that Windows can boot from an EFI drive. But I'm going to find out - lol. I'm checking that out first as I would prefer everything to be based on the latest tech if I have to be homogenous. I am currently copying my Windows MBR boot partition to a 1TB GPT partitioned disk that I had laying around so I can play with that. Hopefully, when I move that to disk 1 the repair disk will make it bootable. In this way, I am protecting my original windows boot drive - just in case.

Anyway, I will post my findings and progress as I make some.
 
Old 02-09-2015, 09:29 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
So it seems that grub2 cannot handle both EFI and MBR
Whether a system boots MBR or UEFI is a decision made in the BIOS. With MBR BIOS, it will look to the master boot record of the drive set to first boot priority in the BIOS for code. With a UEFI, it looks to the EFI partition on that drive. Can your windows bootloader do both?

Quote:
And always being able to boot Windows should be an especially stringent requirement
Not really. There are many users who don't even use windows. I don't see why Open Source programmers/developers should write software to boot commercial systems but they do.

Generally, you need to either use MBR or UEFI. If you use MBR, from what I understand only 2TB will be accessible so you're wasting the last third of your 3TB drive. You could easily create a 2-300MB partition on which to install grub but you have the same problem.

Windows 7 can boot from UEFI/GPT, the link below is to a windows forum which explains it. You probably could have saved yourself some trouble with a little research in advance.

http://www.sevenforums.com/tutorials...ndows-7-a.html
 
Old 02-09-2015, 11:27 AM   #6
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Whether a system boots MBR or UEFI is a decision made in the BIOS. With MBR BIOS, it will look to the master boot record of the drive set to first boot priority in the BIOS for code. With a UEFI, it looks to the EFI partition on that drive. Can your windows bootloader do both?
My BIOS supports both MBR and EFI by default. I can force it to support only one or the other. Or to boot one or the other first. I really wasn't that concerned when I installed Windows years ago and I used the default settings. From your link, which I thank you for, it seems that Windows will only use EFI if MBR is not available. And only on a fresh install. Like most things concerning MS and Windows, that draws massive vacuum...

Quote:
Not really. There are many users who don't even use windows. I don't see why Open Source programmers/developers should write software to boot commercial systems but they do.
There would be many reasons for doing so with the multi-boot software. Certainly not for all software. The most obvious reason, of course, would be for ease of proliferation of other OSes. It seems that many of these Linux flavors have moved toward hiding UNIX complexity. All in an effort to gain more lesser sophisticated users. So why after doing all of that would anyone undermine that goal by providing a multi-booter that won't boot what is in 90% of the homes? That's my point. No need to take it personally.

Certainly, there are those that resent MS and Windows. I am no fanboi either. But I like to game and Windows has the games. I have some ideas and want to get back into coding a few things and Linux has the tools. It all is what it is. Heck, now that I see the need, I may just make this one of my first projects. But probably not - lol.

Quote:
You probably could have saved yourself some trouble with a little research in advance.
Wow, what a completely asinine narcissistic statement. Why would you assume that I haven't researched anything?

I desire a dual boot system - Windows and Linux. No where did I run across anything that said I have to have be total MBR or EFI in order to do so. If I had, I would have addressed it then. Just look at the distros' install instructions. It's not even mentioned. At least not in the one's I've read. IMHO, that is a good place to mention little things like that.

Up until now, my focus has been on which Linux flavor and which drivers and how to install them -> NVIDIA! Most documentation is too old and no longer relevant. So research only goes so far. Unfortunately, only after trying it can you find out what has been omitted or doesn't work. I fully expect that I will redo my configuration once I get this little problem solved as I will have gone through these things and resolved them. You see? This IS research in advance- lol.
 
Old 02-09-2015, 05:58 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
My BIOS supports both MBR and EFI by default. I can force it to support only one or the other. Or to boot one or the other first
That is pretty much the way it works, you make the selection in the BIOS.

Quote:
it seems that Windows will only use EFI if MBR is not available.
I think that may be the case with windows7. From what I understand, most windows 8 systems (paricularly pre-installed) are UEFI/GPT.

Quote:
There would be many reasons for doing so with the multi-boot software. Certainly not for all software. The most obvious reason, of course, would be for ease of proliferation of other OSes.
Where's the incentive? Obviously, companies like microsoft and apple have done the exact opposite and been extremely proprietary and been successful. Most distributions don't put much emphasis on multi-booting but only on installing and booting their own system. This is true for most Linux distributions as well as the commercial apple and windows. Of course, the Grub developers don't have any affiliation with any particular system, at least as far as I know, so they would have a different outlook.

I suppose more people would be likely to try Linux if they could still keep their familiar old system, like windows so that would be an incentive. I don't see any other reason why it would be advantageous to Linux developers to make it easier to boot windows. I don't think there are that many of use who are really that interested in multi-booting, looking at the overall population of computer users who view a computer in much the same they do a TV or a toaster.

My comment about research was inappropriate since I really have no idea what research you have done. I think 'rude' or 'presumptuous' would have been more appropriate that 'narcissistic'. My apologies.

My understanding of UEFI is that you need to make that choice in the BIOS.

With regard to Nvidia, I use Nvidia graphics cards also and always have problems with the various Ubuntus including Mint. Have you installed the proprietary drivers? Usually selecting installing proprietary software during the installation and on the first boot, look for System Settings or the Control Center on Mint, depends upon which Desktop Environment you are using, and there should be an option to install Additional Drivers.
 
Old 02-09-2015, 08:09 PM   #8
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
With regard to Nvidia, I use Nvidia graphics cards also and always have problems with the various Ubuntus including Mint. Have you installed the proprietary drivers? Usually selecting installing proprietary software during the installation and on the first boot, look for System Settings or the Control Center on Mint, depends upon which Desktop Environment you are using, and there should be an option to install Additional Drivers.
Yes, I have the proprietary driver installed. Reading the proprietary instructions that came from nVidia, ctrl-alt-F? terminals are nerfed in Ubuntu. As is the root login. In Mint, the proprietary drivers interface showed me nothing. It still shows me nothing even after I have them installed. Anyway, I moved to Mint before I found out that you have to hit escape to bring up the grub menu. There I found the recovery kernel which enables ctrl-alt-F? terminals. Giving root a password was easy enough and documented many places. However, the rest of it is just fluff that doesn't work. I'm sure it must work someplace, but it is not at all intuitive or very well documented. It certainly doesn't jive with what nVidia says to do.
 
Old 02-09-2015, 08:14 PM   #9
/dev/dog
Member
 
Registered: Nov 2014
Location: US
Distribution: Debian
Posts: 39

Rep: Reputation: 0
I would like to repeat my option. Since you said you want to keep up with up to date technology, I'd say take a whole morning and reinstall Windows on your GPT reformatted SSD. You could then give your 3rd partition around 20GB and install any distro there. However, I think my Linux Mint 64-bit is fast enough on an HDD.

Anyway, after re-installing, then re-downloading and re-installing software, and re-importing data. Then install a distro. I think windows definitely has some software they offer to move an OS to another machine.

I recommend Linux Mint. Setting up proprietary drivers for nVidia is easy on Linux Mint. It is an option in System Settings. The icon is a little cartoonish PCI card. After choosing the recommended driver and rebooting, your dual monitor setup should be good. Then if you want to install Arch or Puppy, you can use VirtualBox.
 
Old 02-09-2015, 09:26 PM   #10
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
I recommend Linux Mint. Setting up proprietary drivers for nVidia is easy on Linux Mint. It is an option in System Settings. The icon is a little cartoonish PCI card. After choosing the recommended driver and rebooting, your dual monitor setup should be good.
That did not work. It still does not work even after I have the driver installed. The window was/is completely blank. Either it was broken in 17.1 or the GTX 970 is too new. Either way, it simply does not work.

BTW, I don't have a dual monitor setup. The default driver max rez is 720p. I require 1080p. And I have it now. I may require 4k soon though - lol - who knows...
 
Old 02-10-2015, 08:34 AM   #11
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Then if you want to install Arch or Puppy, you can use VirtualBox.
You can run Linux in a virtual box under Windows. But the performance just isn't there. That's why I want a dual boot. I've run DOS, OS/2, and Linux in vbox under Windows.

Linux is more compatible to run in a vbox under Windows than to run Windows under Linux. You can't play the full blown Windows games using Linux.
 
Old 02-12-2015, 07:03 AM   #12
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Progress on the home front

I have made some progress in moving my MBR Windows installation to boot from GPT. I want to document this and figure this is a good place to do it.

Over the past couple days, I've tried a zillion things involving free partition managers and backup software as well as built-in Windows backup and robocopy. Nothing worked.

First, remember my original disk configuration:
256 Sandisk SSD - MBR Windows 7 boot
1TB Seagate HDD - GPT Windows data
3TB WD HDD - GPT Windows data
3TB Seagate HDD - GPT Linux Mint 17.1

I have another old 1TB Seagate HDD laying around and decided to use it my test bed drive. I wiped it and created a GPT partition table on it. Nearly any partition tool can do this much. No partitions on it yet - just the GPT table.

Next, I removed all of my drives except the GPT test drive. I made it the first drive and changed my BIOS to only boot from UEFI disks.

Then I booted my original Windows 7 Ultimate DVD. When Windows got to the partitioning screen, it had an exclamation mark in a yellow triangle and said that it could not install itself on this disk. Ignoring that, I hit continue without putting any partitions on the disk. Windows actually proceeded and installed itself on the disk. It created 3 GPT partitions: the first is 100MB, the second is 120MB, and the 3rd is the remainder of the disk. There are small unallocated pieces before and after the partitions as well. Anyway, it booted and at this point I actually had Windows 7 running on a GPT UEFI disk. But it was a clean install and not my Windows.

Next, I installed my disks as follows:
1 - SSD Windows MBR boot disk
2 - 1TB HDD Windows data
3 - 3TB HDD Windows data
4 - 3TB HDD Linux Mint

Then I booted Linux Mint. Using the following, I created an image of my C: MBR SSD. I used /usr filesystem because I had enough persistant room.
sudo mkdir /usr/saveC
sudo ntfsclone --save-image --output /usr/saveC/sda1clone.img /dev/sda1

Next, I shutdown and reconfigured my disks as:
1 - 1TB HDD Windows 7 UEFI GPT boot disk
2 - 1TB HDD Windows data
3 - 3TB HDD Windows data
4 - 3TB HDD Linux Mint
note: I simply swapped out the SSD with the 1TB test drive.

Again, I booted Linux Mint and executed the following:
gparted # using this, I formatted sda3 partition ntfs to clear out the fresh Windows 7 install there
sudo ntfsclone --restore-image --overwrite /dev/sda3 /usr/saveC/sda1clone.img

Now the MBR SSD WIndows 7 image was successfully copied into the 1TB HDD UEFI GPT 3rd partition.

I shutdown removed the 4th disk leaving things like this:
1 - 1TB HDD Windows 7 UEFI GPT boot disk with SSD Image
2 - 1TB HDD Windows data
3 - 3TB HDD Windows data

Lo and behold - IT BOOTED and began running my Windows configuration. I was actually amazed - lol. Windows installed a device driver to accommodate the 1TB HDD it was now using and I had to restart. That's it. I am typing this using this configuration.

Next I need to put a GPT on my SSD, install Windows on it. Reformat and install the original image on it. Then I think I can get grub to work dual booting. I will let you know how it goes.
 
Old 02-13-2015, 10:35 AM   #13
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Finalized

Hey, that almost worked.

I should have shrunk my original SSD partition using Windows storage manager before cloning it with ntfsclone. Simply because of the space that the two new paritions for UEFI take up. Ntfsclone will refuse to restore the image if the device is too small. So shrink it first and make sure it still works.

Once Windows is UEFI, update-grub2 sees it and includes it in the menu. And it works. So now I have a dual boot system.
 
Old 02-13-2015, 10:49 AM   #14
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Talk to myself much...
 
Old 02-14-2015, 11:04 AM   #15
/dev/dog
Member
 
Registered: Nov 2014
Location: US
Distribution: Debian
Posts: 39

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by Bill Melater View Post
...So now I have a dual boot system.
Hey Bill

That's good to hear! Did not know Windows would boot after that.

So you now have your SSD booting Windows and Mint using UEFI? Sounds awesome!

I have to thank you for documenting this. I am saving money to upgrade my motherboard and processor because it currently does not support Virtualization or UEFI, and it only supports a max of 8GB RAM, and I would LOVE to buy an SSD to go along with it, so I will also go through the process of moving Windows 8.1 and Mint and an in-progress Arch I am working on onto a single UEFI booting GPT SSD from multiple BIOS booting MBR HDD's.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Revert grub2-efi to grub2-bios Atmchicago Fedora 1 03-24-2014 01:24 AM
[SOLVED] OpenSuSe12.3 - Help Fix Grub2 Syntax Errors (was - Replace Grub2 w/ Lilo) enorbet SUSE / openSUSE 9 12-08-2013 04:09 AM
grub2 can't see my win 7 partition and yast2 bootloader can't reinstall grub2 jjrojaspy SUSE / openSUSE 5 07-07-2013 10:38 PM
kcm-grub2 - No valid GRUB2/BURG installation could be detected cristi92b Linux - Newbie 2 06-14-2012 08:01 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:38 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
Open Source Consulting | Domain Registration