Bootloader broken after replacing Ubuntu installation with Manjaro (dual boot with Win 10)

Hi everyone,

I've been dual-booting my LENOVO Yoga 720 with the pre-installed Windows 10 and Ubuntu, but I want to switch to Manjaro (keeping Windows 10). I am relatively tech-savvy, but am inexperienced with Linux, so please be patient if I miss something basic, lack understanding or fail in precise wording ...
In short: I have managed to replace my Ubuntu installation with Manjaro but it does not boot automatically, and I cannot manage to get it into the list of bootable partitions. I have read several threads in this forum on this topic, and they helped, but I am stuck ...

In my UEFI boot menu, there is still the old entry for Ubuntu, which, if booted, just opens a grub terminal (some kind of recovery? I don't really get what exactly grub does and how it does it ...) and I can boot my Manjaro installation by executing

grub> search.file /etc/manjaro-release  root
grub> configfile /boot/grub/grub.cfg

as described here. I followed the instructions in this thread, but something is still missing.
Of course, I would like my notebook to directly boot Manjaro's grub. In Manjaro, I tried sudo grub-install and sudo update-grub, without success. I tried around with efibootmgr as described in the thread I linked to above, but I really don't know what I am doing there--I might have messed something up already ... I have the feeling that I just need the right set of commands, but I can't figure it out myself ... here is some information that I hope helps you to find out what I need to do:

First, my system details as output by inxi -Fxz:

System:    Host: fredder-pc Kernel: 4.14.53-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.1.1 
           Desktop: Gnome 3.28.2 Distro: Manjaro Linux 17.1.11 Hakoila 
Machine:   Type: N/A System: LENOVO product: 80X6 v: Lenovo YOGA 720-13IKB serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <filter> UEFI: LENOVO v: 1YCN36WW(V2.03) 
           date: 09/11/2017 
Battery:   ID-1: BAT1 charge: 14.9 Wh condition: 45.0/48.0 Wh (94%) model: SIMPLO PABAS0241231 
           status: Discharging 
CPU:       Topology: Dual Core model: Intel Core i7-7500U bits: 64 type: MT MCP arch: Kaby Lake rev: 9 
           L2 cache: 4096 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 23240 
           Speed: 900 MHz min/max: 400/2700 MHz Core speeds (MHz): 1: 900 2: 900 3: 900 4: 900 
Graphics:  Card-1: Intel HD Graphics 620 driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: N/A driver: i915 resolution: <xdpyinfo missing> 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 620 (Kaby Lake GT2) v: 4.5 Mesa 18.1.3 
           direct render: Yes 
Audio:     Card-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Sound Server: ALSA v: k4.14.53-1-MANJARO 
Network:   Card-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel bus ID: 3f:00.0 
           IF: wlp63s0 state: up mac: <filter> 
           Card-2: IMC Networks type: USB driver: uvcvideo bus ID: 1:2 
Drives:    HDD Total Size: 238.47 GiB used: 5.77 GiB (2.4%) 
           ID-1: /dev/nvme0n1 vendor: Toshiba model: THNSN5256GPUK size: 238.47 GiB 
Partition: ID-1: / size: 146.87 GiB used: 5.74 GiB (3.9%) fs: ext4 dev: /dev/nvme0n1p6 
           ID-2: swap-1 size: 15.71 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p7 
Sensors:   System Temperatures: cpu: 39.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 178 Uptime: 25m Memory: 7.52 GiB used: 1.38 GiB (18.4%) Init: systemd Compilers: gcc: N/A 
           Shell: bash v: 4.4.23 inxi: 3.0.12 

Output by efibootmgr -v:

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001,0000,2001,2002,2003
Boot0000* THNSN5256GPUK TOSHIBA           	BBS(HD,THNSN5256GPUK TOSHIBA           ,0x500)..@.............+..P....#..P?..P...................................?...
Boot0001* Windows Boot Manager	HD(1,GPT,706f5cfe-3d05-467b-bfc3-64599db7e63f,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0002* ubuntu	HD(1,GPT,706f5cfe-3d05-467b-bfc3-64599db7e63f,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0003* Windows Boot Manager	HD(1,GPT,706f5cfe-3d05-467b-bfc3-64599db7e63f,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0004* ubuntu	HD(1,GPT,706f5cfe-3d05-467b-bfc3-64599db7e63f,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0005* manjaro	HD(1,MBR,0x841e857d,0x40,0x398598)/File(\EFI\Manjaro\grubx64.efi)
Boot0006* Windows Boot Manager	HD(1,GPT,706f5cfe-3d05-467b-bfc3-64599db7e63f,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.}....................
Boot0007* manjaro	HD(2,GPT,7b974029-258a-40b2-9ef5-84a7a94dff7a,0x82800,0x8000)/File(\EFI\Manjaro\grubx64.efi)
Boot2001* EFI USB Device	RC
Boot2003* EFI Network	RC

Obviously, there is something wrong--Ubuntu is still there, there are three entries for Windows and two for Manjaro. I guess this is where the problem is?

Output by sudo parted -l:

Model: Unknown (unknown)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  274MB   273MB   fat32           EFI system partition          boot, esp
 2      274MB   290MB   16,8MB                  Microsoft reserved partition  msftres
 3      290MB   68,9GB  68,6GB  ntfs            Basic data partition          msftdata
 6      68,9GB  230GB   161GB   ext4
 7      230GB   247GB   16,9GB  linux-swap(v1)
 4      247GB   255GB   7969MB  ntfs            Basic data partition          msftdata
 5      255GB   256GB   1049MB  ntfs            Basic data partition          hidden, diag

Output by sudo blkid:

/dev/nvme0n1p1: LABEL="SYSTEM_DRV" UUID="B8EC-990F" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="706f5cfe-3d05-467b-bfc3-64599db7e63f"
/dev/nvme0n1p3: LABEL="Windows" UUID="1ADAED6EDAED469B" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="e61c8107-2bd1-4c32-b6d5-c797b2885c9c"
/dev/nvme0n1p4: LABEL="LENOVO" UUID="CA8E07C68E07AA51" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c6d32f61-9628-46a4-9967-e327e15ba3b8"
/dev/nvme0n1p5: LABEL="WINRE_DRV" UUID="D2F2EF30F2EF180D" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="814f6311-b46d-4eb8-8cb8-816c120168d3"
/dev/nvme0n1p6: UUID="376e847b-dfb6-4c49-9939-f826a8ff8c69" TYPE="ext4" PARTUUID="c0813555-4d35-481f-a773-22f5d64e9330"
/dev/nvme0n1p7: UUID="207af92b-a410-4529-a76b-490aaa74df72" TYPE="swap" PARTUUID="d605e5db-e2f2-4dbc-b1f3-088a082803f0"
/dev/nvme0n1: PTUUID="02979aae-a664-4d4e-b92f-741247d7be60" PTTYPE="gpt"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="7b974029-258a-40b2-9ef5-84a7a94dff7a"

Output by findmnt -s:

TARGET    SOURCE                                    FSTYPE OPTIONS
/boot/efi UUID=B8EC-990F                            vfat   defaults,noatime
/         UUID=376e847b-dfb6-4c49-9939-f826a8ff8c69 ext4   defaults,noatime
swap      UUID=207af92b-a410-4529-a76b-490aaa74df72 swap   defaults,noatime

Output by findmnt /boot/efi/:

/boot/efi /dev/nvme0n1p1 vfat   rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro

sudo grub-install executes without error; sudo update-grub says:

Generating grub configuration file ...
Found background: /usr/share/grub/background.png
Found linux image: /boot/vmlinuz-4.14-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.14-x86_64.img
Found initrd fallback image: /boot/initramfs-4.14-x86_64-fallback.img
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.

I read about the problem with Lenovo notebooks here and about the 'drastic' solution, which I would only like to try as a last measure.

Is any more information about my system necessary? Any help is highly appreciated--thank you very much in advance :upside_down_face:


First a short note to say your post (and a first one at that) is an excellent example of providing complete and useful information for others to be able to help.

Now, since we know you prefer not to do that 'drastic' solution (and who can blame you for that), there is an alternative in your case. You no longer have Ubuntu and the ubuntu bootentry is still there. That's good. So we just have to fake that Ubuntu efi-file as Manjaro instead of faking microsoft efi-file.

To do Manjaro terminal

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/Ubuntu/shimx64.efi

Good luck.

@AgentS, sorry beat you to it. But why the rage? :grinning::smiley::rofl:
We're partners, remember? :rofl:

When installing Manjaro, have you selected any esp partition with mount point /boot/efi ?
It seems you didn't as your /etc/fstab will assure:

cat /etc/fstab

If no /boot/efi entry in fstab, you have to do proper installation of Manjaro boot loader on the current esp partition and add an entry in fstab for that.
You also have done some mess with the bootloaders... :tired_face: There is faulty entry for Manjaro using MBR instead of GPT.

Follow the (same) Tutorial to install grub but you have to mount the esp first
Before doing this from your installed Manjaro, check if you are on UEFI

grub> echo $grub_platform

If it gives pc stop and reboot to your installation media to repair it . If it is efi do these:

sudo mkdir -p /mnt/boot/efi
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo grub-install 
sudo update-grub
sudo cp /boot/grub/x86_64-efi/core.efi /mnt/boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/nvme0n1 -p 1 -L "Manjaro" -l "\EFI\Manjaro\grubx64.efi"

If there is something wrong with my assumptions, please explain.

@AgentS, yes, the OP has done that.
His info provided has clearly indicated that.
He has a manjaro bootentry which won't appear in the boororder list
And that is typical of Lenovo's which are tied up with Microsoft.

I understand the new calamares installer will be able to handle secureboot
and I presume be able to install in those Lenovo's like the OP (installing Ubuntu).
Wonder if anybody having Lenovo's like the OP tried it?
But obviously the OP cannot install Manjaro here.
Maybe he needs to install with secure boot on? I wonder.
@developers, @philm any input that may help OP here?

To OP: sorry for the conversations between petsam & I.
Please do not get distracted by it or worry about it.
That's the 'fun' nature of our Manjaro forums here and you may need to adjust to it. Thanks.

@fredder just post/report your actual situation, so we are sure you correct it properly
My mentor @gohlip will have the final word :man_student:

Worked like a charm! My notebook now directly boots Manjaro's grub. :confetti_ball:
Thank both of you for your super fast replies! And thank you for the positive feedback, I'm glad I made a good post.

I'm afraid I don't understand very much of your discussion here--would you like me to provide the output of some further commands?
Regarding your question about installation with secure boot turned on: I tried this and I think (90 % sure) that the live image did not even boot, I just got a gray screen after I told the USB-bootloader to boot the image. I could verify this if you are interested.

I have two low-priority follow-up questions: If Lenovo only wants Windows to be able to boot, why does Ubuntu work? Is Ubuntu somewhat affiliated with Microsoft, or does Ubuntu circumvent this restriction?
And: Will I run into problems if I want to change my setup again in the future, for example if I want to add another Linux installation? I will stick with Manjaro for now, but it feels like the whole bootloader system is somewhat untidy; @AgentS mentioned the faulty bootloader entries--that doesn't fell right to me and I fear to run into problems eventually. Can I do something to potentially spare my future-self some trouble? Or does it completely depend on what exactly I would want to change then?

Thanks a bunch! :v:

We can't reveal these global mysteries answers!... even if we knew, which we just speculate about. The same way certain manufacturers tie down H/W to WinOS, they do for other "loose" partners, too.

You want know unless/until you try.

Stick to Manjaro (and Manjaro community).

You are a genius after all!!... :sweat_smile:

1 Like


Good to hear and you're welcome.

There's no need to provide more output as your first post says it all and now you've fixed it.

This is also a good feedback to us. The Manjaro installer (calamares) is going to handle installation with secureboot enabled and I wonder if that should make installation in cases like yours easier without going through 'hoops and loops'. Probably not without Microsoft keys.

Ubuntu works because they finally (after a very long holdout) to use Microsoft keys. Some manufacturers (like Lenovo) has colluded with Microsoft to use only their keys so no other OS will work on the machines. After some uproar, Microsoft agrees to sell the keys to other OS's (if they want to) to enable the installation of their OS's. Microsoft original plan was even more dastardly. Red Hat was the first to accede to the demands, followed by Suse. Debian followed much later and Ubuntu, much later still, probably for their users' sake.

You shouldn't if you install Fedora or Suse. But if you install Ubuntu again, that is likely to override the bootentry as Manjaro is now using the Ubuntu bootentry name. Other distros not on the Microsoft 'key list' will not install like you are experiencing now.

That applies only to your Lenovo. Other (most, a vast majority) motherboards have no such issues because they do not collude with Microsoft (which took advantage of the secureboot facility in UEFI to lock their OS in for preinstalled machines, only with the connivance of the manufacturers, most likely with pecuniary advantages breaching fiduciary trust of their buyers).

Cheers, take care.
Oh, welcome to Manjaro.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by