Masalahnya
grub-rpi3.efi dibangun pada tahap pembuatan gambar RPI3, dan tidak ada modul penting untuk prompt kata sandi:
# 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
Solusinya
Ikuti langkah-langkah yang diuraikan di bawah untuk memperbaiki masalah:
1. Verifikasi bahwa file ada di tempatnya:
# file grub-rpi3.efi
2. Instal paket grub2-efi-aa64-modules.
3. Setel perangkat boot default:
# echo "set root=(hd0,msdos2)" > grub2-early.cfg
4. Tinjau grub-early.cfg untuk memverifikasi bahwa ada tepat satu string “set root”.
5. Bangun gambar:
# 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. Verifikasi file baru di direktori lokal:
# file grub-rpi3.efi
7. Tambahkan salinan file ke direktori /boot/efi/EFI/redhat/.
# cp grub-rpi3.efi /boot/efi/EFI/redhat/
Ini juga akan menghasilkan peringatan tentang penggantian file yang ada.
8. Buang buffer I/O ke media:
# sync; sync; sync
9. Reboot dengan anggun.
Cara Melacak Skrip Python menggunakan trace.py
Cara Membuat/Menghapus dan Memasang Sistem File Stratis di CentOS/RHEL 8