enabling boot to windows
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
enabling boot to windows
Hi
I installed LMDE some time ago on my desktop. Although it came with a fully working Win7 install, after LMDE installation (resized the win partition, also kept the win recovery partition plus an existing 500mb FAT partition[edit: I created this FAT partition, sda3, on prompting from the Mint installer]) no Windows entry appeared in GRUB.
I had no need for Windows until now. In attempting to re-enable windows, I've tried to follow this tutorial, http://forums.linuxmint.com/viewtopic.php?f=42&t=163126 thinking it might be an EFI issue, to no avail. I even made a second lmde install (see sda9 in the bootinfo output below) following the instructions in the tutorial, but that didn't work either.
Also attempted to install rEFInd http://forums.linuxmint.com/viewtopic.php?f=46&t=97221, but windows still didn't come up.
The last thing I tried was to manually add a windows entry into grub, but it yields a "wrong EFI command" if memory serves right.
This is the output from bootinfo: http://paste2.org/6M3eC8kL
I've probably muddled things up quite a bit, any help in sorting them out will be much appreciated!
Some specific questions:
1- How do I know whether my system uses EFI? I do get a "run EFI command" in the BIOS boot menu.
2- I think this is EFI related, as I've never had this issue on other LMDE or other linux installs, but this is the first time I've installed onto a possibly EFI computer. Right?
3- From the bootinfo output:
- Is the bootsector info for sda3 (lines 28-30) relevant?
- Why is grub-efi not selected (line 809)?
Thanks
I installed LMDE some time ago on my desktop. Although it came with a fully working Win7 install, after LMDE installation (resized the win partition, also kept the win recovery partition plus an existing 500mb FAT partition[edit: I created this FAT partition, sda3, on prompting from the Mint installer]) no Windows entry appeared in GRUB.
I had no need for Windows until now. In attempting to re-enable windows, I've tried to follow this tutorial, http://forums.linuxmint.com/viewtopic.php?f=42&t=163126 thinking it might be an EFI issue, to no avail. I even made a second lmde install (see sda9 in the bootinfo output below) following the instructions in the tutorial, but that didn't work either.
Also attempted to install rEFInd http://forums.linuxmint.com/viewtopic.php?f=46&t=97221, but windows still didn't come up.
The last thing I tried was to manually add a windows entry into grub, but it yields a "wrong EFI command" if memory serves right.
This is the output from bootinfo: http://paste2.org/6M3eC8kL
I've probably muddled things up quite a bit, any help in sorting them out will be much appreciated!
Some specific questions:
1- How do I know whether my system uses EFI? I do get a "run EFI command" in the BIOS boot menu.
2- I think this is EFI related, as I've never had this issue on other LMDE or other linux installs, but this is the first time I've installed onto a possibly EFI computer. Right?
3- From the bootinfo output:
- Is the bootsector info for sda3 (lines 28-30) relevant?
- Why is grub-efi not selected (line 809)?
Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: enabling boot to windows
Question # 1 can be answered by the following command in a terminal:
it will return a line similar to this if it's uefi enabled.
Good Luck
Code: Select all
dmesg | grep "EFI v"
Code: Select all
[ 0.000000] EFI v2.00 by American Megatrends
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: enabling boot to windows
Thanks!kc1di wrote:Question # 1 can be answered by the following command in a terminal:it will return a line similar to this if it's uefi enabled.Code: Select all
dmesg | grep "EFI v"
Code: Select all
[ 0.000000] EFI v2.00 by American Megatrends
My sda8 install reports nothing, my sda9 install reports EFI v2.1.
How do I find out about the windows install? Do I trust boot-info saying it is non-EFI?
In that case, how do I go about enabling booting to Windows?
Re: enabling boot to windows
have you tried boot repair yet?
you can find it here:
https://help.ubuntu.com/community/Boot-Repair
Follow the instructions carefully and it should find your windows install.
you can find it here:
https://help.ubuntu.com/community/Boot-Repair
Follow the instructions carefully and it should find your windows install.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: enabling boot to windows
Thanks, I did. The bootinfo I mention in the OP is from Boot Repair.kc1di wrote:have you tried boot repair yet?
It states it will do this
Code: Select all
The default repair of the Boot-Repair utility would reinstall the grub2 of disk/by-uuid/a63ef724-98b0-4aeb-970e-3064f3c61568 into the MBR of sda.
Grub-efi would not be selected by default because: no-win-efi
Additional repair would be performed: unhide-bootmenu-10s fix-windows-boot
Further ideas?
Re: enabling boot to windows
from what you say it looks like you have one partition that is non UEFI and one that is. This will not work even if they are seperate disks.
both have to be the same. ethier efi enabled or both efi disabled. since your using widows 7 which does not really require efi I would install both systems in non efi mode. that should solve your problem.
both have to be the same. ethier efi enabled or both efi disabled. since your using widows 7 which does not really require efi I would install both systems in non efi mode. that should solve your problem.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Re: [belated reply] Re: enabling boot to windows
Thanks!
To make a long story short, I've found out the following:
1) there is no need for EFI on my computer. However, the Mint installation requires that I set up an EFI partition - I created sda3 as per that requirement. (I found this out when trying to reinstall from scratch)
2) upgrading to LMDE2 removed rEFInd (which I had installed thinking I was on an EFI system)
3) executing boot repair (from LMDE2 - I'm unsure whether that is relevant) with the "purge grub before installing" option ticked yielded the field below in grub.cfg . This boots into windows through the sda1 recovery partition. It would be great to have direct boot to sda2, but I can live with this.
Again, thanks for your help!
To make a long story short, I've found out the following:
1) there is no need for EFI on my computer. However, the Mint installation requires that I set up an EFI partition - I created sda3 as per that requirement. (I found this out when trying to reinstall from scratch)
2) upgrading to LMDE2 removed rEFInd (which I had installed thinking I was on an EFI system)
3) executing boot repair (from LMDE2 - I'm unsure whether that is relevant) with the "purge grub before installing" option ticked yielded the field below in grub.cfg . This boots into windows through the sda1 recovery partition. It would be great to have direct boot to sda2, but I can live with this.
Code: Select all
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-689C048F9C045A48' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 689C048F9C045A48
else
search --no-floppy --fs-uuid --set=root 689C048F9C045A48
fi
parttool ${root} hidden-
chainloader +1
}
Re: enabling boot to windows
what happens - if you copied the entry for sda1 into a new entry, but for sda2 ?.
- and ran from that entry.
- and ran from that entry.
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Re: enabling boot to windows
Thanks! Doesn't work, thoughPierre wrote:what happens - if you copied the entry for sda1 into a new entry, but for sda2 ?. - and ran from that entry.
It then complains there is no bootmgr
The altered entry :
Code: Select all
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-689C048F9C045A48' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 644806374806090E
else
search --no-floppy --fs-uuid --set=root 644806374806090E
fi
parttool ${root} hidden-
chainloader +1
}
Re: enabling boot to windows
Here's my post-mortem:
Another potential way to fix the problem is to create an appropriate GRUB stanza to boot Windows, and leave everything in BIOS/CSM/legacy mode. This is certainly the more conventional solution. Unfortunately, GRUB's configuration file format is pretty complex, and the main file is built by automated scripts that pull their data from all over the place, so manually fine-tuning may require editing multiple files. You might try installing GRUB Customizer, which is supposed to help simplify this task, or at least make it more intuitive. I've never used it myself, though, and so I can't give any real guidance on how to use it.
A third, and much more radical, solution is to switch from MBR to GPT and switch both Windows and Linux to boot in EFI mode. This is arguably the cleanest solution, but it's also the hardest to implement and poses the greatest risk. To do it, you'd use "gdisk" to convert the disk from MBR to GPT form (and change the type code of /dev/sda3 to EF00), then use rEFInd (on CD-R or USB drive) to boot Linux. At that point, you could either install rEFInd from PPA or Debian package or install the grub-efi-amd64 package. This should get Linux booting natively in EFI mode from a GPT disk. This leaves the Windows boot loader. The process for installing an EFI Windows boot loader is a bit tedious. There used to be a pretty good site describing how to do that, but it's vanished. Fortunately, it's been archived on the Internet Wayback Machine, so you can still read it. At this point, the system might boot straight to Windows, which you can correct by opening an Administrator Command Prompt window and typing "bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi". This should reset rEFInd as the default boot loader. (Substitute "\EFI\ubuntu\grubx64.efi" if you install GRUB rather than rEFInd.)
- You had Windows installed on the computer in BIOS/CSM/legacy mode on an EFI-based computer. This configuration creates all sorts of potential for problems, as described here, and you ended up going down one of these problem paths. (The usual problem is the opposite in some ways -- Windows in EFI mode and an attempt to install Linux in BIOS mode. The principle is the same in your case, though.)
- When you installed Mint, it booted and installed in EFI mode. This is actually a little surprising, since most Linux installers enforce a GPT rule on EFI-mode installs, and your disk uses MBR. I guess Mint doesn't enforce this rule.
- The result was an EFI-mode GRUB, which cannot chainload to a BIOS-mode Windows, hence your problem.
Another potential way to fix the problem is to create an appropriate GRUB stanza to boot Windows, and leave everything in BIOS/CSM/legacy mode. This is certainly the more conventional solution. Unfortunately, GRUB's configuration file format is pretty complex, and the main file is built by automated scripts that pull their data from all over the place, so manually fine-tuning may require editing multiple files. You might try installing GRUB Customizer, which is supposed to help simplify this task, or at least make it more intuitive. I've never used it myself, though, and so I can't give any real guidance on how to use it.
A third, and much more radical, solution is to switch from MBR to GPT and switch both Windows and Linux to boot in EFI mode. This is arguably the cleanest solution, but it's also the hardest to implement and poses the greatest risk. To do it, you'd use "gdisk" to convert the disk from MBR to GPT form (and change the type code of /dev/sda3 to EF00), then use rEFInd (on CD-R or USB drive) to boot Linux. At that point, you could either install rEFInd from PPA or Debian package or install the grub-efi-amd64 package. This should get Linux booting natively in EFI mode from a GPT disk. This leaves the Windows boot loader. The process for installing an EFI Windows boot loader is a bit tedious. There used to be a pretty good site describing how to do that, but it's vanished. Fortunately, it's been archived on the Internet Wayback Machine, so you can still read it. At this point, the system might boot straight to Windows, which you can correct by opening an Administrator Command Prompt window and typing "bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi". This should reset rEFInd as the default boot loader. (Substitute "\EFI\ubuntu\grubx64.efi" if you install GRUB rather than rEFInd.)