UEFI not detecting linux boot partition

After updating my UEFI through windows, it can’t detect my Linux boot partition and instead boots directly into windows. However, I can boot to my existing Linux installation through the live USB.

The KDE Partition Tool shows a mounted /boot/efi partition called SYSTEM_DRV formatted in Fat32 with a size of 260 MiB with bootable and esp flags. Secure boot was enabled after the update, so I disabled it again.
I’m using Manjaro KDE with dual boot, everything worked as expected before the update.

Welcome to the forum! :slight_smile:

Is your UEFI set up to boot in UEFI mode only? If not, enter the setup utility and disable CSM ─ this is important.

Next, boot up from the live USB and open up a terminal. Issue the following command… :arrow_down:

su -

Enter the root password. Now issue the following commands… :arrow_down:

mkdir /manjaro
mount /whever/your/root/partition/is /manjaro
manjaro-chroot /manjaro
grub-install --recheck --no-rs-codes --modules="part_gpt part_msdos zstd" --efi-directory="/boot/efi" --target="x86_64-efi"
update-grub
sync
exit

You should now be able to cleanly reboot your system and get the option to choose either Manjaro or Microsoft Windows. :wink:

1 Like

What do you mean with “it can’t detect my Linux boot partition”?

If your computer is using UEFI, usually you just need to change back to Manjaro your boot options in UEFI.

I get an error at grub-install ... that says /boot/efi doesn't look like an EFI partition. I booted directly from USB, and not via USB into the existing installation. Was that correct?

That’s the issue - I don’t have the option to boot into manjaro, there’s just windows as boot option in the UEFI.

Sure, because you were using a chroot. But your error… :arrow_down:

… might have been because the EFI partition wasn’t mounted. So try those commands again, but now just before typing the manjaro-chroot command, issue the following command too… :arrow_down:

mount /your/efi/partition /boot/efi

Then you can proceed with the other commands.

:crossed_fingers:

There was no directory /boot/efi, so I created one and tried to mount it again. But I got the same error again :thinking:

be careful
create a /boot/efi is a partition in fat32 , not just a directory

check on USB iso manjaro
open a terminal and returns

inxi -Fza 
sudo parted -l
sudo lsblk -fs
sudo efibootmgr -v
test -d /sys/firmware/efi && echo efi || echo bios
sudo manjaro-chroot -a ( type 1 if only one line 0 )
cat /etc/fstab
exit ( quit chroot )
  1. check if the efi partition for manjaro [fat32] is same as that of windows. twodifferent efi partition is not advisable. [that is… /boot/efi of manjaro should point to this partition]

if they are same, then all you had to do after windows update/upgrade is the boot of usb-manjaro and use chroot to install grub and update-grub. [obviously to follow the steps as mentioned in previous posts on how to]

i have broke windows and went for fresh install atleast 3/4 times and i do just this. [i happily triple boot my desktop with win10 / MX and Manjaro, where Manjaro grub is given charge to handle boot options and MX grub is installed it its root partition. /dev/sda1 is the efi]

2 Likes

I just want to be sure we are talking about the same. I’m not talking about grub menu, I mean your UEFI’s boot options (or BIOS’s boot options in the old language)

System:    Host: manjaro Kernel: 5.6.15-1-MANJARO x86_64 bits: 64 
       parameters: BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=de tz=UTC driver=free 
       nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 misobasedir=manjaro misolabel=MANJARO_KDE_2003 quiet 
       systemd.show_status=1 apparmor=1 security=apparmor 
       Desktop: KDE Plasma 5.18.5 Distro: Manjaro Linux 
Machine:   Type: Convertible System: LENOVO product: 81EK v: Lenovo YOGA 530-14IKB serial: <filter> 
       Mobo: LENOVO model: LNVNB161216 v: SDK0J40700 WIN serial: <filter> UEFI: LENOVO v: 7QCN43WW 
       date: 11/28/2019 
Battery:   ID-1: BAT0 charge: 21.6 Wh condition: 42.5/45.5 Wh (93%) 
CPU:       Topology: Quad Core model: Intel Core i5-8250U bits: 64 type: MT MCP family: 6 model-id: 8E (142) 
       stepping: A (10) microcode: CA L2 cache: 6144 KiB 
       Speed: 901 MHz min/max: 400/3400 MHz Core speeds (MHz): 1: 900 2: 900 3: 900 4: 900 5: 900 6: 900 
       7: 900 8: 900 
       Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
       Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
       Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
       Type: meltdown mitigation: PTI 
       Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
       Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
       Type: spectre_v2 
       mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
       Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
       Display: x11 server: X.Org 1.20.8 driver: intel unloaded: modesetting resolution: 1920x1080~60Hz 
       OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.0.7 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel 
       Sound Server: ALSA v: k5.6.15-1-MANJARO 
Network:   Device-1: Intel Dual Band Wireless-AC 3165 Plus Bluetooth driver: iwlwifi 
       IF: wlp1s0 state: up mac: <filter> 
Drives:    Local Storage: total: 483.98 GiB used: 219.4 MiB (0.0%) 
       ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HAJQ-000L2 size: 476.94 GiB block size: 
       physical: 512 B logical: 512 B 
       ID-2: /dev/sda type: USB vendor: Transcend model: JetFlash Transcend 8GB size: 7.04 GiB block size: 
       physical: 512 B logical: 512 B 
Partition: ID-1: / raw size: N/A size: 5.67 GiB used: 219.4 MiB (3.8%) fs: overlay source: ERR-102 
Sensors:   System Temperatures: cpu: 36.5 C mobo: N/A 
       Fan Speeds (RPM): N/A 
Info:      Processes: 213 Uptime: 7m Memory: 7.56 GiB used: 1.37 GiB (18.1%) Shell: bash inxi: 3.0.37
Model: JetFlash Transcend 8GB (scsi)
Disk /dev/sda: 7558MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      3120MB  3124MB  4194kB  primary               esp


Model: SAMSUNG MZVLB512HAJQ-000L2 (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt 
Disk Flags: 

Warning: failed to translate partition name
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   53.4GB  53.1GB  ntfs         Basic data partition          msftdata
 5      53.4GB  511GB   458GB   ext4
 4      511GB   512GB   1049MB  ntfs                                       hidden, diag
NAME      FSTYPE   FSVER      LABEL            UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0     squashfs 4.0                                                                    0   100% /run/miso/sfs/live
loop1     squashfs 4.0                                                                    0   100% /run/miso/sfs/mhwd
loop2     squashfs 4.0                                                                    0   100% /run/miso/sfs/desk
loop3     squashfs 4.0                                                                    0   100% /run/miso/sfs/root
sda1      iso9660  Joliet Ext MANJARO_KDE_2003 2020-06-06-08-14-33-00                              
└─sda     iso9660  Joliet Ext MANJARO_KDE_2003 2020-06-06-08-14-33-00                     0   100% /run/miso/bootmnt
sda2      vfat     FAT12      MISO_EFI         F327-8F27                                           
└─sda     iso9660  Joliet Ext MANJARO_KDE_2003 2020-06-06-08-14-33-00                     0   100% /run/miso/bootmnt
nvme0n1p1 vfat     FAT32      SYSTEM_DRV       A2EE-E4CA                                           
└─nvme0n1                                                                                          
nvme0n1p2                                                                                          
└─nvme0n1                                                                                          
nvme0n1p3 ntfs                Windows-SSD      A280EF8080EF5975                                    
└─nvme0n1                                                                                          
nvme0n1p4 ntfs                WINRE_DRV        BE5EF0355EEFE3DD                                    
└─nvme0n1                                                                                          
nvme0n1p5 ext4     1.0                         fc4e7640-fc57-4c51-a7c7-a34f63c6d1cd                
└─nvme0n1 
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0000* EFI USB Device (JetFlashTranscend 8GB)        PciRoot(0x0)/Pci(0x14,0x0)/USB(13,0)/HD(1,MBR,0x0,0x5cf8f0,0x2000)RC
Boot0001* Windows Boot Manager  HD(1,GPT,4cf282f4-65fe-43c8-abe1-e68772f0682e,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.4.7.9.5.}...e................
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC
efi
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> Detected systems:
 --> 0) ManjaroLinux
==> Select system to mount [0-0] : 
1
==> Mounting (ManjaroLinux) [/dev/nvme0n1p5]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]
# /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=A2EE-E4CA                            /boot/efi      vfat    umask=0077 0 2
UUID=fc4e7640-fc57-4c51-a7c7-a34f63c6d1cd /              ext4    defaults,noatime 0 1

He did tell you to press 1. :stuck_out_tongue:

Sorry, misread that :sweat_smile: I edited the post.

missing entry line in EFI for Grub

sudo manjaro-chroot -a ( type 1 if only one line 0 )
efibootmgr -c -d /dev/nvme0n1 -p 1 -L "Manjaro" -l "\EFI\Manjaro\grubx64.efi"
efibootmgr -v
exit ( for end chroot )
1 Like
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,0001,2001,2002,2003
Boot0000* EFI USB Device (JetFlashTranscend 8GB)
Boot0001* Windows Boot Manager
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
Boot0002* Manjaro
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,0001,2001,2002,2003
Boot0000* EFI USB Device (JetFlashTranscend 8GB)        PciRoot(0x0)/Pci(0x14,0x0)/USB(13,0)/HD(1,MBR,0x0,0x5cf8f0,0x2000)RC
Boot0001* Windows Boot Manager  HD(1,GPT,4cf282f4-65fe-43c8-abe1-e68772f0682e,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.4.7.9.5.}...e................
Boot0002* Manjaro       HD(1,GPT,4cf282f4-65fe-43c8-abe1-e68772f0682e,0x800,0x82000)/File(\EFI\Manjaro\grubx64.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

That worked perfectly, thanks :+1:

So everything was installed and working, but the EFI didn’t know about the Manjaro installation

lenovo remove entry EFI , check at every update ( unless they check for ubuntu )
see https://www.phoronix.com/scan.php?page=news_item&px=Lenovo-Nearly-30-Ubuntu-Preload

I made the UEFI update through an application from Lenovo, I think this was where the entry got deleted. I never had any issue doing Windows updates, but who knows…

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