Dual Boot Problems with Windows and Manjaro

Independent of the shorthand notation:
Isn’t the [ test command deprecated in favor of the [[ … ]] test construct?

No, not really. [[ is a shell builtin, whereas [ is available both as a shell builtin (in bash and most other POSIX shells) and as an on-disk executable. And, it’s required by the POSIX standard. :wink:

1 Like

The single bracketted construct is fine in this instance when we’re only expressing basic conditionals; as for it being deprecated, I’m unaware of that or why it should be so across the board.

If I recall, one of the main differences with the second construct is that it allows pattern matching, whereas the single bracketted does not.

I think the former tends to be more portable, in any case.

2 Likes

Thank you for explaining the command!

We should now come back to the main problem.

Maybe it is important: Yesterday I wasn’t able to boot into Windows. The system rebooted every time I had chosen Windows in Grub. So I tried the boot options in Grub. There were a few entries I could not interpret. I have tried one and Windows booted. Is it possible that Grub tries to start Windows with wrong parameters?

Not normally, because grub does not actually boot Windows — it simply calls the Windows boot loader.

What is the contents of your /boot/grub/grub.cfg? (Make sure to enclose it in triple backticks or use a code block, as it will be a few pages.)

This file is generated with update-grub, you don’t edit it. But looking at it helps troubleshoot booting issues.

The output of lsblk -f will also help, as it will tell us if the grub config is trying to boot the right place or not.

1 Like

I’m only looking at this abstractedly, however it’s more likely that you have somehow acquired a “zombie” UEFI boot entry, which may have previously referenced the Windows boot loader, but does no more.

You might be able to check that and remove any non functioning entries with EasyUEFI for Windows (there is a free version, though you might have to look for it).

grub.cfg:

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
search --no-floppy --fs-uuid --set=root 7577eecb-23f7-4a07-8eac-a01a3d8d9240
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_AT
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_msdos
insmod ext2
search --no-floppy --fs-uuid --set=root 7577eecb-23f7-4a07-8eac-a01a3d8d9240
insmod gfxmenu
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_14.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_24.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_48.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_bold_16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_mono_12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-14.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-18.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b14.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b18.pf2
insmod png
set theme=($root)/usr/share/grub/themes/manjaro/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7577eecb-23f7-4a07-8eac-a01a3d8d9240' {
	savedefault
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	search --no-floppy --fs-uuid --set=root 7577eecb-23f7-4a07-8eac-a01a3d8d9240
	linux	/boot/vmlinuz-6.12-x86_64 root=UUID=7577eecb-23f7-4a07-8eac-a01a3d8d9240 rw  quiet splash resume=UUID=8708d9e9-4e5b-490b-b93e-465abbd4a30a udev.log_priority=3
	initrd	/boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-6.12-x86_64.img
}
submenu 'Erweiterte Optionen für Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-7577eecb-23f7-4a07-8eac-a01a3d8d9240' {
	menuentry 'Manjaro Linux (Kernel: 6.12.48-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.12.48-1-MANJARO x64-advanced-7577eecb-23f7-4a07-8eac-a01a3d8d9240' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		search --no-floppy --fs-uuid --set=root 7577eecb-23f7-4a07-8eac-a01a3d8d9240
		linux	/boot/vmlinuz-6.12-x86_64 root=UUID=7577eecb-23f7-4a07-8eac-a01a3d8d9240 rw  quiet splash resume=UUID=8708d9e9-4e5b-490b-b93e-465abbd4a30a udev.log_priority=3
		initrd	/boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-6.12-x86_64.img
	}
	menuentry 'Manjaro Linux (Kernel: 6.12.48-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.12.48-1-MANJARO x64-fallback-7577eecb-23f7-4a07-8eac-a01a3d8d9240' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		search --no-floppy --fs-uuid --set=root 7577eecb-23f7-4a07-8eac-a01a3d8d9240
		linux	/boot/vmlinuz-6.12-x86_64 root=UUID=7577eecb-23f7-4a07-8eac-a01a3d8d9240 rw  quiet splash resume=UUID=8708d9e9-4e5b-490b-b93e-465abbd4a30a udev.log_priority=3
		initrd	/boot/initramfs-6.12-x86_64-fallback.img
	}
	menuentry 'Manjaro Linux (Kernel: 5.10.244-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.244-1-MANJARO x64-advanced-7577eecb-23f7-4a07-8eac-a01a3d8d9240' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		search --no-floppy --fs-uuid --set=root 7577eecb-23f7-4a07-8eac-a01a3d8d9240
		linux	/boot/vmlinuz-5.10-x86_64 root=UUID=7577eecb-23f7-4a07-8eac-a01a3d8d9240 rw  quiet splash resume=UUID=8708d9e9-4e5b-490b-b93e-465abbd4a30a udev.log_priority=3
		initrd	/boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
	}
	menuentry 'Manjaro Linux (Kernel: 5.10.244-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.244-1-MANJARO x64-fallback-7577eecb-23f7-4a07-8eac-a01a3d8d9240' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		search --no-floppy --fs-uuid --set=root 7577eecb-23f7-4a07-8eac-a01a3d8d9240
		linux	/boot/vmlinuz-5.10-x86_64 root=UUID=7577eecb-23f7-4a07-8eac-a01a3d8d9240 rw  quiet splash resume=UUID=8708d9e9-4e5b-490b-b93e-465abbd4a30a udev.log_priority=3
		initrd	/boot/initramfs-5.10-x86_64-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/15_ostree ###
### END /etc/grub.d/15_ostree ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
# This menu entry is supported only on PC BIOS platforms.
if [ "$grub_platform" = "pc" ]; then
menuentry 'Windows 10 (auf /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-chain-707C2F317C2EF190' {
	savedefault
	insmod part_msdos
	insmod ntfs
	search --no-floppy --fs-uuid --set=root 707C2F317C2EF190
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
fi
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/41_snapshots-btrfs ###
### END /etc/grub.d/41_snapshots-btrfs ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root  7577eecb-23f7-4a07-8eac-a01a3d8d9240
        linux16 /boot/memtest86+/memtest.bin 
    }
fi
### END /etc/grub.d/60_memtest86+ ###

### BEGIN /etc/grub.d/60_memtest86+-efi ###
if [ "${grub_platform}" == "efi" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        if loadfont unicode ; then
            set gfxmode=1024x768,800x600,auto
            set gfxpayload=800x600,1024x768
            terminal_output gfxterm
        fi
        search --fs-uuid --no-floppy --set=root  7577eecb-23f7-4a07-8eac-a01a3d8d9240
        linux /boot/memtest86+/memtest.efi 
    }
fi
### END /etc/grub.d/60_memtest86+-efi ###

lsblk -f:

 NAME        FSTYPE FSVER LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINTS sda                                                                                             ├─sda1                                                                                          └─sda2      ntfs         Volume            C8465A87465A7662                                     sdb                                                                                             └─sdb1      ntfs         Volume            3AFD0023FCFFD6DB                                     sr0                                                                                             nvme0n1                                                                                         ├─nvme0n1p1 ntfs         System-reserviert 707C2F317C2EF190                                     ├─nvme0n1p2 ntfs                           886E30756E305E5E                                     └─nvme0n1p3 ntfs                           1CB842C1B84298E2                                     nvme1n1                                                                                         ├─nvme1n1p1 ext4   1.0                     7577eecb-23f7-4a07-8eac-a01a3d8d9240    1,3T    21% / └─nvme1n1p2 swap   1     swap              8708d9e9-4e5b-490b-b93e-465abbd4a30a                [SWAP] 

That can’t be right.
It is not a valid response to that command.

1 Like

My thoughts too. A C+P error maybe?

maybe - or just general lack of interest …

2 Likes

Try: sudo lsblk -f ?

I have not needed sudo for that command in a long time.

I can’t even get parted -l to display UUIDs. sudo fdisk -l is the alternative. (But it’s much more stuff we don’t need.)

It was formatted on one line. I think I deciphered it.

NAME        FSTYPE FSVER LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
 sda
  ├─sda1
  └─sda2      ntfs         Volume            C8465A87465A7662
 sdb
  └─sdb1      ntfs         Volume            3AFD0023FCFFD6DB
 sr0
 nvme0n1
  ├─nvme0n1p1 ntfs         System-reserviert 707C2F317C2EF190
  ├─nvme0n1p2 ntfs                           886E30756E305E5E
  └─nvme0n1p3 ntfs                           1CB842C1B84298E2
 nvme1n1
  ├─nvme1n1p1 ext4   1.0                     7577eecb-23f7-4a07-8eac-a01a3d8d9240    1,3T    21% /
  └─nvme1n1p2 swap   1     swap              8708d9e9-4e5b-490b-b93e-465abbd4a30a                [SWAP]

And I don’t even see an EFI partition.

1 Like

Well spotted; I didn’t think to mouse-over that and see the rest … :facepalm:

you are a magician :grin:

to the OP
@Umbra_noctis

check the result of what your post will actually look like and contain.

1 Like

Sorry! I failed to see that the formatting changed again.

Thank you for your kind help!

Could you paste the command so it’s formatted properly? (The UUIDs and everything are important to get exactly right.) So far, it looks like an unbootable system (at least by normal means that I know), and it’s obviously booting one OS.

If you can post: lsblk -f (again properly)

From the above command, you find the drive with the Windows installation you want. You can list its’ partitions with more detail in the following command.

(I’m guessing for you it is..)

sudo parted /dev/nvme0n1 print

The partition we are booting from is file system FAT32, with the flags boot, esp in the above command.

Note: We are just troubleshooting with these device names, it is already setup to boot UUIDs. (And you always should be.)

In your grub.cfg, your Windows portion looks like:

menuentry 'Windows 10 (auf /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-chain-707C2F317C2EF190' {
	savedefault
	insmod part_msdos
	insmod ntfs
	search --no-floppy --fs-uuid --set=root 707C2F317C2EF190
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}

It’s been a while since I time dual booted, but that looks all wrong. Plus, I used a FAT32 UUID that is much shorter, like: DEAD-BEEF.