GRUB menu is not appearing on my Lenovo C3020 AIO desktop with Windows 10 dual boot

Dear Friends,

I am sorry for the long post. This is my first post on the forum as well. Yesterday I installed Manjaro KDE version on my home desktop (Lenovo AIO C3020). This desktop came preinstalled with Windows 10 64 bits home edition. I have created a separate partition of 60 GB for Manjaro installation and SWAP file was used. My desktop has i3 processor and 4 GB DDR3 RAMand integrated Intel graphics card. Only opensource linux drivers are used. This is a UEFI type installation with GPT parttitions.

Installation went well without any issues. But when i boot up, GRUB menu does not appear. Instead Windows 10 loads by default. However I figured out during boot by hitting F12 key I can choose Manjaro partition to boot, If chosen this way, Manjaro works fabulous. I noticed attention is paid to every small details such as application defaults, default layout of applications and more. Pleasantly surprised with the quality and want to stick to this distro for long. I sincerely thank the developers and all other contributing members for such a wonderful deliverable…

I started using Linux for past 1 month, and slowly trying to learn it. I tried reading through this forum and in google my level best and tried all possible ways, but no success yet. Would appreciate if I can get help from you to fix this issue for once.Thanks a ton in advance.

Here are some of the screenshots and details giving details of my system,.

  1. My EFI partition is /dev/sda2 . Windows partition is /dev/sda5 . Manjaro partition is /dev/sda8

  2. BIOS menu displayed on F12 key press shows various old installations such as Fedora and Neon which i tried sometime last week. And also shows Windows 10 and Manjaro. Need advise on how to get rid of the older invalid entries.

  3. All other details copied and pasted from command line. If any further inputs are needed, kindly let me know.

  • List item
    $ lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME
    PATH PTTYPE PARTTYPE FSTYPE PARTTYPENAME
    /dev/sda gpt
    /dev/sda1 gpt de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs Windows recovery environment
    /dev/sda2 gpt c12a7328-f81f-11d2-ba4b-00a0c93ec93b vfat EFI System
    /dev/sda3 gpt bfbfafe7-a34f-448a-9a5b-6213eb736c22 vfat Lenovo boot partition
    /dev/sda4 gpt e3c9e316-0b5c-4db8-817d-f92df00215ae Microsoft reserved
    /dev/sda5 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs Microsoft basic data
    /dev/sda6 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs Microsoft basic data
    /dev/sda7 gpt de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs Windows recovery environment
    /dev/sda8 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem
    /dev/sr0

$ sudo fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM003-1ER1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 78A80DF3-0767-4607-A2E7-2BF7BC7EB772

Device Start End Sectors Size Type
/dev/sda1 2048 2050047 2048000 1000M Windows recovery environment
/dev/sda2 2050048 2582527 532480 260M EFI System
/dev/sda3 2582528 3606527 1024000 500M Lenovo boot partition
/dev/sda4 3606528 3868671 262144 128M Microsoft reserved
/dev/sda5 3868672 208668671 204800000 97.7G Microsoft basic data
/dev/sda6 208668672 1776001023 1567332352 747.4G Microsoft basic data
/dev/sda7 1902323712 1953523711 51200000 24.4G Windows recovery environment
/dev/sda8 1776001024 1902323711 126322688 60.2G Linux filesystem

Partition table entries are not in disk order.

  • List item

Regards
Ganesh

Hello @GMP :wink:

There are 2 possible ways to change that:

  1. Boot into your UEFI and change the bootorder there, so that Manjaro boots first.
  2. You can edit the UEFI entries with efibootmgr:
    Just open a terminal and type:
efibootmgr

and you see the UEFI bootloader entries and the boot order.
Example:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0008,0005,0007
Boot0000* Manjaro
Boot0001* ubuntu
Boot0005  UEFI OS
Boot0007  UEFI OS
Boot0008* ubuntu

Lets change ubuntu to be the first:

sudo efibootmgr --bootorder 0001,0008,0000,0005,0007

Now Ubuntu should boot, instead of Manjaro at next boot.

Hope that helps :wink:

Thank you so much for your instant response megavolt. I tried both the options given by you. First I set the options in BIOS menu and then tried the 2nd option of efibootmgr. But after this when I restarted the desktop computer, GRUB menu did not appear. Instead windows 10 is loading. However if I prsss F12 key wherein I can go to start up device menu and choose Manjaro thenstandard Manjaro GRUB menu appears. Is there any way I can correct it?

I am pasting the output of efibootmgr herewith, before and after changes -

$ sudo efibootmgr
[sudo] password for ganeshp:
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0002,0007,0008,0000,0003,0004,0001
Boot0000* manjaro
Boot0001* Realtek PXE B02 D00
Boot0002* Fedora
Boot0003* ST1000DM003-1ER162
Boot0004* HL-DT-ST DVDRAM GUD0N
Boot0007* neon
Boot0008* Windows Boot Manager

$ sudo efibootmgr --bootorder 0000,0008,0001,0003,0004,0002,0007
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0008,0001,0003,0004,0002,0007
Boot0000* manjaro
Boot0001* Realtek PXE B02 D00
Boot0002* Fedora
Boot0003* ST1000DM003-1ER162
Boot0004* HL-DT-ST DVDRAM GUD0N
Boot0007* neon
Boot0008* Windows Boot Manager

Sorry for the followup.

Regards
Ganesh

no problem :wink:

You could try to set Windows inactive:

sudo efibootmgr --inactive --bootnum 0008

(and boot Windows with grub then)

or set Manjaro to boot next:

sudo efibootmgr --bootnext 0000

also the fedora entry can be deleted like this:

sudo efibootmgr --delete-bootnum 0002

thanks again megavolt for your prompt response. Now I could delete two invalid entries. Then I tried option # 2 given by you first and marked Manjaro to boot next. This worked. As soon as I restarted the desktop I saw GRUB menu with both linux and windows option.

However I tried rebooting the machine again. GRUB menu did not appear then.

$ sudo efibootmgr --bootnext 0000
[sudo] password for ganeshp:
BootNext: 0000
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0008,0003,0004,0001
Boot0000* manjaro
Boot0001* Realtek PXE B02 D00
Boot0003* ST1000DM003-1ER162
Boot0004* HL-DT-ST DVDRAM GUD0N
Boot0008* Windows Boot Manager

Then I tried 1st option given by you to mark the boot loader partition as inactive. I see that * mark against the entry disappeared. After reboot it did not show GRUB menu, instead it was loading Windows 10 by default. this is surprising for me.

Regards
Ganesh

Very strange…

This Partition could be the problem:

But no idea, if that is relevant for windows…

Another thing: Disable the BIOS (CSM/legacy) mode completely at your UEFI, so that it boot in UEFI only mode.

I have enabled UEFI only mode in BIOS and tried. But no changes after that. All I know about Lenovo partition is it is a recovery partition. I tried booting through Manjaro livecd and tinkered with boot flags to see if anything changes. But nothing happened. I am confused a bit after this. Because the same computer worked fine with Fedora/Ubuntu/KDE Neon/Debian/centos in past few weeks with dual boot. So I suspect something might have gone wrong during the installation. So I shall try to reinstall the system today and see if it corrects the issue.

I sincerely thank you megavolt, for being patient and helping me sail through this. After re-installation I shall update the result.

Regards
Ganesh

you can use aravalli recovery tools
here
http://aravallirecovery.github.io/

I finally reinstalled Manjaro KDE on my home desktop PC. After the reboot, GRUB is missing again, Windows 10 is loading by default. I am taken by total surprise,to see this. So my assumption of something going wrong during installation was not right.

I am completely clueless now. As of now, I hit F12 to reachout to manjaro partition to load. Any pointers what might be the issue? If partition was the issue, then i assume other distros I had tried earlier should have also reported the same issue.

Regards
Ganesh

Hello Hisham_6c5,

I shall give this a try today and update. thank you.

regards
Ganesh

its under beta version and very unstable
which is your partiton skeheme
mbr/gpt
bios/uefi?
if uefi use bios it is more reilable and use mbr for some time until issue
if you dont have any inportant data in that pc you can install arch linux using archfi scrips present in your home folder
try not using swap file

Hi,

I believe i am using BIOS/UEFI. Here are the partition details -

$ sudo fdisk -l
[sudo] password for ganeshp:
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM003-1ER1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 78A80DF3-0767-4607-A2E7-2BF7BC7EB772

Device Start End Sectors Size Type
/dev/sda1 2048 2050047 2048000 1000M Windows recovery environment
/dev/sda2 2050048 2582527 532480 260M EFI System
/dev/sda3 2582528 3606527 1024000 500M Lenovo boot partition
/dev/sda4 3606528 3868671 262144 128M Microsoft reserved
/dev/sda5 3868672 208668671 204800000 97.7G Microsoft basic data
/dev/sda6 208668672 1776001023 1567332352 747.4G Microsoft basic data
/dev/sda7 1902323712 1953523711 51200000 24.4G Windows recovery environment
/dev/sda8 1776001024 1893902335 117901312 56.2G BIOS boot
/dev/sda9 1893902336 1902323711 8421376 4G Linux swap

Partition table entries are not in disk order.

Disk /dev/sdc: 57.84 GiB, 62109253632 bytes, 121307136 sectors
Disk model: Ultra
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00d90782

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 121307135 121305088 57.8G 83 Linux

/dev/sda gpt
/dev/sda1 gpt de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs Windows recovery environment
/dev/sda2 gpt c12a7328-f81f-11d2-ba4b-00a0c93ec93b vfat EFI System
/dev/sda3 gpt bfbfafe7-a34f-448a-9a5b-6213eb736c22 vfat Lenovo boot partition
/dev/sda4 gpt e3c9e316-0b5c-4db8-817d-f92df00215ae Microsoft reserved
/dev/sda5 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs Microsoft basic data
/dev/sda6 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs Microsoft basic data
/dev/sda7 gpt de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs Windows recovery environment
/dev/sda8 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem

I downloaded the Arch ISO, loaded it on USB. What i see is a linux OS Any points on how do we correct GRUB from there? thanks in advance

Regards
Ganesh

first chroot into your system
and follow this guide

instead of arch linux iso use this iso
and ther is no grub partition
install gparted and create a grub partition with size 500mb
and gpt is not a bootlader its a partition skeheme
if grub dosent work try syslinux
even if syslinux dosent work try clover bootloader
you can try clover form here but its not recomended because its a long process
https://wiki.archlinux.org/title/Clover

there is no grub partition

I believe /dev/sda8 has my grub menu and linux system. Because when I choose that partition to load i get GRUB menu. I am sorry if this was not relevant or incorrect. Bear with me. I am learning Linux fundamentals. Thank you.

Regards
Ganesh

at least set boot flags on /dev/sda8

@GMP Since you can choose and boot Manjaro, it has nothing to do with the Linux Distribution. It must be a problem with the UEFI/BIOS.

I looked at the Manual of your “Lenovo C320 All-in-One”, but found only this: Page 17

There must be a way at “Setup Utility program” to make Manjaro boot first.

Can you make pictures of it and post it here?

Sure there is none. But if windows boots, regardless of changing the UEFI bootorder, then one could think, that Windows boots in BIOS mode.

/dev/sda1 seems to be the boot partition for the BIOS mode like /boot for linux. Additionally There is also a EFI partition /dev/sda2, which boots in UEFI mode. I guess Windows is installed with both methods and it seems it checks first for a BIOS boot method and then for a UEFI method. That could be the cause of this behavior.

@megavolt,

I tried the process given in the manual. That is I pressed F1 button and powered on the PC. Nothing happened. One reason could be, original keyboard came in the box was dead and replaced. Not sure it is the reason. One other reason could be that my Windows OS crashed one year ago and I had to reinstall it from scratch after which all Lenovo preinstalled programs disappeared.

I tried visiting each partition using diskpart utility in windows 10 to check contents. I see the lenovo boot has no files or hidden files.

I tried to check partition flags for /dev/sda2 which shows /boot and /esp. And for /dev/sda8 it shows /bios-grub.

regards
Ganesh

Both reasons make no sense. The trigger of F1 at boot time is hardware and OS independent. Any keyboard can be used there. I would rather say, you must type faster… OR it is another key. The Initialization Screen of the BIOS/UEFI should show the correct key to enter (most on the bottom).

The flag “bios_grub” is totally wrong if it contains the installation. bios_grub flag is used for small 8MB Partition, which is used for the “Master Boot Record” in a BIOS Setup. GPT has not such a function like MS-DOS, so it is workaround for grub when having a BIOS (not a UEFI) and you use a GPT Partition Table.

Example BIOS setup with GPT:

  1. size: 8MB
    filesystem: not formatted
    flag: bios_grub
    (it have be at first place of the whole drive)
  2. size: 1GB
    filesystem: ext2/3/4
    flag: boot
    mountpoint: /boot
  3. size: 10GB
    filesystem: ext2/3/4
    flag: none
    mountpoint: /