Page 1 of 1

Dual boot Windows 8 and Mint 13

Posted: Mon Mar 18, 2013 12:11 pm
by amicose
So I have my Win8/Mint 13 dual boot working well. I had to run through the process several times cos of various other problems getting my computer (Thinkpadt530) to run properly. The only thing that worries me is Grub. When I switch the computer on or wake it form hibernate, 9 times out of 10 grub doesn't load properly. I see a portion of the full grub screen, which can by anything from just the text 'Linux M' to my full range of boot options and a fraction of the last sentence (something like 'Automatic boot in 7 seco') - in any case, the text is curtailed and I have to keep powering the computer off and on until it loads properly. Anyone had the same problem?

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Mon Mar 18, 2013 6:44 pm
by srs5694
amicose wrote:The only thing that worries me is Grub. When I switch the computer on or wake it form hibernate, 9 times out of 10 grub doesn't load properly. I see a portion of the full grub screen, which can by anything from just the text 'Linux M' to my full range of boot options and a fraction of the last sentence (something like 'Automatic boot in 7 seco') - in any case, the text is curtailed and I have to keep powering the computer off and on until it loads properly. Anyone had the same problem?
This might be a sign of flaky hardware; however, it could also be a GRUB bug. Although the 2.0 release seems to be more reliable than the earlier 1.9x releases (which were bug-fests), GRUB 2 can still be a bit flaky sometimes.

I recommend you try another EFI boot loader. The easiest to install is probably my rEFInd, which you can set up just by installing the Debian package, at least if your EFI works correctly. (On some computers, you may need to jump through some extra hoops.) If rEFInd isn't to your liking, check out ELILO or Fedora's patched GRUB Legacy -- see my page on EFI boot loaders for details.

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Sun Mar 24, 2013 5:35 am
by amicose
srs5694 wrote:
This might be a sign of flaky hardware; however, it could also be a GRUB bug. Although the 2.0 release seems to be more reliable than the earlier 1.9x releases (which were bug-fests), GRUB 2 can still be a bit flaky sometimes.

I recommend you try another EFI boot loader. The easiest to install is probably my rEFInd, which you can set up just by installing the Debian package, at least if your EFI works correctly. (On some computers, you may need to jump through some extra hoops.) If rEFInd isn't to your liking, check out ELILO or Fedora's patched GRUB Legacy -- see my page on EFI boot loaders for details.
Thanks! Just got round to actually testing this out. Installing Refind was no problem at all, however in combination with the grub installed via the method on this thread, any option I select with Refind loads Grub 2! This might be because my EFI is on sda2. Could I avoid this by running the installation manually?

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Sun Mar 24, 2013 5:44 am
by amicose
Also, are there options for customising Refind?

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Sun Mar 24, 2013 7:57 pm
by srs5694
amicose wrote:Thanks! Just got round to actually testing this out. Installing Refind was no problem at all, however in combination with the grub installed via the method on this thread, any option I select with Refind loads Grub 2! This might be because my EFI is on sda2. Could I avoid this by running the installation manually?
You've probably run Ubuntu's "Boot Repair" tool, which is a little over-enthusiastic about applying a hackish fix to a relatively rare problem. The solution is to look at the files in /boot/efi/EFI/Microsoft/Boot. One will be called bootmgfw.efi, which should be the Windows boot loader; but after running Boot Repair, it will probably be a copy of GRUB. The real Windows boot loader will be called something else -- probably bootmgfw.efi.bkp, bkpbootmgfw.efi, bootmgfw.efi.grb, or something similar. You need to rename the files so that the Windows boot loader is called bootmgfw.efi. You should then be able to launch Windows using the Windows icon in rEFInd.

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Mon Mar 25, 2013 5:40 am
by amicose
Both Grub and Refind bring up the bkpbootmgfw.efi (or however it's called), which does boot straight into Windows. Selecting Mint however still boots into Grub- how can I get it to boot directly into Mint?. Also, where do I find /boot/efi/EFI/Microsoft/Boot to make the required edits? And will I need to reinstall Refind or will it automatically scan for all valid efi files?

Also it would be good to change the resolution of the Refind screen (it's in 800x600 or near enough, whch doesn't even display all the text) - where do I find the refind.conf file?

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Mon Mar 25, 2013 5:56 am
by amicose
OK, I found the /boot/efi/EFI/Microsoft/Boot directory. But - I still don't know how to move/rename files in Linux for which I don't have permissions! I guess it's probably a very simple command but my googling is only giving me solutions complicated to the point I'm not confident I'd execute them right

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Mon Mar 25, 2013 12:02 pm
by srs5694
amicose wrote:Both Grub and Refind bring up the bkpbootmgfw.efi (or however it's called), which does boot straight into Windows. Selecting Mint however still boots into Grub- how can I get it to boot directly into Mint?
You need to make rEFInd boot the Linux kernel directly. This requires three things:
  • rEFInd must be able to "see" the kernel. This means that either /boot must be on a filesystem that the EFI can read or you must copy the kernel (and its associated initrd file) to a partition that the EFI can read. I know this is vague, but without knowing how your system is partitioned and what filesystems you use, I can't be much more specific.
  • The "scan_all_linux_kernels" option must be uncommented in refind.conf. This is the default with recent versions of rEFInd, so it shouldn't be necessary to take this action unless you've changed refind.conf or are using an old version of rEFInd (or a newer version installed over an older one).
  • You need to feed the correct options to the kernel. This is most easily done by creating a file called refind_linux.conf in the same directory that holds the kernels (normally /boot; but if you copy them elsewhere to satisfy the first condition, refind_linux.conf should be in that location). This file should be created automatically by install.sh, but if it's missing, you can run mkrlconf.sh, as in "sudo mkrlconf.sh", to do this; or you can create refind_linux.conf manually, as described here.
Ordinarily, the rEFInd install.sh script sets all of these things up correctly; however, if there's a bug or if your configuration is strange, it might not work. ("Strange" could be, for instance, if you use an LVM or RAID setup and don't have a separate /boot partition or if you use something other than ext2/3/4fs or ReiserFS on /boot [or root (/) if you don't have a separate /boot partition]).

The most likely problem is with the first point. rEFInd includes drivers for ext2/3/4fs and ReiserFS, but if they weren't installed with rEFInd, the EFI won't be able to read your /boot directory or partition. Thus, you may need to check for the presence of the relevant file and, if it's absent, install it. See the rEFInd drivers documentation for more details.

One other point: In some cases you might not see all the entries on the screen simultaneously. This happens if you have more boot loaders than there is available space on the screen to show them. In these cases you should see a green arrow to the right (or possibly the left) of the display. When you use the arrow keys to move past the edge of the display, it will scroll, showing you whatever entries are hidden. It's conceivable that rEFInd is finding your kernels but you're just not seeing them for this reason. Chances are your Mint kernels will show up with generic Linux "Tux" penguin icons.
And will I need to reinstall Refind or will it automatically scan for all valid efi files?
rEFInd makes a fresh scan every time it boots, so you won't need to re-install it.
Also it would be good to change the resolution of the Refind screen (it's in 800x600 or near enough, whch doesn't even display all the text) - where do I find the refind.conf file?
It's in the directory where the rEFInd binary lives -- normally /boot/efi/EFI/refind; but you might have moved it elsewhere, such as /boot/efi/EFI/BOOT or even /boot/efi/EFI/Microsoft/Boot.
OK, I found the /boot/efi/EFI/Microsoft/Boot directory. But - I still don't know how to move/rename files in Linux for which I don't have permissions!
Use "sudo", as in "sudo mv foo.txt bar.txt".

Re: How-to: Dual boot Windows 8 and Mint 14 - both (U)EFI!

Posted: Mon Mar 25, 2013 12:49 pm
by amicose
srs5694 wrote:
You've probably run Ubuntu's "Boot Repair" tool, which is a little over-enthusiastic about applying a hackish fix to a relatively rare problem. The solution is to look at the files in /boot/efi/EFI/Microsoft/Boot. One will be called bootmgfw.efi, which should be the Windows boot loader; but after running Boot Repair, it will probably be a copy of GRUB. The real Windows boot loader will be called something else -- probably bootmgfw.efi.bkp, bkpbootmgfw.efi, bootmgfw.efi.grb, or something similar. You need to rename the files so that the Windows boot loader is called bootmgfw.efi. You should then be able to launch Windows using the Windows icon in rEFInd.
I had this working for a while. But then I still had a second icon which booted into Windows. I'm not at home now so I can't remember the exact filenames, bt it was located in EFI\BOOT, I think. The filename was also different from that in EFI\Microsoft. I renamed this with the file extension .grb and was all Gold with a single Windows icon that booted direct to windows. But after a few boots the Microsoft directory reverted to how it looked before any edits and I can't boot into Windows anymore. Many windows efi files still all seem to be there but neither grub nor refit can boot them. I reinstalled both grub and refind and now I have quite the mess of entries in both grub and refund.

So I suppose the question is - how to I get my windows bootloaders working again?