Grub not booting unless i manually boot it from live CD

My setup is windows 8.1 + Manjaro, Secure boot off, EFI + GPT.

I installed Manjaro several times with no success to boot, the problem is it boots straight away to windows, tried several solutions rEFind method, reinsalled Grub and updated, nothing worked. After fiddeling around i was able to boot Manjaro on HDD from the live CD before entering the live OS i access EFI boot and one of the option on GPT2 was bootx64.efi when selected it booted Grub and i was able to choose Manajro. NB had another option on GPT3 also bootx64.efi when i choose it, it loads something then reboots the laptop.

Now my question is what am i missing why am i able to boot grub manually but it’s not booting automatically ?

/EFI/Boot/Manjaro exists on ESI drive

HW is Lenovo Z510

TARGET SOURCE FSTYPE OPTIONS
/boot/efi /dev/sda2 vfat rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,

test -d /sys/firmware/efi && echo UEFI || echo BIOS
UEFI

fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
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: 92B8391D-8FE6-43E5-8358-2E6F8E4D22A9

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    4630527    2048000  1000M Lenovo boot partition
/dev/sda4     4630528    4892671     262144   128M Microsoft reserved
/dev/sda5     4892672 1020397567 1015504896 484.2G Microsoft basic data
/dev/sda6  1873137664 1874059263     921600   450M Windows recovery environment
/dev/sda7  1874059264 1874982911     923648   451M Windows recovery environment
/dev/sda8  1874982912 1875904511     921600   450M Windows recovery environment
/dev/sda9  1875904512 1928333311   52428800    25G Microsoft basic data
/dev/sda10 1928333312 1953523711   25190400    12G Windows recovery environment
/dev/sda11 1020397568 1839597567  819200000 390.6G Linux filesystem
/dev/sda12 1839597568 1873137663   33540096    16G Linux swap

Partition table entries are not in disk order.




Disk /dev/mapper/luks-45b9f380-6004-4912-9397-7a329ccb0f73: 390.6 GiB, 419428302848 bytes, 819195904 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
[Sony boot]# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=3A21-0848                            /boot/efi      vfat    defaults,noatime 0 2
/dev/mapper/luks-45b9f380-6004-4912-9397-7a329ccb0f73 /              ext4    defaults,noatime 0 1
UUID=5ba406d2-9753-4d8e-924d-243ba666295b swap           swap    defaults,noatime 0 2
[Sony boot]# efibootmgr
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,2001,0001,2002,2003
Boot0000* Windows Boot Manager
Boot0001* Lenovo Recovery System
Boot0002* EFI USB Device (USB3.0  FLASH DRIVE)
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

Assuming you had set up correctly ($esp as /boot/efi…) (and I think so), you probably have a Lenovo which is tied in, locked in, with Microsoft that it cannot boot anything else other than using Microsoft boot.

Going out for a walk for coffee with dog but can you please proveid make and model.
Search more here and you can find others with this same problem.

Screw Lenovo.

Ok, got it.

One drastic ‘solution’ is to rename the manjaro efi file as the windows efi file.
First move the windows file to a higher directory before doing so just in case we mess up so we can revert to the same situation.

At Manjaro terminal

sudo cp /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/Microsoft/bootmgfw.efi
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/Microsoft/Boot/bootmgfw.efi

Note the second command is because you said

and that will fix the problem.

Reboot and it should boot to the Manjaro grub menu. Boot up Manjaro and do

sudo update-grub

If that does not boot windows (possible because you moved windows efi file up a directory), Then we’ll add a custom entry for windows in our grub menu.
At Manjaro terminal

sudo touch /boot/grub/custom.cfg

Then open up that file /boot/grub/custom.cfg
and add following to it and then save the file. That’s it. No need to ‘update-grub’. It won’t appear in grub.cfg or os-prober but entry will be there (at bottom of grub menu) when you reboot.


menuentry "Windows New directory" {
        insmod part_gpt
        insmod fat
        insmod chain
        search --no-floppy --fs-uuid --set=3A21-0848
        chainloader /EFI/Microsoft/bootmgfw.efi
}


If you do not want to this. it’s okay; but I don’t think you can fix it with the Lenovo setup that you have. As you found out, rEFInd (and system-d boot) won’t either.

Good luck.

ps: your first post is a very good example of how people should post requesting help in issues.
I commend you for it and hope others here can learn from your example. :+1::slight_smile:

2 Likes

Thank this solved it, i did my due diligence before posting so I figured better ask with everything included as I know it will make it easier to get help :slight_smile:

I had to add custom entry for windows as you stated. Now before it boots anything it asks me to unencrypt the Linux partition shouldn’t it ask after I choose to load manjaro ?

That’s very good. :clap:

Good also you told us. I wouldn’t know as I do not have the problem.
And lucky I also do my ‘due diligence’ on my part. :wink:

Now this… I really do not know (I don’t have encryption).
Can somebody else here please help out on this? Thanks.

Cheers, take care.

1 Like

I think ill move the second question to a new post

1 Like

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

Forum kindly sponsored by Bytemark