Dual boot with Win10 on Lenovo X1 Carbon Gen7 Carbon-fiber Weave 20QD Thinkpad

Asked by Viktors Berstis on 2019-11-26

The X1 Carbon type 20QD system comes with Window 10 pro installed. I made the windows main partition smaller by using their Disk Manager. I then installed Ubuntu 19.10. It seems to install and does put its files there, but dual boot does not work. The system always boots back into Windows. I was able to install 19.10 if I erase the drive and install it alone. I have restored the Windows system. There is no option in BIOS for anything like legacy boot. Windows has an efi partition, but I don't see a way to make Ubuntu an option at boot time even though there seems to me an Ubuntu directory there. Any suggestions?

Incidentally Ubuntu 18 and 16 do not boot successfully in trial mode (from DVD) on this machine. But interestingly 14.04.3 does boot but you need a magnifyling glass to read the tiny text on the 3840 x 2160 display.

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2019-12-04
Last reply:
2019-11-27
Viktors Berstis (berstis) said : #1

If I move /EFI/Microsoft/Boot/bootmgfw.efi to / in the original boot partiion and then point /boot/grub/grub.cfg to the new location for this file, then the grub boot menu does appear instead of automatically booting Windows without any choice. So there is something in the Ubuntu install procedure that sets up grub that seems to be the ultimate problem.

Viktors Berstis (berstis) said : #2

After much experimentation, if /EFI/Microsoft/Boot/bootmgfw.efi exists, then BIOS boots Windows 10 no matter what you did with grub. Renaming this file lets grub boot. If you rename this file in the entry in /boot/grub/grub.cfg then you can get Windows on the grub menu. If you run update-grub however, there seems to be some other problem because it shows no menu and just boots the first menu item which is Ubuntu, and the cfg file does not have Windows in it. The grub.cfg created using the install process from the DVD somehow works, but the font is infinitesimal. I tried creating a larger font and then grub again does not show the menu. So there must be some problem with grub handling the display adapter / screen on this particular machine.

I am not a grub expert, but there is something wrong with the way it discovers things on this machine.

bernard stafford (bernard010) said : #3

Did you try changing the Boot order in the BIOS ? To Ubuntu First. Turn off Secure Boot In BIOS.
The idea is to have the boot loader load which OS you prefer to load first then the other second.
This should all be in the BIOS.

Viktors Berstis (berstis) said : #4

I had "secure boot" turned off. "Platform mode" to "setup", not "User mode" which "uses platform key for secure boot." "Secure boot mode" to "custom" instead of "Standard mode" where "only microsoft or lenovo certified program can be executed." Varying these did not make update-grub do any better. There is no option in BIOS to select the operating system, only the boot devices. If the file /EFI/Microsoft/Boot/bootmgfw.efi is there by that name, it boots Windows no matter what. So I just changed that name and made the same name change in the grub.cfg file created during installation of Ubuntu. That is the only grub config that works. Running update-grub creates a grub.cfg that does not work. You cannot see the menu, and it does not seem to respond to the keyboard either (hitting enter or up down keys). The update-grub created grub.cfg boots the first menu item after the timeout (if bootmgfw.efi has been renamed). So it looks like update-grub does not handle the display device and keyboard drivers correctly somehow.

To change that file name bootmgfw.efi I have to boot a trial version of Ubuntu, mount that first partition and change that name. Likewise for changing the name in /boot/grub/grub.cfg in the Ubuntu main partition.

This hack works, except that updates to grub will cause problems. Furthermore, the font is way too small. I tried creating a larger font for grub, substituting the new font file for the default one. But then it brings up a blank screen with no menu like the one that update-grub creates.

Viktors Berstis (berstis) said : #5

So I really don't have a fix for what update-grub does, nor how to get it to work with the larger font. There may also be a bug in Lenovo's EFI support prioritizing Windows 10 over everything else.

bernard stafford (bernard010) said : #6

What I was referring to in the BIOS was Boot EFI first instead of Boot Legacy. It is on the Boot options. When changed it will only boot that option first being the EFI. Secure boot off to install Linux. The Font should not make any difference in the boot loader operations. Hope that works . I am not familiar with the trial mode from a DVD. My preference is to install the New OS on a USB using Etcher. Then optional live boot or install OS onto Hard drive.

Viktors Berstis (berstis) said : #7

It is set to use EFI. But this machine apparently does not follow the rules. If that Windows boot file is present, it uses it in priority over everthing else. By renaming this file to something else, then that does not happen and I can boot with my grub.cfg file created by the DVD Ubuntu disk.

However, update-grub somehow does not apparently recognize the display support properly and creates a config file which is useless on this machine. To debug this, I imagine you would have to actually use one of these unusual thinkpads.

Can you help with this problem?

Provide an answer of your own, or ask Viktors Berstis for more information if necessary.

To post a message you must log in.