After setting up dual boot, Windows won’t load unless I boot into Linux first and then reboot

Hi All,

I’m new here to the forum (and fairly new to Linux) I’ve had an issue which I’ve posted on the Manjaro forums but so far seem to have them stumped so I was wondering if anyone here knew what was going on. I hope it’s ok to post this here.

I have a Windows install on an SSD (sdb) a Manjaro install on an NVMe drive (nvme0n1) and a seperate hard drive (sda) to act as a universal storage drive between the two systems (home of my documents, music, pictures etc.)

My problem is that when I enter GRUB and select Windows, if I haven’t booted up Linux immediately prior, it just gets stuck on the spinning circle with the windows logo. I then have to hard reset, boot into Linux then restart into Windows again (where it works fine). The only way for me to boot into Windows cleanly is to switch the machine on, boot into Linux, restart, then select Windows. I’ve performed two full fresh installs of each OS and still experience the same issue.

The Manjaro forums asked for outputs from the following commands so I hope posting them here may provide some useful information.

sudo os-prober

/dev/sdb2@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi

sudo grub-mkconfig -o /boot/grub/grub.cfg:

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.6-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.6-x86_64.img
Found initrd fallback image: /boot/initramfs-5.6-x86_64-fallback.img
Found Windows Boot Manager on /dev/sdb2@/efi/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

sudo fdisk -l

Disk /dev/nvme0n1: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WDS500G2B0C-00PXH0                  
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: gpt
Disk identifier: 8CD191E2-1802-674B-AEA0-1731F6E29E78

Device            Start       End   Sectors   Size Type
/dev/nvme0n1p1     2048   1050623   1048576   512M Microsoft basic data
/dev/nvme0n1p2  1050624  34605055  33554432    16G Linux swap
/dev/nvme0n1p3 34605056  97519615  62914560    30G Linux filesystem
/dev/nvme0n1p4 97519616 976768031 879248416 419.3G Linux filesystem


Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM010-2EP1
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: BBE668AD-2FD7-4118-A68F-8C6D940170D8

Device          Start        End    Sectors   Size Type
/dev/sda1        2048 1743808511 1743806464 831.5G Microsoft basic data
/dev/sda2  1743808512 1953523711  209715200   100G Linux filesystem

inxi -Fxxxza --no-host

Disk /dev/sdb: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500MX500SSD1  
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: gpt
Disk identifier: 6AE24484-4023-42F4-8F4F-00D78D6E764E

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048   1085439   1083392   529M Windows recovery environment
/dev/sdb2  1085440   1290239    204800   100M EFI System
/dev/sdb3  1290240   1323007     32768    16M Microsoft reserved
/dev/sdb4  1323008 976773119 975450112 465.1G Microsoft basic data


System:    Kernel: 5.6.15-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.6-x86_64 root=UUID=a98da364-c311-48aa-8422-bffc63af3949 rw quiet 
           resume=UUID=a07822fc-e645-46ed-b464-f7fe2a93ad9c udev.log_priority=3 
           Desktop: KDE Plasma 5.18.5 tk: Qt 5.14.2 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Desktop System: Micro-Star product: MS-7A34 v: 1.0 serial: <filter> 
           Mobo: Micro-Star model: B350 TOMAHAWK (MS-7A34) v: 1.0 serial: <filter> UEFI: American Megatrends v: 1.OR 
           date: 11/29/2019 
CPU:       Topology: 6-Core model: AMD Ryzen 5 1600 bits: 64 type: MT MCP arch: Zen family: 17 (23) model-id: 1 stepping: 1 
           microcode: 8001138 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 76821 
           Speed: 1384 MHz min/max: 1550/3200 MHz boost: enabled Core speeds (MHz): 1: 2333 2: 1271 3: 1381 4: 1378 5: 1270 
           6: 1377 7: 1380 8: 1377 9: 1820 10: 1270 11: 1269 12: 1377 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           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 AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GP106 [GeForce GTX 1060 6GB] vendor: ASUSTeK driver: nvidia v: 440.82 bus ID: 26:00.0 
           chip ID: 10de:1c03 
           Display: x11 server: X.Org 1.20.8 driver: nvidia compositor: kwin_x11 resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1060 6GB/PCIe/SSE2 v: 4.6.0 NVIDIA 440.82 direct render: Yes 
Audio:     Device-1: NVIDIA GP106 High Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 26:00.1 
           chip ID: 10de:10f1 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel 
           bus ID: 28:00.3 chip ID: 1022:1457 
           Device-3: C-Media USB PnP Audio Device type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-4:3 
           chip ID: 0d8c:0136 
           Sound Server: ALSA v: k5.6.15-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8169 v: kernel 
           port: f000 bus ID: 23:00.0 chip ID: 10ec:8168 
           IF: enp35s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 1.82 TiB used: 205.57 GiB (11.0%) 
           ID-1: /dev/nvme0n1 vendor: Western Digital model: WDS500G2B0C-00PXH0 size: 465.76 GiB block size: physical: 512 B 
           logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 211070WD scheme: GPT 
           ID-2: /dev/sda vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB block size: physical: 4096 B 
           logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: CC43 scheme: GPT 
           ID-3: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB block size: physical: 512 B logical: 512 B 
           speed: 6.0 Gb/s serial: <filter> rev: 010 scheme: GPT 
Partition: ID-1: / raw size: 30.00 GiB size: 29.40 GiB (98.01%) used: 10.51 GiB (35.7%) fs: ext4 dev: /dev/nvme0n1p3 
           ID-2: /home raw size: 419.26 GiB size: 411.68 GiB (98.19%) used: 2.90 GiB (0.7%) fs: ext4 dev: /dev/nvme0n1p4 
           ID-3: swap-1 size: 16.00 GiB used: 0 KiB (0.0%) fs: swap swappiness: 60 (default) cache pressure: 100 (default) 
           dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 33.0 C mobo: N/A gpu: nvidia temp: 30 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 33% 
Info:      Processes: 307 Uptime: 4m Memory: 11.71 GiB used: 1.37 GiB (11.7%) Init: systemd v: 245 Compilers: gcc: 10.1.0 
           Shell: bash v: 5.0.17 running in: konsole inxi: 3.0.37

Content of 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=172B-18F9                            /boot/efi      vfat    umask=0077 0 2
UUID=a07822fc-e645-46ed-b464-f7fe2a93ad9c swap           swap    defaults,noatime 0 2
UUID=a98da364-c311-48aa-8422-bffc63af3949 /              ext4    defaults,noatime 0 1
UUID=d0d78356-62f2-48a5-aaa9-33c93e410021 /home          ext4    defaults,noatime 0 2

#storage mount
UUID=F2CE9013CE8FCE73 /mnt/data ntfs-3g  auto,exec,rw 0 0

sudo blkid


/dev/nvme0n1p1: UUID="172B-18F9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="3b22599c-3770-1c40-925f-9feb009632d4"
/dev/nvme0n1p2: UUID="a07822fc-e645-46ed-b464-f7fe2a93ad9c" TYPE="swap" PARTUUID="81041b02-0697-044f-a032-5c0b6f8b1b5c"
/dev/nvme0n1p3: UUID="a98da364-c311-48aa-8422-bffc63af3949" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="805bebbe-04f7-044a-b7f3-6b1edd2d7fe1"
/dev/nvme0n1p4: UUID="d0d78356-62f2-48a5-aaa9-33c93e410021" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="14302a5e-d6d7-ce4e-a32b-c0b8fd935738"
/dev/sda1: LABEL="Data" BLOCK_SIZE="512" UUID="F2CE9013CE8FCE73" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0cd54db0-eb47-45e6-acd1-38d954e4957e"
/dev/sda2: LABEL="Backup" UUID="a4854c2d-0957-4038-bad7-63a1b7f32e02" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="06ff2953-c3a4-d84e-a51e-de761e8a35e7"
/dev/sdb1: LABEL="Recovery" BLOCK_SIZE="512" UUID="C8FE279DFE278334" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c42cd91e-9fc4-438a-aa3b-640ce304c360"
/dev/sdb2: UUID="5828-0632" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="62d1c6be-2f15-4a1c-8492-da5b06028a39"
/dev/sdb3: PARTLABEL="Microsoft reserved partition" PARTUUID="2e92f6c7-2c85-4881-b0d0-dc94782f7ab0"
/dev/sdb4: BLOCK_SIZE="512" UUID="C0E62F89E62F7F32" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="3dc965d4-4c2d-4f02-894d-8558d3e10da3"

findmnt -s


TARGET    SOURCE                                    FSTYPE  OPTIONS
/boot/efi UUID=172B-18F9                            vfat    umask=0077
swap      UUID=a07822fc-e645-46ed-b464-f7fe2a93ad9c swap    defaults,noatime
/         UUID=a98da364-c311-48aa-8422-bffc63af3949 ext4    defaults,noatime
/home     UUID=d0d78356-62f2-48a5-aaa9-33c93e410021 ext4    defaults,noatime
/mnt/data UUID=F2CE9013CE8FCE73                     ntfs-3g auto,exec,rw

findmnt /boot/efi

TARGET    SOURCE         FSTYPE OPTIONS
/boot/efi /dev/nvme0n1p1 vfat   rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro

Thanks for your time, hopefully someone here has an idea what may be causing my issue.

Hi. I think the issue is with SecureBoot, perhaps.
To check if Secure is is enabled, run this cmd on linux,
od -An -t u1 /sys/firmware/efi/vars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c/data
Secure Boot is enabled if the command outputs ‘1’
If Secure Boot is disabled, then I think you have some mysterious issue. Dual boot should work for you. If you still have SecureBoot enabled:

Next, I think it’s strange, I compared my settings. Perhaps a review of what I see may help.

  1. your os-prober command returns …sdb2, which is second disk, second partition. It seems maybe Linux was installed before Windows. So Manjaro would not know about looking for Windows Key for sharing dualboot. For example, to allow Dual boot when Secure Boot is enabled on a Windows 10 machine, the bootloader of openSUSE has to have a signature by Microsoft, which I think it does now, since 2013. But this boot loader stuff is over my head. When you said reinstalled everything, did try re-installing windows first?

  2. Just curious, what kind of machine is it? like a dell desktop, or custom? Seems strange in how fdisk command doesn’t list the standard Windows partitions. mine has 4.
    /dev/sda2 EFI system
    /dev/sda3 Microsoft Reserved
    /dev/sda4 Microsoft basic data (you have this one but yours is on sda1.
    /dev/sda1 831.5G Microsoft basic data (you have this)

I’m still trying to figure out a good way to keep SecureBoot, but have a nice menu come up to select either Windows or Linux. I have a similar issue to you I think. If I reboot, the upcoming bootup will only go with what was previously booted. Look forward to if you find a solution.

1 Like

Hi. I think the issue is with SecureBoot, perhaps.

I’d suggest to try by disabling SecureBoot if it is enabled.

I’ve had to disable mine - otherwise linux won’t boot :upside_down_face:

From what I’ve read about secureboot - It’s complicated.
Here’s some reading to keep you all distracted :slight_smile:
Windows trusted boot process
Archwiki UEFI/SecureBoot
efi-bootloaders by Rod Smith If you really want to take the deep dive

1 Like

a couple of things you could try

disabling Secure boot in uefi might help

also sometimes motherboards especially older ones do strange things with NVMe drives a firmware update might be a good idea.

There may also be something in the boot sequence that is preventing the non NVMe drives from booting properly when sata is initialized first. I would recommend unplugging the nvme drive and doing a full reboot of the computer along with a bios reset. This will help to narrow down what is causing the problem.

I have also run into issues with some motherboards where they will only boot from specific sata ports on the motherboard. I would recommend looking up the manual of your mother board and possibly trying a different sata port.

1 Like

its probably in your grub.cfg
cat /boot/grub/grub.cfg

1 Like

Thanks for the in depth response. I was searching around my BIOS to establish whether or not secure boot was enabled and I found that it was actually in CSM mode which seems to have some extended BIOS legacy support rather than full UEFI. I’ve disabled this and set to full UEFI which allows me to access secure boot options, this is disabled. Although I ran the command you suggested and it reported ‘No such file or directory’.

My machine is one I built, I installed Windows first (this seems to be safer) with only that drive installed, then I installed the two further drives for Linux install and data.

I wonder if it might resolve the issue if I re-install now I’ve set the motherboard to UEFI rather than CSM.

Thanks for your help.

1 Like

sounds good. Sounds like you found where the Secure Boot setting is in your GUI. That command I gave, I think is only for the free version of SuseLinux, called OpenSUSE. Sorry about that. I generally like SecureBoot. If you disable it, I think it has risk of rootkit malware. I attached some pictures here, as a reminder. Or I’m wondering if UEFI is all you need. And Secure Boot is just a bootup headache. I don’t really know how to determine the difference between Secure Boot and UEFI, or which does the malware prevention, or checks for loading, what is it called, signed kernels.




1 Like