Bug 1678781

Summary: AArch64 disk images default to 'System Setup'
Product: [Fedora] Fedora Reporter: Paul Whalen <pwhalen>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fmartine, lkundrak, pbrobinson, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-25 16:03:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
grub2-efi.cfg
none
grubenv none

Description Paul Whalen 2019-02-19 15:06:27 UTC
Description of problem:

AArch64 disk images in rawhide currently default to the 'System Setup' grub menu entry on aarch64. On most SBC's this results in a failed boot and requires user intervention to select the kernel entry for a successful boot.

Version-Release number of selected component (if applicable):
grub2-2.02-69.fc30

How reproducible:
Everytime. 

Steps to Reproduce:
1. Boot a recent aarch64 rawhide disk image on an SBC or in Qemu
2. System will default to the 'System setup' entry

Comment 1 Javier Martinez Canillas 2019-02-19 15:24:37 UTC
Hello Paul,

Could you please share the content of the /etc/grub2-efi.cfg and /boot/grub2/grubenv files, and also the BLS snippets in /boot/loader/entries?

Comment 2 Paul Whalen 2019-02-19 16:42:09 UTC
Created attachment 1536412 [details]
grub2-efi.cfg

Comment 3 Paul Whalen 2019-02-19 16:42:30 UTC
Created attachment 1536413 [details]
grubenv

Comment 4 Paul Whalen 2019-02-19 16:47:00 UTC
No snippets in /boot/loader/entries

Comment 5 Javier Martinez Canillas 2019-02-19 16:57:58 UTC
Thanks a lot for the info, the problem is that your grub2-efi.cfg has the following snippet:

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="1"
fi

While this usually is:

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

Since default is set to 1, and you only have the Fedora (5.0.0-0.rc6.git1.1.fc30.aarch64) 30 (Rawhide) boot entry, the default is set to to the one with index 1 (System setup).

The grubby tool changes the default in the GRUB config file if you do grubby --set-default, so maybe you did this?

You could either re-generate your grub2-efi.cfg again with grub2-mkconfig -o /etc/grub2-efi.cfg or set your default to 0 with grubby --set-default=/boot/vmlinuz-5.0.0-0.rc6.git1.1.fc30.aarch64.

Comment 6 Paul Whalen 2019-02-25 16:03:10 UTC
Fixed in Fedora-30-20190224.n.0, thanks (again) Javier!