• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Unable to set a GRUB password on a Raspberry Pi 3 system

by admin

The Problem

grub-rpi3.efi is built on RPI3 image build stage, and it is missing a crucial module for password prompt:

# efibootmgr -v -v 
Could not read variable 'BootNext': No such file or directory 
error trace: 
 vars.c:332 vars_get_variable(): open(/sys/firmware/efi/vars/BootNext-8be4df61-93ca-11d2-aa0d-00e098032b8c/raw_var, O_RDONLY) failed: No such file or directory 
 lib.c:139 efi_get_variable(): ops->get_variable failed: No such file or directory 
Could not read variable 'BootCurrent': No such file or directory 
error trace: 
 vars.c:332 vars_get_variable(): 
open(/sys/firmware/efi/vars/BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c/raw_var, O_RDONLY) failed: No such file or directory 
 lib.c:139 efi_get_variable(): ops->get_variable failed: No such file or directory 
Could not read variable 'Timeout': No such file or directory 
error trace: 
 vars.c:332 vars_get_variable(): 
open(/sys/firmware/efi/vars/Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c/raw_var, O_RDONLY) failed: No such file or directory lib.c:139 efi_get_variable(): ops->get_variable failed: No such file or directory 
Could not read variable 'BootOrder': No such file or directory 
error trace: 
 vars.c:332 vars_get_variable(): 
open(/sys/firmware/efi/vars/BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c/raw_var, O_RDONLY) failed: No such file or directory lib.c:139 efi_get_variable(): ops->get_variable failed: No such file or directory 
 efibootmgr.c:372 read_order(): efi_get_variable failed: No such file or directory 
No BootOrder is set; firmware will attempt recovery 
Could not read variable 'MirrorCurrent': No such file or directory 
error trace: 
 vars.c:332 vars_get_variable(): 
open(/sys/firmware/efi/vars/MirrorCurrent-7b9be2e0-e28a-4197-ad3e-32f062f9462c/raw_var, O_RDONLY) failed: No such file or directory 
 lib.c:139 efi_get_variable(): ops->get_variable failed: No such file or directory 
Could not read variable 'MirrorRequest': No such file or directory 
error trace: 
 vars.c:332 vars_get_variable(): 
open(/sys/firmware/efi/vars/MirrorRequest-7b9be2e0-e28a-4197-ad3e-32f062f9462c/raw_var, O_RDONLY) failed: No such file or directory 
 lib.c:139 efi_get_variable(): ops->get_variable failed: No such file or directory

The Solution

Follow the steps outlined below to fix the issue:

1. Verify that file is in place:

# file grub-rpi3.efi

2. Install package grub2-efi-aa64-modules.

3. Set the default boot device:

# echo "set root=(hd0,msdos2)" > grub2-early.cfg

4. Review grub-early.cfg to verify there is exactly one “set root” string.

5. Build the image:

# grub2-mkimage -c grub-early.cfg -O arm64-efi -o grub-rpi3.efi -p "(hd0,msdos1)/efi/redhat" all_video boot btrfs cat chain echo efifwsetup efinet ext2 fat font gfxmenu gfxterm gzio halt hfsplus iso9660 jpeg loadenv loopback lvm mdraid09 mdraid1x minicmd normal part_apple part_msdos part_gpt password_pbkdf2 png reboot regexp search search_fs_uuid search_fs_file search_label serial sleep syslinuxcfg test tftp video xfs http linux configfile

6. Verify the new file in the local directory:

# file grub-rpi3.efi

7. Add a copy of the file to /boot/efi/EFI/redhat/ directory.

# cp grub-rpi3.efi /boot/efi/EFI/redhat/

This should also produce a warning about replacing an existing file.

8. Flush the I/O buffers out to media:

# sync; sync; sync

9. Gracefully reboot.

Filed Under: Linux, Raspberry Pi

Some more articles you might also be interested in …

  1. dstat Command Examples in Linux
  2. “go get” Command Examples
  3. xargs Command Examples in Linux
  4. aws help: Display help information about the AWS CLI (Command Examples)
  5. dnstracer Command Examples in Linux
  6. How to uninstall nodejs software package in Ubuntu
  7. readelf: command not found
  8. avo: The official command-line interface for Avo (Command Examples)
  9. http_load Command Examples in Linux
  10. ctr: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright