Can't boot encrypted Manjaro after installing Windows 10.

I've recently installed Windows 10 (on sdf2) on my Manjaro pc and now I can't boot to Manjaro.

Initially I followed Restore Manjaro boot after installing Windows 10 and after seeing that it was not for my use case I went back to my usual go to > How to chroot into an encrypted root partition
My manjaro OS installation is encrypted.

This is what I got after following the steps in How to chroot into an encrypted root partition

[manjaro@manjaro ~]$ su
[manjaro manjaro]# cryptsetup open --type luks /dev/sdg2 crypto_LUKS
Enter passphrase for /dev/sdg2:
[manjaro manjaro]# mount /dev/mapper/crypto_LUKS /mnt
[manjaro manjaro]# mount /dev/sdg1 /mnt/boot/efi
[manjaro manjaro]# mount -t proc proc /mnt/proc
[manjaro manjaro]# mount -t sysfs sys /mnt/sys
[manjaro manjaro]# mount -o bind /dev /mnt/dev
[manjaro manjaro]# mount -o bind /run /mnt/run
[manjaro manjaro]# mount -t devpts pts /mnt/dev/pts/
[manjaro manjaro]# cp /etc/resolv.conf /mnt/etc/resolv.conf
cp: overwrite '/mnt/etc/resolv.conf'? y
[manjaro manjaro]# chroot /mnt
[manjaro /]# sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
[manjaro /]# sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdd1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdd1. Check your device.map.
Found Windows Boot Manager on /dev/sdg1@/EFI/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

At boot up I get asked for the luks password as usual.

This is what grub shows:

This is what I see when trying to boot manjaro:

I have turned off Windows 10 hibernation and fast startup by running "powercfg -h off".
I have triple checked that secure boot is disabled and fast startup is disabled.

fsdisk -l

Disk /dev/sdf: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Patriot Pyro SE
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: A4D8E520-A21E-4102-8809-87C0EF7541D6

Am I using a separate /boot partition?

lsblk -f

NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0 squashfs
loop1 squashfs
loop2 squashfs
loop3 squashfs
sda
└─sda1 crypto_LUKS 71a824ab-0637-4256-ae13-05837370b207
sdb
└─sdb1 crypto_LUKS b98b7c10-be38-4ad2-9386-db4c85e08436
sdc iso9660 M1804 2019-03-12-09-50-33-00
├─sdc1 iso9660 M1804 2019-03-12-09-50-33-00
└─sdc2 vfat MISO_EFI F464-EFAB
sdd iso9660 M1804 2019-03-12-09-01-11-00
├─sdd1 iso9660 M1804 2019-03-12-09-01-11-00
└─sdd2 vfat MISO_EFI BB93-7505
sde
└─sde1 crypto_LUKS ce3460e9-3be5-4d70-8f41-1c897bc8d53c
sdf
├─sdf1
└─sdf2 ntfs AE2405DD2405A983
sdg
├─sdg1 vfat D21E-4DD9 272M 9% /boot/efi
├─sdg2 crypto_LUKS 17a2a4d7-50ad-464a-a5ac-b296631a8dae
│ └─crypto_LUKS ext4 ee80d713-9c90-4a29-94ca-64f1766ac102 10.4G 59% /
└─sdg3 crypto_LUKS 26c904e6-54b6-48bc-afe4-f11ae1e50291
sr0
nvme0n1
└─nvme0n1p1 crypto_LUKS 4aee0162-caa8-4ba8-90e7-422f514bebd7

inxi -Fxz

12System: 12Host manjaro 12Kernel 4.19.28-1-MANJARO x86_64 12bits 64 12compiler gcc 12v 8.2.1 12Desktop Xfce
12Distro Manjaro Linux
12Machine: 12Type Desktop 12Mobo ASRock 12model AB350 Pro4 12serial 12UEFI American Megatrends
12v P5.40 12date 12/19/2018
12CPU: 12Topology 8-Core 12model AMD Ryzen 7 1700 12bits 64 12type MT MCP 12arch Zen 12rev 1
12L2 cache 4096 KiB
12flags avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 12bogomips 124618
12Speed 3119 MHz 12min/max 1550/3900 MHz 12Core speeds (MHz) 121 3120 122 3115 123 2306 124 2780
125 1556 126 1557 127 3123 128 3131 129 1556 1210 1556 1211 1555 1212 1555 1213 3115 1214 3123 1215 1556
1216 1555
12Graphics: 12Device-1 NVIDIA TU106 [GeForce RTX 2070 Rev. A] 12vendor eVga.com. 12driver nvidia 12v 418.43
12bus ID 26:00.0
12Display x11 12server X.org 1.20.5 12driver nvidia 12tty N/A
12Message Advanced graphics data unavailable for root.
12Audio: 12Device-1 NVIDIA TU106 High Definition Audio 12vendor eVga.com. 12driver snd_hda_intel
12v kernel 12bus ID 26:00.1
12Device-2 AMD Family 17h HD Audio 12vendor ASRock 12driver snd_hda_intel 12v kernel
12bus ID 28:00.3
12Sound Server ALSA 12v k4.19.28-1-MANJARO
12Network: 12Device-1 Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 12vendor ASRock
12driver r8169 12v kernel 12port d000 12bus ID 25:00.0
12IF enp37s0 12state up 12speed 1000 Mbps 12duplex full 12mac
12Drives: 12Local Storage 12total 2.64 TiB 12used 17.50 GiB (0.6%)
12ID-1 /dev/nvme0n1 12vendor Intel 12model SSDPEKNW010T8 12size 953.87 GiB
12ID-2 /dev/sda 12vendor Western Digital 12model WD1002FAEX-00Z3A0 12size 931.51 GiB
12ID-3 /dev/sdb 12vendor Crucial 12model CT500MX500SSD4 12size 465.76 GiB
12ID-4 /dev/sdc 12type USB 12vendor Patriot 12model N/A 12size 3.73 GiB
12ID-5 /dev/sdd 12type USB 12model CREATIVE MuVo T100 12size 3.77 GiB
12ID-6 /dev/sde 12vendor Micron 12model C400-MTFDDAK128MAM 12size 119.24 GiB
12ID-7 /dev/sdf 12vendor Patriot 12model Pyro SE 12size 111.79 GiB
12ID-8 /dev/sdg 12vendor Intel 12model SSDSC2CW120A3 12size 111.79 GiB
12Partition: 12ID-1 / 12size 29.40 GiB 12used 17.47 GiB (59.4%) 12fs ext4 12dev /dev/dm-0
12Sensors: 12System Temperatures 12cpu 33.4 C 12mobo N/A
12Fan Speeds (RPM) N/A
12Info: 12Processes 311 12Uptime 22m 12Memory 15.66 GiB 12used 1.43 GiB (9.1%) 12Init systemd 12Compilers
12gcc 9.1.0 12Client shell wrapper 12v 5.0.9-release 12inxi 3.0.36

It appears as if your Windows is MBR because there is no indication of filesystem for sdf1.

Also the missing efivarfs is suspect as it usually indicates an MBR boot.

Can you mount the efivarfs?

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars

If yes - you should do it before chrooting the system and installing grub

Another thing - did you install Manjaro manually?

The size of the EFI partition indicates it is the default Windows EFI partition - as I recall Manjaro uses a default size of 512MB.


Useful resource on UEFI

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface


On a sidenote:
Usually installing Windows as second a system is very hard and mostly impossible.

I admit I don't try to install Windows very often and not as a second system so my experience is a bit dated. Out of curiosity and to expand my knowledge - how excatly did you make it happen?

Do you mind sharing the excact steps taken - it is usually during the Windows installer partitioning - the winstaller fails?

1 Like

AFAIK my brother runs an EFI Windows 10 PC and he was the one the one that made the USB installation drive that I used. I remember that in Windows 7 you had to do additional steps to make a UEFI Windows 7 installation USB, but I don't think it's the case for Windows 10.

It appears as if your Windows is MBR because there is no indication of filesystem for sdf1.

I added the result from "fdisk -l" for the Windows partition in the original post.

mount -t efivarfs efivarfs /sys/firmware/efi/efivars
mount: /sys/firmware/efi/efivars: efivarfs already mounted on /sys/firmware/efi/efivars.

I ran "mount -t efivarfs efivarfs /sys/firmware/efi/efivars" right before the "chroot /mnt" step in How to chroot into an encrypted root partition and I still get

mount -t efivarfs efivarfs /sys/firmware/efi/efivars
mount: /sys/firmware/efi/efivars: efivarfs already mounted on /sys/firmware/efi/efivars.

did you install Manjara manually?

If by manually you mean by typing a bunch of stuff on a terminal, then no. The installation procedure was all graphical the only change I made was to have my home folder in a separate SSD.

The size of the EFI partition indicates it is the default Windows EFI partition - as I recall Manjaro uses a default size of 512MB.

I more than likely created all the partitions through Gparted and picked 300MB for the EFI partition.

From https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface I ran:

$ cat /sys/firmware/efi/fw_platform_size
64

$ efivar --list
efivar: error listing variables: Function not implemented

mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux419.preset: 'default'
-> -k /boot/vmlinuz-4.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-4.19-x86_64.img
==> Starting build: 4.19.69-1-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [encrypt]
-> Running build hook: [openswap]
-> Running build hook: [resume]
-> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-4.19-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux419.preset: 'fallback'
-> -k /boot/vmlinuz-4.19-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-4.19-x86_64-fallback.img -S autodetect
==> Starting build: 4.19.69-1-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [encrypt]
-> Running build hook: [openswap]
-> Running build hook: [resume]
-> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-4.19-x86_64-fallback.img
==> Image generation successful

mount -t efivarfs efivarfs /sys/firmware/efi/efivars
[manjaro /]# sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.
[manjaro /]# sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
Found Windows Boot Manager on /dev/sdg1@/EFI/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Rebooted to normal manjaro and I get a slightly different screen:

Should I follow this? https://bbs.archlinux.org/viewtopic.php?id=114045

how excatly did you make it happen?

I simply booted the usb and picked an entire SSD as the installation location. The SSD had some unimportant stuff on it so I just deleted it and pressed next. Then I just waited for the installation to write files. The computer rebooted. The installation continued. I was asked to enter personal information and choose settings and finally the I was in the desktop.

I just followed the instructions from https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader and it looks promising:

sudo pacman -S efibootmgr dosfstools grub
warning: efibootmgr-16-1 is up to date -- reinstalling
warning: dosfstools-4.1-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
:: grub and grub-vanilla are in conflict (grub-common). Remove grub-vanilla? [y/N] y

Packages (4) grub-vanilla-2.04-2 [removal] dosfstools-4.1-2 efibootmgr-16-1 grub-2.04-6

Total Download Size: 0.08 MiB
Total Installed Size: 51.47 MiB
Net Upgrade Size: 18.71 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
efibootmgr-16-1-x86_64 19.3 KiB 450K/s 00:00 [##############################] 100%
dosfstools-4.1-2-x86_64 58.0 KiB 1451K/s 00:00 [##############################] 100%
(3/3) checking keys in keyring [##############################] 100%
(3/3) checking package integrity [##############################] 100%
(3/3) loading package files [##############################] 100%
(3/3) checking for file conflicts [##############################] 100%
(4/4) checking available disk space [##############################] 100%
:: Processing package changes...
(1/1) removing grub-vanilla [##############################] 100%
warning: /etc/default/grub saved as /etc/default/grub.pacsave
(1/3) reinstalling efibootmgr [##############################] 100%
(2/3) reinstalling dosfstools [##############################] 100%
(3/3) installing grub [##############################] 100%
warning: /boot/grub/grub.cfg installed as /boot/grub/grub.cfg.pacnew
Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg
Copying /etc/default/grub.pacsave to /etc/default/grub
Generating grub.cfg.example config file...
This may fail on some machines running a custom kernel.
done.
Optional dependencies for grub
freetype2: For grub-mkfont usage [installed]
fuse2: For grub-mount usage [installed]
dosfstools: For grub-mkrescue FAT FS and EFI support [installed]
efibootmgr: For grub-install EFI support [installed]
libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue
os-prober: To detect other OSes when generating grub.cfg in BIOS systems [installed]
mtools: For grub-mkrescue FAT FS support [installed]
libusbx: For grub-emu USB support [installed]
sdl: For grub-emu SDL support [installed]
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the info directory file...
[manjaro /]# sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
[manjaro /]# exit
exit
[manjaro /]# sudo modprobe efivarfs
modprobe: FATAL: Module efivarfs not found in directory /lib/modules/4.19.28-1-MANJARO
[manjaro /]# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
[manjaro /]# sudo modprobe efivarfs
modprobe: FATAL: Module efivarfs not found in directory /lib/modules/4.19.28-1-MANJARO
[manjaro /]# exit
exit
[manjaro manjaro]# modprobe efivarfs
[manjaro manjaro]# chroot /mnt
[manjaro /]# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
mount: /sys/firmware/efi/efivars: efivarfs already mounted on /sys/firmware/efi/efivars.
[manjaro /]# sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.
[manjaro /]# sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
Found Windows Boot Manager on /dev/sdg1@/EFI/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Nope. Same image as above.

1 Like

A tip about formatting code: Use three accents, then new line, than paste code, then new line and three accents again. Like this:

```
some code bla bla
```
3 Likes

I don't use encrytion, but try this TEST F here. Make sure you start install media in the right mode (uefi or bios-legacy - quickly glanced, I think it is bios-legacy in your case). And should you get it working, suggest you make a grub-rescue cd/usb with your grub.cfg embedded in it.

Good luck.

3 Likes

For the entire time I used the same UEFI livecd USB drive.

Take a picture or write down what comes after "Enter passphrase for hd#,gpt# (xxxx...): _"

When looking for the actual hd#,gpt# be mindful that you might mistake your efi partition with the efi that's in the livecd USB/CD.

I thought the number in "crypto0" was dependent on your gpt# number, it's not. I did try "crypto2" unsuccessfully.

When looking for your own hd#,gpt# by running the "cyrptomount hd#,gpt#" you'll know you got the right one when you see:
"Attempting to decrypt master key...
Enter passphrase for hd#,gpt# (The UUID # you see when you are prompted for a password at the beginning of the boot)

After running boot you should see:


and boot to Manjaro.

Be sure to create the grub-rescue cd/usb that gohlip mentiond. It was the first thing I did as soon as I got to the desktop.
For some reason xorriso doesn't show up in Octopi, so I just ran

sudo pacman -S xorriso

Big thumbs up to gohlip and everyone else who chipped in.

I'll restart the computer and hope I don't have to come back in 2 minutes to take down the mission accomplished banner.

2 Likes

:sweat_smile:

gohlip how do I use the grub rescue iso?
I made both the prompt and menu ones.
I think I need to delete /new_root: can't find UUID=ee80... since it doesn't match the one at boot.

I think the package xorriso is not in pacman repositories.
But I think it is in other distros.
No worries, the package required in place of xorriso is libisoburn
{Previously the package is named libisoburn-xxxx, and I forget what these 'xxxx' is}

[pop@Dec ~]$ pacman -Ss libisoburn
extra/libisoburn 1.5.0-2
    frontend for libraries libburn and libisofs
community/disomaster 5.0.0-1
    A libisoburn wrapper class for Qt
[pop@Dec ~]$ pacman -Ss xorriso
extra/libisoburn 1.5.0-2
    frontend for libraries libburn and libisofs
[pop@Dec ~]$ 

So install libisoburn and proceed. But fix the UUID first, make sure it boots up and then make the rescue-cd. Good luck.

[EDIT] - Confirm xorriso is in ubuntu paclkage, so as is libisoburn but named as 'libisoburn1'

pop@Aug:~$ apt search xorriso
xorriso/disco 1.5.0-1build1 amd64
  command line ISO-9660 and Rock Ridge manipulation tool

pop@Aug:~$ apt search libisoburn
libisoburn1/disco 1.5.0-1build1 amd64
  library to handle creation and inspection of ISO-9660 file systems

From my previous post I was able to boot to my Manjaro desktop and then I followed the steps from a grub-rescue cd/usb to make a simple grub rescue iso and a menu grub rescue iso.
Are the steps you're showing here to make the isos or to burn the isos?

To fix the UUID do I just delete any entries related to UUID=ee80d713... inside /etc/fstab and /boot/grub/grub.cfg ?

Or should I follow these steps https://www.reddit.com/r/archlinux/comments/7jne2m/device_not_found_new_root_not_file_system/dr7we8b/

nano /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>
/dev/mapper/luks-b98b7c10-be38-4ad2-9386-db4c85e08436 /home          ext4    defaults,noatime,discard 0 2
UUID=D21E-4DD9                            /boot/efi      vfat    defaults,noatime 0 2
/dev/mapper/luks-17a2a4d7-50ad-464a-a5ac-b296631a8dae /              ext4    defaults,noatime,discard 0 1
/dev/mapper/luks-26c904e6-54b6-48bc-afe4-f11ae1e50291 swap           swap    defaults,noatime,discard 0 2
tmpfs

nano /boot/grub/grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### 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="0"
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_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u 17a2a4d750ad464aa5acb296631a8dae
set root='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'  ee80d713-9c90-4a29-94ca-64f1766ac102
else
  search --no-floppy --fs-uuid --set=root ee80d713-9c90-4a29-94ca-64f1766ac102
fi
    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=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
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-ee80d713-9c90-4a29-94ca-64f1766ac102' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod cryptodisk
        insmod luks
        insmod gcry_rijndael
        insmod gcry_rijndael
        insmod gcry_sha256
        insmod ext2
        cryptomount -u 17a2a4d750ad464aa5acb296631a8dae
        set root='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'  ee80d713-9c90-4a29-94ca-64f1766ac102
        else
          search --no-floppy --fs-uuid --set=root ee80d713-9c90-4a29-94ca-64f1766ac102
        fi
        linux   /boot/vmlinuz-4.19-x86_64 root=UUID=ee80d713-9c90-4a29-94ca-64f1766ac102 rw cryptdevice=/dev/sdg1:lvm loglevel=3 quiet
        initrd  /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-ee80d713-9c90-4a29-94ca-64f1766ac102' {
        menuentry 'Manjaro Linux (Kernel: 4.19.69-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.69-1-MANJARO x64-advanced-ee80d>
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod cryptodisk
                insmod luks
                insmod gcry_rijndael
                insmod gcry_rijndael
                insmod gcry_sha256
                insmod ext2
                cryptomount -u 17a2a4d750ad464aa5acb296631a8dae
                set root='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'  ee80d713-9c90-4a29-94ca-64f1766ac102
                else
                  search --no-floppy --fs-uuid --set=root ee80d713-9c90-4a29-94ca-64f1766ac102
                fi
                linux   /boot/vmlinuz-4.19-x86_64 root=UUID=ee80d713-9c90-4a29-94ca-64f1766ac102 rw cryptdevice=/dev/sdg1:lvm loglevel=3 quiet
                initrd  /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
        }
        menuentry 'Manjaro Linux (Kernel: 4.19.69-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.69-1-MANJA>
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod cryptodisk
                insmod luks
                insmod gcry_rijndael
                insmod gcry_rijndael
                insmod gcry_sha256
                insmod ext2
                cryptomount -u 17a2a4d750ad464aa5acb296631a8dae
                set root='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'  ee80d713-9c90-4a29-94ca-64f1766ac102
                else
                  search --no-floppy --fs-uuid --set=root ee80d713-9c90-4a29-94ca-64f1766ac102
                fi
                linux   /boot/vmlinuz-4.19-x86_64 root=UUID=ee80d713-9c90-4a29-94ca-64f1766ac102 rw cryptdevice=/dev/sdg1:lvm loglevel=3 quiet
                initrd  /boot/initramfs-4.19-x86_64-fallback.img
        }
}

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

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sdf1)' --class windows --class os $menuentry_id_option 'osprober-efi-D21E-4DD9' {
        insmod part_gpt
        insmod fat
        set root='hd5,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd5,gpt1 --hint-efi=hd5,gpt1 --hint-baremetal=ahci5,gpt1  D21E-4DD9
        else
          search --no-floppy --fs-uuid --set=root D21E-4DD9
        fi
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### 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/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root --hint='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'  ee80d713-9c90-4a29-94ca-64f1766ac102
        linux16 /boot/memtest86+/memtest.bin
    }
fi
### END /etc/grub.d/60_memtest86+ ###

The link "making grub-mkrescue" is to make the iso file.
To make the bootable usb, I normally use dd

sudo dd bs=4M if=anyname.iso of=/dev/sdd

ps: as usual, careful that you choose of=/dev/sdx carefully and 'x' and not 'xy'
and 'if=anyname.iso' is the path to the made iso file.
So from root, it may be "of=/home/<manjarouser>/anyname.iso"
Remember 'dd' is not called 'disk destroyer' for nothing.
But if in doubt, use a safer burning tool like k3b (kde) or brasero (gnome) or any other disk burner that comes with your DE.

Long ago, I burn to a cdrom or dvd, remember it takes less than 50 MB; but now I don't do this anymore but I don't have encryption (and I have another way for my many OS's and too complicated for just a few OS's).

As for the UUID, if you boot up from Manjaro's grub without any error message, that should be fine and usable for this grub-rescue cd. But print out in full this error message if you get it from the grub boot. I cannot see this message

If unsure, provide
sudo blkid
cat /etc/crypttab
cat /etc/fstab {if changed}

Oh... your fstab... not a good thing to have 'discard'
Make that

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
/dev/mapper/luks-b98b7c10-be38-4ad2-9386-db4c85e08436 /home          ext4    defaults,noatime 0 2
UUID=D21E-4DD9                            /boot/efi      vfat    defaults,noatime 0 0
/dev/mapper/luks-17a2a4d7-50ad-464a-a5ac-b296631a8dae /              ext4    defaults,noatime 0 1
/dev/mapper/luks-26c904e6-54b6-48bc-afe4-f11ae1e50291 swap           swap    defaults,noatime 0 2
# tmpfs


Note I removed 'discard' in all entries
I change /boot/efi pass from 0 2 to 0 0
and commented out tmpfs

Do again 'sudo update-grub' and see if error message is still there. I think your UUID is alright but without your /etc/crypttab and blkid, I'm not too sure. Just thinking that that should be correct somehow.

Good luck.

sudo blkid
/dev/nvme0n1p1: UUID="4aee0162-caa8-4ba8-90e7-422f514bebd7" TYPE="crypto_LUKS" PARTUUID="1d758fc9-854b-574a-8f40-b94fc5e78903"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: UUID="71a824ab-0637-4256-ae13-05837370b207" TYPE="crypto_LUKS" PARTUUID="000ea751-01"
/dev/sdb1: UUID="b98b7c10-be38-4ad2-9386-db4c85e08436" TYPE="crypto_LUKS" PARTUUID="3a8aa0af-ecc6-4067-8710-331b899f7487"
/dev/sdc1: UUID="2019-03-12-09-01-11-00" LABEL="M1804" TYPE="iso9660"
/dev/sdc2: SEC_TYPE="msdos" LABEL_FATBOOT="MISO_EFI" LABEL="MISO_EFI" UUID="BB93-7505" TYPE="vfat"
/dev/sde1: UUID="ce3460e9-3be5-4d70-8f41-1c897bc8d53c" TYPE="crypto_LUKS" PARTUUID="9a2e14e1-452b-468c-920a-0118db0a4a48"
/dev/sdf2: UUID="AE2405DD2405A983" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="13aa7681-f160-42f9-8456-9b2bfb2beb84"
/dev/sdg1: UUID="D21E-4DD9" TYPE="vfat" PARTUUID="b00c57c5-828c-4f75-aa6d-82a51ebde768"
/dev/sdg2: UUID="17a2a4d7-50ad-464a-a5ac-b296631a8dae" TYPE="crypto_LUKS" PARTUUID="ee7d1d95-ab33-41f4-8eb6-be49b48bfddc"
/dev/sdg3: UUID="26c904e6-54b6-48bc-afe4-f11ae1e50291" TYPE="crypto_LUKS" PARTUUID="cdd81626-86e3-4148-ba96-ea2c68df5ce1"
/dev/mapper/crypto_LUKS: UUID="ee80d713-9c90-4a29-94ca-64f1766ac102" TYPE="ext4"
/dev/sdf1: PARTLABEL="Microsoft reserved partition" PARTUUID="9d51f56e-ae03-4200-90bd-2362e69ac4e9"
cat /etc/crypttab
# /etc/crypttab: mappings for encrypted partitions.
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# See crypttab(5) for the supported syntax.
#
# NOTE: Do not list your root (/) partition here, it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies
#       to encrypted swap, which should be set up with mkinitcpio-openswap
#       for resume support.
#
# <name>               <device>                         <password> <options>
luks-b98b7c10-be38-4ad2-9386-db4c85e08436 UUID=b98b7c10-be38-4ad2-9386-db4c85e08436     /crypto_keyfile.bin luks
luks-17a2a4d7-50ad-464a-a5ac-b296631a8dae UUID=17a2a4d7-50ad-464a-a5ac-b296631a8dae     /crypto_keyfile.bin luks
luks-26c904e6-54b6-48bc-afe4-f11ae1e50291 UUID=26c904e6-54b6-48bc-afe4-f11ae1e50291     /crypto_keyfile.bin luks

I made the changes you said for /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>
/dev/mapper/luks-b98b7c10-be38-4ad2-9386-db4c85e08436 /home          ext4    defaults,noatime 0 2
UUID=D21E-4DD9                            /boot/efi      vfat    defaults,noatime 0 0
/dev/mapper/luks-17a2a4d7-50ad-464a-a5ac-b296631a8dae /              ext4    defaults,noatime 0 1
/dev/mapper/luks-26c904e6-54b6-48bc-afe4-f11ae1e50291 swap           swap    defaults,noatime 0 2
# tmpfs
sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
Found Windows Boot Manager on /dev/sdg1@/EFI/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.

sdc1 is the livecd USB so it should be fine to have the error.

Rebooting to check the results.

I still get the same error message from the picture above:

mount: /openswap_keymount: no filesystem type specified.
Failed to open key file.
umount: can't unmount openswap_keymount: Invalid argument
ERROR: resume: no device specified for hibernation
mount: /new_root: can't find UUID=ee80d713-9c90-4a29-94ca-64f1766ac102.
sh: can't access tty; job control turned off
[rootfs ]#

I don't get it, do you run update-grub while on a Live USB session? You need to chroot the encrypted system first, then run update-grub from within chroot.

I booted the live usb session, ran the steps in How to chroot into an encrypted root partition to chroot into the encrypted system, and then ran "sudo update-grub" as the last step before rebooting.

Ok, then do it again, but run grub-install with correct target and then update-grub. In a chroot you are su, no need for a sudo command.

So you did not do 'update-grub' from the installed OS but chrooted to it? No wonder.
You had successfully booted into it using TEST F before. Can't you do it again?
And then do 'update-grub'?

Now, I need to get the 'raw' UUID of your root partition. In TEST F, it is $pqr.
So can you when doing TEST F to go into the installed OS, find that out for me and copy that out for us? That will be at steps here during TEST F.

grub> cryptomount hd4,gpt2
grub> set root=(crypto0)
grub> probe -u $root --set=pqr
grub> echo $pqr

Now, here's the entry I made for you to be put into your custom.cfg to boot.
You grub.cfg generated at chroot is wrong.

root=UUID=ee80d713-9c90-4a29-94ca-64f1766ac102 rw cryptdevice=/dev/sdg1:lvm loglevel=3 quiet

The UUID is wrong (should be the $pqr) and /dev/sdg1 is wrong.

Here's a menuentry i made pending confirmation of $pqr


menuentry 'Manjaro - 1  Linux' --class manjaro  {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod cryptodisk
        insmod luks
        insmod gcry_rijndael
        insmod gcry_rijndael
        insmod gcry_sha256
        insmod ext2
        cryptomount -u 17a2a4d750ad464aa5acb296631a8dae
        set root='cryptouuid/17a2a4d750ad464aa5acb296631a8dae'
        probe -u $root --set=pqr
        set abc=17a2a4d7-50ad-464a-a5ac-b296631a8dae
        linux   /boot/vmlinuz-4.19-x86_64 root=UUID=$pqr rw cryptdevice=UUID=$abc:luks-$abc root=/dev/mapper/luks-$abc
        initrd  /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
}        
     

But you can try it.

To put into custom.cfg,
Make that custom.cfg
sudo touch /boot/grub/custom.cfg
Open up that file and put in the above entry. Save file. That's it. No need to 'update-grub'
When you reboot, the entry will be there, at the bottom.

Reminder - I need $pqr. it is not
ee80d713-9c90-4a29-94ca-64f1766ac102

@manjarouser2364
This post is to @eugen-b. Don't worry about it.
@eugen-b
You have encryption and btrfs, last I remembered, you manually corrected for your grub.cfg as the generated grub.cfg is not done well. Are you on the default grub 2.04-6 ? If yes, can you try to do 'update-grub' and see if that works? Of course, back up your working grub.cfg.

Then try vanilla-grub and see if that works without needing correction. Let us know. Thanks.

ps: I suspect this OP on grub 2.04-6 may have problems. Others not on encryption or btrfs have reported issues as well.

It was a test install, I think I don't have it anymore.
When I make a test install again (I hope soon) I will try to do it as you requested.

1 Like

Thanks. You're a chum.

I'm currently on my actual Manjaro desktop.

grub> echo $pqr
ee80d713-9c90-4a29-94ca-64f1766ac102

Then try my entry above.
Put it in custom.cfg. To test it out.
OH.. confirm that the test F from grub prompt works again (this time)
I think so. Just need your confirmation (to make me feel better)

Forum kindly sponsored by Bytemark