bugGNU GRUB - Bugs: bug #62920, Memory address error when booting...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62920: Memory address error when booting from LUKS-encrypted /boot

Submitter:  - <_326750>
Submitted:  Fri 19 Aug 2022 03:08:33 PM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Jason Yip
Open/Closed:  Open Release:  Git master
Release:  Reproducibility:  Every Time
Planned Release:  None

Wed 31 Aug 2022 02:00:42 PM UTC, comment #3: 

I was able to resolve my issue.

It is not enough to run grub-mkimage to replace the file in the EFI System Partition after upgrading the Grub package.

grub-install also needed to be run to replace the files in /boot/grub, THEN also use grub-mkimage to replace the file in the EFI System Partition.

Here are my steps (as the root user):

Use package manager to upgrade the Grub package.
grub-install --target=x86_64-efi --efi-directory=/efi --removable
grub-mkimage -p /boot/grub -O x86_64-efi -c /root/grub-pre.cfg -o /tmp/grubx64.efi part_gpt cryptodisk luks2 gcry_rijndael pbkdf2 gcry_sha256 ext2 btrfs
install -v /tmp/grubx64.efi /efi/EFI/BOOT/BOOTX64.EFI
grub-mkconfig -o /boot/grub/grub.cfg
mkinitcpio -P


Linux Ninja <linuxninja>
Sat 27 Aug 2022 01:00:13 PM UTC, comment #2: 

My setup is VERY similar to ljyip
I found that I also had to stick with commit g2f4430cc0, else I would get an error such as:

452: out of range pointer: 0xb5dc1dc0

when selecting a grub menu item to boot Linux.

I also use grub-mkimage to create a EFI binary:

grub-mkimage -p /boot/grub -O x86_64-efi -c grub-pre.cfg -o /tmp/grubx64.efi luks2 part_gpt cryptodisk gcry_rijndael pbkdf2 gcry_sha256 ext2 btrfs

Then use this in EFI:

install -v /tmp/grubx64.efi /efi/EFI/BOOT/BOOTX64.EFI

I am using encrypted BTRFS /boot on LUKS2 using PBKDF2

If necessary, I can provide my configs, but they do not meaningfully differ from the original submission.

Linux Ninja <linuxninja>
Thu 25 Aug 2022 03:08:50 PM UTC, comment #1: 

I'm new here and I have created an account just for this issue.
I would vote instead of leaving a comment, but I don't really understand how the votes work here :/ so I would be glad if this is fixed soon, since I am not the only one who has this issue right now.
https://forum.garudalinux.org/t/stuck-in-boot-loop-after-update/21994

zonep
Fri 19 Aug 2022 03:08:33 PM UTC, original submission:  

I have a LUKS2-encrypted /boot using PBKDF2. Commit g2f4430cc0 has always worked for me. However, commit g0c6c1aff2 would do the following: boot into linux-zen then return an error about access memory address.

My setup:

Arch Linux

/dev/nvme0n1p1 -> unencrypted EFI partition
/dev/nvme0n1p2 -> LUKS-encrypted /boot partition using PBKDF2
/dev/nvme0n1p3 -> LUKS-encrypted LVM using Argon2ID (I include keyfile inside initramdisk that automatically unlocks this partition)

I install GRUB the way outlined at https://wiki.archlinux.org/title/GRUB#LUKS2.

My grub-pre.cfg:


set crypto_uuid=<PARTITION UUID>
cryptomount -u $crypto_uuid

set root=crypto0
set prefix=($root)/grub
insmod normal
normal


I run this script to install GRUB:

#!/bin/sh

grub-mkimage -p /boot/grub -O x86_64-efi -c grub-pre.cfg -o /tmp/grubx64.efi luks2 part_gpt cryptodisk gcry_rijndael pbkdf2 gcry_sha256 btrfs
install -v /tmp/grubx64.efi /boot/efi/EFI/GRUB/grubx64.efi



My /etc/default/grub:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 resume=/dev/vg/swap"
GRUB_CMDLINE_LINUX="cryptdevice=PARTLABEL=lvm:cryptlvm cryptkey=rootfs:/etc/keys/cryptlvm.keyfile"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=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=1920x1080x32

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

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

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME="/boot/grub/themes/Cyberpunk/theme.txt"

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

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=false


My /etc/mkinitcpio.conf:


MODULES=(usbhid xhci_hcd i915)

BINARIES=(btrfs)

FILES=(/etc/keys/cryptlvm.keyfile)

MODULES=(usbhid xhci_hcd i915)

BINARIES=(btrfs)

HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems resume fsck)


- <_326750>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by linuxninja (Posted a comment)
  • -email is unavailable- added by zonep (Posted a comment)
  • -email is unavailable- added by _326750 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code