Grub menu missing Windows entry on dual boot Luks encrypted installation

Ubuntu Version:

Ubuntu Desktop 24.04

Desktop Environment (if applicable):

Gnome

Problem Description:

Grub menu is missing Windows 11 entry for dual boot. I installed Ubuntu with a separate /boot partition and / partition. Then followed the following guide to luks encrypt / and leave the /boot partition unencrypted.

https://ubuntuhandbook.org/index.php/2024/08/encrypt-existing-ubuntu-system/

Windows is encrypted with Bitlocker.

Relevant System Information:

Dell Inspiron 3910. single nvme ssd

What I’ve Tried:

I've tried running sudo os-prober and update-grub.

I’ve also uncommented the line in /etc/default/grub

GRUB_DISABLE_OS_PROBER=false

and run os-prober and update-grub again.

Here is /etc/default/grub

$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
GRUB_DISABLE_OS_PROBER=false

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

I appreciate any help you could give.

Post this.
sudo parted -l

Most encrypted LVM installs use entire drive which erases Windows. Did you choose default with erase drive?

No. I used manual installation to install Ubuntu. Then used the link in the OP to do luks encryption. Basically, boot to Ubuntu live usb, and encrypt from there. It’s not LVM. Just a Luks encrypted / partition and unencrypted /boot.

I had already shrunk the Windows partition (using Windows tools) to make room for Linux. I’ve been on Debian for a while now and have now used that same free space to install Ubuntu.

$ sudo parted -l
[sudo] password for donald: 
Model: Seagate Expansion (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  1000GB  1000GB  ntfs         Basic data partition  msftdata


Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/nvme0n1p8_crypt: 251GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system  Flags
 1      0.00B  251GB  251GB  ext4


Model: Micron 2210S NVMe 512GB (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  525MB  524MB   fat32        EFI system partition          boot, esp
 2      525MB   660MB  134MB                Microsoft reserved partition  msftres
 3      660MB   240GB  240GB                Basic data partition          msftdata
 7      240GB   242GB  2001MB  ext4
 8      242GB   493GB  251GB
 4      493GB   494GB  1379MB  ntfs                                       diag
 5      494GB   511GB  16.1GB  ntfs                                       diag
 6      511GB   512GB  1516MB  ntfs                                       diag

Here’s the output of the commands:

$ sudo os-prober
[sudo] password for donald: 
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
$ sudo update-grub
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.11.0-25-generic
Found initrd image: /boot/initrd.img-6.11.0-25-generic
Found memtest86+ 64bit EFI image: /memtest86+x64.efi
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
'''

Try these changes to /etc/default/grub

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5

Don’t forget
sudo update-grub

Thanks. But it didn’t work.

You have Windows entry in grub, so grub menu should automatically show. But grub will not boot Windows that is encrypted, hibernated (fast startup on) or needs chkdsk.
Do Windows boot directly from UEFI boot menu?
Does escape just after UEFI/BIOS screen, but before grub menu normally appears show grub menu? Often have to try several times as timing is limited.

By the way, thanks for responding!

As far as encryption, it was working fine 2 days ago under Debian. But Debian allows luks encryption on a single partition through the installer. Maybe has nothing to do with it. Anyway, I’m not willing to turn off encryption for Windows.

I double checked and fast startup is still off.

I guess I could run chkdsk but as I say, it was working fine under Debian. Maybe this evening as the Windows support page says it takes several hours.

It boots from the one time boot menu. I had to enter the Bitlocker recovery key to get in. Apparently, every time I switch methods of booting Windows (one-time boot menu or Debian grub menu) I have to enter the key. But only if I switch. My understanding is this is normal behavior.

A black screen appeared with “Minimal BASH-like editing is supported…” and the prompt “grub>”. I guess that’s the grub menu.

I just looked and the appropriate option in Windows File Explorer (C drive>>Properties>>Tools>>Check) says I don’t need to scan this drive. So I guess it doesn’t need chkdsk run.

Grub> is not the grub menu, but a failure to boot. You may be able to manually boot but have to enter multiple commands.

Please copy & paste the pastebin link to the BootInfo summary report ( do not post report), do not run the auto fix till reviewed. Use often updated ppa version with your USB installer or any working install over somewhat older ISO.
Boot-Repair - Community Help Wiki &
https://sourceforge.net/p/boot-repair/home/Home/

Grub> terminal has a limited set of commands. You may be able to find your Linux partition, your /boot & full grub boot stanza or manually entry all the comands normally in a boot stanza.
https://help.ubuntu.com/community/Grub2/Troubleshooting

I must not be understanding something. There’s the screen with the Dell logo which I assumed was the uefi/bios screen. Then there’s what I usually call the grub menu with the different options where I can choose Ubuntu or (usually) Windows. There is no time or space between the two in which I can hit the escape key. It is instantaneous.

What is happening is that what I call the grub menu appears and then I hit the escape key. And then the screen with the grub> prompt occurs.

I read online to hold down the escape key during boot but the usual grub menu appears first, and then the screen with the grub> prompt.

Or if I tap the escape key quickly during the Dell logo, then the usual grub menu flashes, and then the screen with the grub> prompt.

Either way what is happening is that the menu with the choices of Ubuntu and others appears first, and then the screen with the grub> prompt. I didn’t catch this the first time around.

Regardless, I’ll post the boot repair link tomorrow unless I hear from you first.

Boot-Repair report may help.

The UEFI/BIOS boot screen is with F12 on Dell systems.
And then the grub menu should appear. If getting grub> its saying it cannot find kernel in / . Seen this more with encrypted installs. Not sure if grub mod file or add-in code to grub is missing something required for encrypted installs.

Make sure you decrypt install or else report will not show much. And if we reinstall grub, install must be decrypted.
You have to mount your LVM volume(s).

I do not use LVM nor encryption. But have seen these commands to use from live installer. to know where & name of LVM.

sudo fdisk -l
sudo pvs
sudo vgs
sudo lvs
lsblk -e 7 -o name,size,type,fstype,mountpoint

Since installer will install LVM & encryption, I epect it to have these. After install not using LVM nor encyption, these are removed, so if mounting from a non0encrypted install, you have to add these.

sudo apt-get update && sudo apt-get install lvm2 cryptsetup

I’m not willing to decrypt my install. Even temporarily. Thanks anyway. I can either live with this as it is as it’s not a big deal to boot to Windows using the one-time boot menu. Or I can go back to Debian. Thanks again for your help.

Every time you use system, it is decrypted. It is only encrypted when you shut down.

I misunderstood. Yes, I would have forgotten to open the Luks encrypted partition before running boot-repair. Will get to it later today hopefully. And I’m not running LVM.

I’m still unsure of your directions but here’s what I did with the escape key.

I opened the Bios with the F12 key, then hit the escape key but the computer just restarted.

And as I mentioned before if I wait till the Dell logo disappears during boot, the grub menu flashes before I have a chance to hit the escape key. When I do hit the escape key during the grub menu I get the grub> prompt screen.

Ok here it is. Hopefully I did it right.

https://paste.ubuntu.com/p/XBqyHGh6VX/

F12 is Dell’s one time boot entry.

Escape is a way to get to grub menu after booting via UEFI entry. You press escape just after Dell logo, but before grub menu appears. If getting grub menu, you do not press escape.

If grub menu not showing, you may have a setting in grub that prevents grub from showing. I like to change time to 3 sec so not too slow, but just enough time to press a key (usually down arrow) to change to another entry in grub. Once you press a key menu says up for a bit. Or e for manual editing or c for grub command line.

You show an old Windows BIOS boot entry in MBR. That will not work with UEFI boot, but should not cause any issues as it would only be used it fyou tried to boot in old BIOS/CSM/Legacy mode whichwould crash.

You still have a Debian UEFI entry and a Debian efi folder & grub.cfg that tried to boot a non-existent partition.

You have an Ubuntu entry in the ESP nvme0n1p1/efi/ubuntu/grub.cfg but it refers to nvme0n1p1/efi/ubuntu/grub/grub.cfg which is not standard. Normal grub in ESP refers to full grub in your install, not another entry in UEFI. With LVM & encryption usually the reference to grub is in a /boot partition. So do not know if this is how it now is being done? Or did you change grub. cfg? Does not look like it has a standard configuration for grub boot, much less an encrypted install

Report does not show details on grub in p7, but that should be a full grub.cfg file with many settings that you need.

There’s no time to press escape.

I haven’t changed grub.cfg. The only changes I’ve made are to /etc/default/grub as recommended by tea-for-one. I’ve now changed them back to defaults except I’ve uncommented the line GRUB_DISABLE_OS_PROBER=false.

Do you mean the grub menu not showing when I press the escape key? Yeah, the grub menu just comes on faster than I can react. So I don’t know if it shows up or not when I press the escape key.

tea-for-one’s suggested changes should give you 5 sec & always show grub menu. If time is 0, then menu should not even show, and not normally suggested, but I now have seen many systems with 0 as setting.