Restore GRUB on dual boot

Precondition: Dual-boot Windows 11 + Ubuntu 22.04
What was done: Re-install to the Manjaro with / and /home partitions recreation.
Original EFI partition mounted to the /boot/efi according to the https://wiki.manjaro.org/index.php/UEFI_-_Install_Guide
Current state: In the UEFI in the Secure boot configuration I have OS Type - Other OS, that according to the documentation is equal to OFF, but by some reason also displays as “Enabled” on the screen in the state line. At the same time for booting has options:

  • ubuntu (ssd name) - leads to nothing that makes sense;
  • ssd name - leads to Grub that just prints welcome message and starts Manjaro;
  • Windows (ssd name) - leads to window
lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,MOUNTPOINT,PARTTYPENAME                                   ✔ 
PATH           PTTYPE PARTTYPE                             FSTYPE MOUNTPOIN PARTTYPENAME
/dev/nvme0n1   gpt                                                          
/dev/nvme0n1p1 gpt    de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs             Windows recovery environment
/dev/nvme0n1p2 gpt    c12a7328-f81f-11d2-ba4b-00a0c93ec93b vfat   /boot/efi EFI System
/dev/nvme0n1p3 gpt    e3c9e316-0b5c-4db8-817d-f92df00215ae                  Microsoft reserved
/dev/nvme0n1p4 gpt    ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs             Microsoft basic data
/dev/nvme0n1p5 gpt    de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs             Windows recovery environment
/dev/nvme0n1p6 gpt    ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs             Microsoft basic data
/dev/nvme0n1p7 gpt    0fc63daf-8483-4772-8e79-3d69d8477de4 ext4   /         Linux filesystem
/dev/nvme0n1p8 gpt    0fc63daf-8483-4772-8e79-3d69d8477de4 ext4   /home     Linux filesystem
inxi
System:
  Kernel: 6.6.10-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=da2b81da-da01-4475-9d84-407e836f9a9f rw quiet splash
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 wm: kwin_x11 vt: 2
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME H370-PLUS v: Rev 1.xx
    serial: <superuser required> UEFI-[Legacy]: American Megatrends v: 2501
    date: 11/10/2020
Memory:
  System RAM: total: 16 GiB available: 15.54 GiB used: 2.89 GiB (18.6%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-8700 bits: 64 type: MT MCP arch: Coffee Lake
    gen: core 8 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xF4
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 800 min/max: 800/4600 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
    8: 800 9: 800 10: 800 11: 800 12: 800 bogomips: 76831
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb erms est f16c flush_l1d fma fpu fsgsbase fxsr ht hwp
    hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid lahf_lm
    lm mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae
    pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti
    pts rdrand rdseed rdtscp rep_good sdbg sep smap smep smx ss ssbd sse sse2
    sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tsc tsc_adjust tsc_deadline_timer
    vme x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX unsupported
  Type: l1tf mitigation: PTE Inversion
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, STIBP: conditional,
    RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 931.51 GiB used: 10.22 GiB (1.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO Plus 1TB size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 2B2QEXM7 temp: 34.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 50 GiB size: 48.91 GiB (97.83%) used: 9.98 GiB (20.4%)
    fs: ext4 dev: /dev/nvme0n1p7 maj-min: 259:7 label: N/A
    uuid: da2b81da-da01-4475-9d84-407e836f9a9f
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 32.5 MiB (33.8%) fs: vfat dev: /dev/nvme0n1p2 maj-min: 259:2 label: N/A
    uuid: A453-3FF6
  ID-3: /home raw-size: 50 GiB size: 48.91 GiB (97.82%)
    used: 206.1 MiB (0.4%) fs: ext4 dev: /dev/nvme0n1p8 maj-min: 259:8 label: N/A
    uuid: eddca266-fb4c-460b-a766-b059888efca0
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:1 size: 529 MiB fs: ntfs
    label: \xd0\x92\xd1\x96\xd0\xb4\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xbb\xd0\xb5\xd0\xbd\xd0\xbd\xd1\x8f
    uuid: 4686521486520539
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-3: /dev/nvme0n1p4 maj-min: 259:4 size: 98.8 GiB fs: ntfs label: N/A
    uuid: C06C5DCC6C5DBE3A
  ID-4: /dev/nvme0n1p5 maj-min: 259:5 size: 596 MiB fs: ntfs label: N/A
    uuid: 0E46006A460054BD
  ID-5: /dev/nvme0n1p6 maj-min: 259:6 size: 731.5 GiB fs: ntfs label: N/A
    uuid: A48ECD628ECD2E1C
Info:
  Processes: 288 Uptime: 17m wakeups: 0 Init: systemd v: 255 default: graphical
  tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6 Packages: pm: pacman
  pkgs: 1159 libs: 343 tools: pamac pm: flatpak pkgs: 0 Shell: Zsh v: 5.9
  default: Bash v: 5.2.21 running-in: konsole inxi: 3.3.31

efibootmgr gives a warning message. I suppose because of the issue described in the https://forum.manjaro.org/t/system-bios-update-efi-variables-are-not-supported-on-this-system/146965/3

efibootmgr 
EFI variables are not supported on this system.

Goal: Make GRUB be able to see both the Manjaro and Windows 11 with possibility to choose which one to boot.

Look here

recheck all option in your UEFI ( for linux)

SecureBoot off
Fast Boot off
No CSM
No Legacy
all disks on AHCI

boot only on UEFI:<partition 1> → EFI install manjaro

you can check in terminal , before install

inxi  -Mxa
test -d /sys/firmware/efi && echo efi || echo bios
sudo parted -l

After disabling CSM and Fast Boot I’m not able anymore to select old non EFI partition for boot (That led to Manjaro). Able only to choose from Windows or old Ubuntu entry. Ubuntu entry leads to grub prompt

Hi @chandre and welcome to the Manjaro community

“OS Type - Other OS” does not disable Secure Boot

Secure Boot must be disabled in your BIOS, that’s true; but the option you describe is only a condition that must be true (Other OS) before continuing to disable Secure Boot.

You will be better served to find a copy of the User Manual for your mainboard to learn how to to disable Secure Boot, rather than relying on random Internet "How to"s. Note that there is no one-size-fits-all solution for this as every mainboard (and every BIOS) tends to be different.

I found the following article on the ASUS site How to enable or disable Secure Boot which has a 5-step procedure to follow. This is just a general walkthrough, and unfortunately, doesn’t seem to explain clearly what is required in step 5 (likely because it differs depending on BIOS used).

Generally, the Secure Boot Keys must be deleted (they can be recreated later if Secure Boot is needed); but typically you would need your mainboard manual for specific information. Having just glanced through it myself, the information needed isn’t mentioned in the manuals offered.

Another possibility is to upgrade your BIOS in case features needed to toggle Secure Boot may be available in the later BIOS version. I have nothing further to suggest.

I hope this helps. Cheers.

It’s generally recommended to have every OS multibooting in UEFI mode or in CSM (Legacy) mode; combining both technologies, while it is possible, is also a recipe for trouble. If you must have both, re-enable CSM - but leave fast boot disabled.

So. After inspiration for proper disabling different “Legacy” modes in the UEFI as it was proposed by @stephane and lose of the MBR entry for boot I decided to try to reinstall Manjaro in this true EFI mode on MB. Also as a boot device I chose UEFI flash drive instead of just flash drive

Result:

  • Warning during installation changed from “Option to use GPT on BIOS” to message related to EFI partition (probably because it is smaller than recommended, in my case 100 mb) https://forum.manjaro.org/t/faulty-warning-when-installing-kde-21-1-4-minimal-with-manual-partitioning/85123
  • Installation process successfully updated grub config
  • In UEFI I’m able to select
boot only on UEFI:<partition 1> → EFI install manjaro

as suggested @stephane

  • Manjaro grub has two proper entries for Win and Manjaro. Both seems work fine.

PS: I know that it was a “hard reset” solution. But as I had just installed Manjaro it was worth of trying just for fun and it succeed. It would be wrong to do so in case of necessity to keep system.

Thanks a lot to everybody for help

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