Bug 1298127 - Updating or reinstalling grub2-efi will cause grub2 boot into rescue mode on ASUS TX300 laptop
Updating or reinstalling grub2-efi will cause grub2 boot into rescue mode on ...
Status: NEW
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2016-01-13 05:16 EST by LiuYan
Modified: 2017-04-10 14:15 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-12-20 12:50:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/boot/efi/EFI/fedora/grubx64.efi file after grub2-efi package reinstalled or updated (1.01 MB, application/x-ms-dos-executable)
2016-01-13 05:16 EST, LiuYan
no flags Details
grubx64.efi file after upgraded to Fedora 24 (974.82 KB, application/x-ms-dos-executable)
2016-06-23 13:04 EDT, LiuYan
no flags Details

  None (edit)
Description LiuYan 2016-01-13 05:16:11 EST
Created attachment 1114353 [details]
/boot/efi/EFI/fedora/grubx64.efi file after grub2-efi package reinstalled or updated

Description of problem:
On my laptop (ASUS TX300), each time I updated or reinstalled grub2-efi package (including system upgraded to next release), grub2 will enter rescue mode on next reboot.

This laptop has 1 SSD, 1 HDD. EFI partition is /dev/sda1, /boot partition is /dev/sda6, root partition is /dev/sda8.

    # lsblk
    sda      8:0    0 119.2G  0 disk 
    ├─sda1   8:1    0   300M  0 part /boot/efi
    ├─sda2   8:2    0   900M  0 part 
    ├─sda3   8:3    0   128M  0 part 
    ├─sda4   8:4    0  43.6G  0 part 
    ├─sda5   8:5    0   397M  0 part 
    ├─sda6   8:6    0   500M  0 part /boot
    ├─sda7   8:7    0   3.9G  0 part [SWAP]
    ├─sda8   8:8    0    55G  0 part /
    └─sda9   8:9    0  14.7G  0 part 
    sdb      8:16   0 465.8G  0 disk 
    ├─sdb1   8:17   0 455.8G  0 part /hdd
    └─sdb2   8:18   0    10G  0 part 

Version-Release number of selected component (if applicable):
grub2-2.00-25.fc20 to grub2-2.02-0.25.fc23, starting from I installed Fedora on this laptop

How reproducible:

Steps to Reproduce:
1. reinstall grub2-efi: `dnf reinstall grub2-efi`
2. reboot

Actual results:
grub2 entered into rescue mode

Expected results:
grub2 menu shows

Additional info:
* http://unix.stackexchange.com/a/254779/7332
* On my home PC (EFI, x86_64, Fedora 23), it works ok
* On this laptop, there's an internal TF card reader
* When this issue happened, hexdump of /boot/efi/EFI/fedora/grubx64.efi does not contains '(,gpt6)/grub2' string.
  After fixing using `grub2-install` command, /boot/efi/EFI/fedora/grubx64.efi contains '(,gpt6)/grub2' string (in the last 4K bytes).
Comment 1 LiuYan 2016-02-22 01:25:22 EST
I still can't figure out why this happened on my laptop, while it works fine on my desktop machine (EFI, x86_64). Maybe it's related to the MicroSD/TF card, but I'm not sure. When TF card is in the internal card reader, it often caused the block device name not fixed: sometimes it's `/dev/sdb` (HDD is `/dev/sdc`, SSD is `/dev/sda`), sometimes it's `/dev/sdc` (HDD is `/dev/sdb`, SSD is `/dev/sda`).

A little deeper analysis shows that `/boot/efi/EFI/fedora/grubx64.efi` file does not contain root (partition) information. In the following hexdump (copied from hexedit actually) of `/boot/efi/EFI/fedora/grubx64.efi` file, "**(,gpt6)/grub2**" string in `0001D2B0` line does not exists when grub2-efi package updated/reinstalled.

    0001D290   00 00 00 00  00 00 00 00  01 00 00 00  00 00 00 00  ................
    0001D2A0   00 00 00 00  00 00 00 00  03 00 00 00  18 00 00 00  ................
    0001D2B0   28 2C 67 70  74 36 29 2F  67 72 75 62  32 00 00 00  (,gpt6)/grub2...
    0001D2C0   01 00 00 00  00 00 5A 5B  5D C3 41 56  41 55 41 54  ......Z[].AVAUAT
    0001D2D0   55 48 89 F5  53 49 89 FC  48 8B 76 08  FF 55 00 85  UH..SI..H.v..U..
    0001D2E0   C0 BB 01 00  00 00 0F 85  BC 00 00 00  4C 89 E7 89  ........L...L...
Comment 2 LiuYan 2016-06-23 13:04 EDT
Created attachment 1171618 [details]
grubx64.efi file after upgraded to Fedora 24

again, after upgraded to Fedora 24, grub2 entered rescue mode.

attachment is the grubx64.efi file after upgraded to Fedora 24
Comment 3 Fedora End Of Life 2016-11-24 09:53:42 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Fedora End Of Life 2016-12-20 12:50:13 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 5 LiuYan 2017-04-05 13:52:17 EDT
After upgraded Fedora 25 to Fedora 26 Alpha, grub2 went to rescue/minimalist mode too.

Note You need to log in before you can comment on or make changes to this bug.