Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

BIOS configuration dualboot

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
teus
Posts: 16
Joined: 2013-03-11 12:21

BIOS configuration dualboot

#1 Post by teus »

I would need some help to figure out what's going on here. I can't get to figure out how to dualboot with either the legacy or UEFI Bios.

I went through this process on my laptop (Dell Precision 3510), which has Windows 7 preinstalled: make free space at the end of the disk, boot Debian Live, let Debian partition the unused space as it desires, proceed with installation. I never changed any BIOS settings in regard to UEFI/Legacy BIOS settings.
Upon reboot, Windows loaded just like before. No sign of GRUB.
Playing around with the BIOS: UEFI is used by default, so I changed it to Legacy. This loads GRUB and boots Debian, but GRUB does not list my Windows installation. I ran update-grub, mounted my windows partition and tried os-prober too, but no dice. I can't add Windows to my list of boot devices.

I found this guide from Dell:https://www.dell.com/support/article/us ... pc?lang=en
By default, secure boot disabled and "Enable legacy option ROM" is enabled. When I changed my BIOS back to UEFI, my laptop refused to boot Windows when I disabled "Enable legacy option ROM". Isn't Win7 UEFI compatible?

I'm baffled and could use some help... thanks.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: BIOS configuration dualboot

#2 Post by Head_on_a_Stick »

Your motherboard may be booting Windows' bootmgfw.efi loader regardless of any attempts to force it to do otherwise, this is not uncommon.

Try this from a Windows Administrator prompt in Powershell:

Code: Select all

bcd edit \set "{bootmgr}" path "\path\to\debian\grubx64.efi"
I can't remember exactly where grubx64.efi is located but it should be on the EFI system partition (FAT-formatted with an ef00 partition code) in the debian subdirectory.

It is likely that Windows updates will reset this so set it as a batch command to be run at every boot.

EDIT: this method requires that Debian be installed in UEFI mode.
deadbang

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: BIOS configuration dualboot

#3 Post by dilberts_left_nut »

Also, the live image didn’t used to be UEFI install capable - not sure if that has changed now.
Best to use an actual installer image.
AdrianTM wrote:There's no hacker in my grandma...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: BIOS configuration dualboot

#4 Post by p.H »

teus wrote:Playing around with the BIOS: UEFI is used by default, so I changed it to Legacy. This loads GRUB and boots Debian, but GRUB does not list my Windows installation. I ran update-grub, mounted my windows partition and tried os-prober too, but no dice. I can't add Windows to my list of boot devices.
It means that Debian was installed for boot in BIOS/legacy mode (with grub-pc) whereas Windows was installed to boot in native EFI mode.
GRUB BIOS (grub-pc) cannot chainload an EFI bootloader (and the other way around), so it is normal that os-prober and update-grub do not detect Windows boot manager.
teus wrote:When I changed my BIOS back to UEFI, my laptop refused to boot Windows when I disabled "Enable legacy option ROM". Isn't Win7 UEFI compatible?
It is, but IIRC it requires that the UEFI firmware has some legacy features enabled (not the same as legacy boot). Note that the latest versions of the UEFI specification has these features disabled, so Windows 7 may not be able to work in native EFI mode with UEFI firmwares following these latest versions.
Head_on_a_Stick wrote:I can't remember exactly where grubx64.efi is located but it should be on the EFI system partition (FAT-formatted with an ef00 partition code) in the debian subdirectory.
It would if GRUB EFI was installed.
Note that "ef00" is not a real partition code. It is just a mnemonic used by gdisk. The real code is either "ef" in a DOS/MBR table or a 128-bit GUID in a GPT table.
Head_on_a_Stick wrote:EDIT: this method requires that Debian be installed in UEFI mode.
Indeed, but Debian was obviously not installed in EFI mode.
dilberts_left_nut wrote:Also, the live image didn’t used to be UEFI install capable - not sure if that has changed now.
It has changed. Stretch live images are EFI capable.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: BIOS configuration dualboot

#5 Post by Head_on_a_Stick »

p.H wrote:Note that "ef00" is not a real partition code. It is just a mnemonic used by gdisk.
I knew you were going to say that :lol:

Yes I forgot to put "in gdisk", sorry OP.
p.H wrote:Debian was obviously not installed in EFI mode
So why not link the OP to a guide that would have got Debian installed in UEFI mode?

https://wiki.debian.org/GrubEFIReinstall

@OP: the EFI system partition will be mounted under \EFI in Windows.
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: BIOS configuration dualboot

#6 Post by p.H »

Head_on_a_Stick wrote:So why not link the OP to a guide that would have got Debian installed in UEFI mode?
Because this page sucks.

teus
Posts: 16
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

#7 Post by teus »

Thanks for all the help so far. It's all very on-point. I'm simply shocked by the complexity of this affair. I'll be working my way through all the info here.

The image I used is debian-live-.5.0-amd64-xfce.iso.
Documentation states the following:
UEFI support in live images
Since the first release of Stretch (9.0), UEFI is now supported on both installation and live images.
In previous releases UEFI support existed only in Debian's installation images. The accompanying live images did not have support for UEFI boot.

teus
Posts: 16
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

#8 Post by teus »

Using the live boot, I chrooted, but couldn't mount the EFI partition. " special device does not exist" is the error.
Installed efibootmgr, it said it couldn't find efi variables on the system.
I'm reinstalling now with an installer image, rather than a livecd image.

edit: the installer also fails to recognize the windows partition.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: BIOS configuration dualboot

#9 Post by p.H »

You must make sure that the installer boots in EFI mode. The menu screen is different.
- legacy boot -> classical ISOLinux menu
- EFI boot -> GRUB menu with "EFI" printed somewhere

teus
Posts: 16
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

#10 Post by teus »

In rescue mode I can mount the boot partition. efibootmgr says EFI variables are not supported on this system. I mounted /boot/efi and ran the GRUB instructions, but theres no \EFI\ubuntu\grubx64.efi to be found.
p.H wrote:You must make sure that the installer boots in EFI mode. The menu screen is different.
- legacy boot -> classical ISOLinux menu
- EFI boot -> GRUB menu with "EFI" printed somewhere
hmm, I couldn't see it. I only get the legacy boot menu, I don't get a splash screen that lets me pick it. I went back to the BIOS setup and disabled "Enable legacy option ROM"
now my USB stick boots in UEFI mode and I get het UEFI installer. I'm ready to shoot myself now.
I'll report back once I run the UEFI installer.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: BIOS configuration dualboot

#11 Post by p.H »

teus wrote:In rescue mode I can mount the boot partition. efibootmgr says EFI variables are not supported on this system. I mounted /boot/efi and ran the GRUB instructions, but theres no \EFI\ubuntu\grubx64.efi to be found.
The rescue mode of the installer menu or the rescue mode in installed GRUB menu ?
EFI variables are only supported when the system is booted in EFI mode.
What GRUB instructions ?
\EFI\ubuntu\grubx64.efi would be present only after installing Ubuntu in EFI mode.

Palmstroem
Posts: 19
Joined: 2017-08-12 12:36

Re: BIOS configuration dualboot

#12 Post by Palmstroem »

If your laptop came with Windows in EFI mode pre-installed and you need Windows, I would install Debian in EFI mode, too. But EFI BIOSes can sometimes be nasty and even bcdedit - as Head_on_a_Stick proposes - might not work. I had success with rEFInd; see here http://forums.debian.net/viewtopic.php?f=16&t=134399 what I did to achieve a dualboot.

teus
Posts: 16
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

#13 Post by teus »

OK, my dualboot is working, once I launched the USB stick in UEFI mode. I have GRUB, and GRUB sees windows, but I had to enable the "Legacy option ROM" again. Otherwise Win7 won't boot!
Delightfully cumbersome. I should report this to Dell or something.
p.H wrote:
teus wrote:In rescue mode I can mount the boot partition. efibootmgr says EFI variables are not supported on this system. I mounted /boot/efi and ran the GRUB instructions, but theres no \EFI\ubuntu\grubx64.efi to be found.
The rescue mode of the installer menu or the rescue mode in installed GRUB menu ?
EFI variables are only supported when the system is booted in EFI mode.
What GRUB instructions ?
\EFI\ubuntu\grubx64.efi would be present only after installing Ubuntu in EFI mode.
rescue mode of the installer menu. and yes, that wouldnt work since I launched it in Legacy mode. GRUB instructions were from https://wiki.debian.org/GrubEFIReinstall

Post Reply