Fix Bootloader for Dual Boot Manjaro/Windows

Dear Forum,

these are my very first steps with Linux in general and i am looking for help to fix my bootloader.

win10 is installed on drive1 (ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 500GB )

i created a bootable usb-stick with manjaro and installed on drive2 (ID-2: /dev/sda vendor: Crucial model: CT275MX300SSD1)
in the installation process, i had the option to install the bootloader on drive1, but i wasn’t sure about that and selected drive2 instead. (i wanted to switch system with my bios boot menu)

now, whatever i select in my bios boot menu, manjaro will startup, and i have no option to boot windows.

please correct me if i am wrong:
from my beginner level, i understood for now, that my windows had no bootloader installed and the drive was selected from the bios. after my manjaro installation the ‘real’ bootloader now kicks in and boots up manjaro (of course).

i tried

sudo update-grub                                               
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.9-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.9-x86_64.img
Found initrd fallback image: /boot/initramfs-5.9-x86_64-fallback.img
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

But windows was not added.

i want to learn more about the ‘bootloader’ system, to understand it more and i want to learn the linux utillities how to tackle the problem.

thanks in advance.

i appreciate your help with command lines and would love it, when you could comment on them for my understanding. :slight_smile:

System:
  Kernel: 5.9.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.9-x86_64 
  root=UUID=c9f4eef2-b12c-46c3-903d-81e9e8bf19de ro quiet splash apparmor=1 
  security=apparmor resume=UUID=290985d3-85ac-4f77-aeeb-b9da7055bc49 
  udev.log_priority=3 
  Desktop: GNOME 3.38.4 tk: GTK 3.24.27 wm: gnome-shell dm: GDM 3.38.2.1 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Desktop Mobo: ASUSTeK model: STRIX Z270F GAMING v: Rev 1.xx 
  serial: <filter> UEFI-[Legacy]: American Megatrends v: 0906 date: 03/22/2017 
Battery:
  Device-1: hidpp_battery_0 model: Logitech MX Keys Wireless Keyboard 
  serial: <filter> charge: 55% (should be ignored) rechargeable: yes 
  status: Discharging 
Memory:
  RAM: total: 31.3 GiB used: 5.54 GiB (17.7%) 
  Array-1: capacity: 64 GiB slots: 4 EC: None max-module-size: 16 GiB 
  note: est. 
  Device-1: ChannelA-DIMM1 size: No Module Installed 
  Device-2: ChannelA-DIMM2 size: 8 GiB speed: 2133 MT/s type: DDR4 
  detail: synchronous bus-width: 64 bits total: 64 bits manufacturer: CRUCIAL 
  part-no: BLS8G4D240FSB.16FBD serial: <filter> 
  Device-3: ChannelB-DIMM1 size: 16 GiB speed: 2133 MT/s type: DDR4 
  detail: synchronous bus-width: 64 bits total: 64 bits manufacturer: G-Skill 
  part-no: F4-2400C15-16GIS serial: N/A 
  Device-4: ChannelB-DIMM2 size: 8 GiB speed: 2133 MT/s type: DDR4 
  detail: synchronous bus-width: 64 bits total: 64 bits manufacturer: CRUCIAL 
  part-no: BLS8G4D240FSB.16FBD serial: <filter> 
CPU:
  Info: Quad Core model: Intel Core i7-7700K socket: LGA1151 bits: 64 
  type: MT MCP arch: Kaby Lake family: 6 model-id: 9E (158) stepping: 9 
  microcode: DE cache: L1: 256 KiB L2: 8 MiB L3: 8 MiB bogomips: 67224 
  Speed: 800 MHz min/max: 800/4600 MHz base/boost: 4200/8300 volts: 1.1 V 
  ext-clock: 100 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 
  6: 800 7: 800 8: 800 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat 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 ept ept_ad erms est 
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr hle ht hwp hwp_act_window 
  hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single 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 rtm sdbg sep smap smep ss ssbd sse sse2 sse4_1 
  sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust 
  tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt 
  xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  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: srbds mitigation: Microcode 
  Type: tsx_async_abort mitigation: Clear CPU buffers; SMT vulnerable 
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: ASUSTeK driver: nvidia 
  v: 460.56 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1b80 
  class-ID: 0300 
  Display: server: X.org 1.20.10 compositor: gnome-shell driver: 
  loaded: nvidia resolution: <missing: xdpyinfo> 
  OpenGL: renderer: GeForce GTX 1080/PCIe/SSE2 v: 4.6.0 NVIDIA 460.56 
  direct render: Yes 
Audio:
  Device-1: Intel 200 Series PCH HD Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a2f0 
  class-ID: 0403 
  Device-2: NVIDIA GP104 High Definition Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus-ID: 01:00.1 chip-ID: 10de:10f0 
  class-ID: 0403 
  Device-3: Razer USA Gaming Webcam [Kiyo] type: USB 
  driver: snd-usb-audio,uvcvideo bus-ID: 1-5:5 chip-ID: 1532:0e03 
  class-ID: 0102 
  Sound Server-1: ALSA v: k5.9.16-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.23 running: yes 
Network:
  Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: kernel 
  port: f000 bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200 
  IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB 
  driver: btusb v: 0.8 bus-ID: 1-4:4 chip-ID: 0a12:0001 class-ID: e001 
  Report: This feature requires one of these tools: hciconfig/bt-adapter 
Logical:
  Message: No LVM data was found. 
RAID:
  Message: No RAID data was found. 
Drives:
  Local Storage: total: 3.43 TiB used: 408.15 GiB (11.6%) 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO 500GB 
  size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 rotation: SSD serial: <filter> rev: 2B2QEXE7 temp: 32.9 C 
  scheme: GPT 
  SMART: yes health: PASSED on: 52d 10h cycles: 417 
  read-units: 5,397,289 [2.76 TB] written-units: 7,925,276 [4.05 TB] 
  ID-2: /dev/sda maj-min: 8:0 vendor: Crucial model: CT275MX300SSD1 
  family: Micron Client SSDs size: 256.17 GiB block-size: physical: 512 B 
  logical: 512 B sata: 3.2 speed: 6.0 Gb/s rotation: SSD serial: <filter> 
  rev: R040 temp: 32 C scheme: MBR 
  SMART: yes state: enabled health: PASSED on: 213d 15h cycles: 926 
  written: 22.46 TiB 
  ID-3: /dev/sdb maj-min: 8:16 vendor: Toshiba model: DT01ACA300 
  family: 3.5" DT01ACA... Desktop HDD size: 2.73 TiB block-size: 
  physical: 4096 B logical: 512 B sata: 3.0 speed: 6.0 Gb/s rotation: 7200 rpm 
  serial: <filter> rev: ABB0 temp: 38 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 73d 2h cycles: 482 
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVDRAM GH24NSD1 rev: LG00 
  dev-links: cdrom 
  Features: speed: 12 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
Partition:
  ID-1: / raw-size: 221.74 GiB size: 217.26 GiB (97.98%) 
  used: 21.92 GiB (10.1%) fs: ext4 block-size: 4096 B dev: /dev/sda1 
  maj-min: 8:1 label: N/A uuid: c9f4eef2-b12c-46c3-903d-81e9e8bf19de 
  ID-2: /run/media/marcmantei/3648560A4855C8EF raw-size: 465.76 GiB 
  size: 465.76 GiB (100.00%) used: 386.23 GiB (82.9%) fs: ntfs 
  block-size: 4096 B dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A 
  uuid: 3648560A4855C8EF 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 34.43 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/sda2 maj-min: 8:2 label: N/A 
  uuid: 290985d3-85ac-4f77-aeeb-b9da7055bc49 
Unmounted:
  ID-1: /dev/sdb1 maj-min: 8:17 size: 16 MiB fs: N/A label: N/A uuid: N/A 
  ID-2: /dev/sdb2 maj-min: 8:18 size: 2.73 TiB fs: ntfs label: 3TB 
  uuid: 449A36CA9A36B86E 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 16 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-1:2 info: Microsoft IntelliMouse Explorer 3.0 type: Mouse 
  driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s 
  power: 100mA chip-ID: 045e:0047 class-ID: 0301 
  Device-2: 1-3:3 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID 
  driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s 
  power: 98mA chip-ID: 046d:c52b class-ID: 0300 
  Device-3: 1-4:4 info: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) 
  type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  power: 100mA chip-ID: 0a12:0001 class-ID: e001 
  Device-4: 1-5:5 info: Razer USA Gaming Webcam [Kiyo] type: Video,Audio 
  driver: snd-usb-audio,uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s 
  power: 500mA chip-ID: 1532:0e03 class-ID: 0102 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 10 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 35.0 C mobo: N/A gpu: nvidia temp: 37 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Info:
  Processes: 330 Uptime: 3h 10m wakeups: 22 Init: systemd v: 247 
  tool: systemctl Compilers: gcc: 10.2.0 Packages: 1449 pacman: 1431 lib: 395 
  flatpak: 8 snap: 10 Shell: Zsh (sudo) v: 5.8 default: Bash v: 5.1.0 
  running-in: gnome-terminal inxi: 3.3.03

edit: maybe this helps more in detail:

sudo parted -l                                                                       ✔  8s  
[sudo] password for marcmantei: 
Model: ATA Crucial_CT275MX3 (scsi)
Disk /dev/sda: 275GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type     File system     Flags
 1      1049kB  238GB  238GB   primary  ext4            boot
 2      238GB   275GB  37,0GB  primary  linux-swap(v1)


Model: ATA TOSHIBA DT01ACA3 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17,4kB  16,8MB  16,8MB               Microsoft reserved partition  msftres
 2      16,8MB  3001GB  3001GB  ntfs         Basic data partition          msftdata


Model: Samsung SSD 970 EVO 500GB (nvme)
Disk /dev/nvme0n1: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name                  Flags
 1      1049kB  500GB  500GB  ntfs         Basic data partition  msftdata
What should I do now?
How should I proceed?

This may be of help After update, grub doesn't find windows install

hey Simonj,

i added to my grub config file /etc/default/grub the following line

# OS Prober
GRUB_DISABLE_OS_PROBER=false

and then I ran sudo update-grub and it did NOT detect and add Windows to the Grub menu. :frowning:
and it even states that os prober is run…

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.9-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.9-x86_64.img
Found initrd fallback image: /boot/initramfs-5.9-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
It's output will be used to detect bootable binaries on them and create new boot entries.
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

executing

sudo os-prober

gave me no result.
could this be the issue?

Yes I would say that is the problem

Update:

i am still stuck in the process of repairing the grub bootloader.
so far l learned about the differences of bios and uefi setups.

what i did:

formatted the Windows Reserved Partition / EFI Partition and reinstalled Windows Boot Manager successfully. → Windows was booting properly. :white_check_mark:

After that, i booted into a Manjaro Live CD, chroot into my Manjaro installation and failed to (re)install grub, because i (wrongly) formated the Windows Reserved Partition as NTFS and not Fat12/16/32… so installation went not ahead. :x:

So i (re)format the Windows Reserved partition to fat32 (loosing the windows bootmanager) and install grub successfully. Now Grub boots successfully into my Manjaro Installation. :white_check_mark:

I rechecked and the problem persists, the os-prober returns nothing.
reinstalling os-prober did not fix the issue

sudo os-prober 

returns nothing. :x:

edit:
via grub2-entry-for-windows-10-uefi
i tried adding a manual Windows entry

sudo gedit /etc/grub.d/40_custom

by adding

menuentry 'Windows 10' {
    search --fs-uuid --no-floppy --set=root 15F1-EB76
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
grub-mkconfig -o /boot/grub.cfg

but this did not work. :x:

What to do next?
How can i make os-prober work? What are the criterias os-prober checks for?
Are there any flags missing?

PS: I also made rechecked, that Windows and Linux are UEFI.

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

edit2: Windows is running in UEFI Mode

mmc_pvqZuGouXg