Description of problem:
system occasionally fails to boot, displaying errors as follows:
"error: failure reading sector 0xfc1 from `hd0.
(error repeats over and over)
Press any key to continue...
"
pressing a key will not boot, and just repeats the above behavior. Dropping to a grub command line fails at this point, as no actual commands are loaded/available.
This same behavior is referenced in the following bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1299248
It is believed that the efidisk.c file in grub2 is misidentifying the cdrom/dvdrom as a drive.
By disabling the dvd drive in the efi bios, this error does not appear to present itself.
Fedora has applied the following patch in fc24:
commit b00e4c2bd9fd051678a8aadafa95ad14b3c866ba
Author: Andrei Borzenkov <address@hidden>
Date: Fri Feb 26 21:44:37 2016 +0300
efidisk: prevent errors from diskfilter scan of removable drives
grub-core/disk/efi/efidisk.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
index 1c00e3e..ea75344 100644
--- a/grub-core/disk/efi/efidisk.c
+++ b/grub-core/disk/efi/efidisk.c
@@ -547,7 +547,9 @@ grub_efidisk_read (struct grub_disk *disk, grub_disk_addr_t
sector,
status = grub_efidisk_readwrite (disk, sector, size, buf, 0);
- if (status != GRUB_EFI_SUCCESS)
+ if (status == GRUB_EFI_NO_MEDIA)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("no media in `%s'",
disk->name));
+ else if (status != GRUB_EFI_SUCCESS)
return grub_error (GRUB_ERR_READ_ERROR,
N_("failure reading sector 0x%llx from `%s'"),
(unsigned long long) sector,
@@ -568,7 +570,9 @@ grub_efidisk_write (struct grub_disk *disk,
grub_disk_addr_t sector,
status = grub_efidisk_readwrite (disk, sector, size, (char *) buf, 1);
- if (status != GRUB_EFI_SUCCESS)
+ if (status == GRUB_EFI_NO_MEDIA)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("no media in `%s'",
disk->name));
+ else if (status != GRUB_EFI_SUCCESS)
return grub_error (GRUB_ERR_WRITE_ERROR,
N_("failure writing sector 0x%llx to `%s'"),
(unsigned long long) sector, disk->name);
--
tg: (67dba97..) u/efi-no-media (depends on: master)
Fedora grub RPM with patch applied: grub2-2.02-0.34.fc24
Version-Release number of selected component (if applicable):
RHEL 7.3 Workstation
3.10.0-514.10.2.el7.x86_64 #1 SMP
grub2-2.02-0.44.el7.x86_64
Drive Configuration: Adaptec 885 RAID card. RAID 1 - Micron 1100 512GB SSD
All drives have latest micron firmware.
Adaptec RAID card has latest firmware
Supermicro Bios has latest firmware.
How reproducible:
Customer applied patch similar to what's advised in bugzilla 1299248 and has not occurred since. Prior to that, it would happen unexpectedly, but regularly.
Additional info:
Customer would like to know if this will be applied with all future grub2 rpms to prevent manual intervention after upgrades/updates.
Purnendu Bhushan,
Fix for this problem is present in grub2-2.02-0.80.el7, which is present in RHEL-7.7 Beta. Since this bug is related to bug 1618351 reported by Dell, could you give it a try and report back if the problems reported in this bug and bug 1618351 are resolved for you?
Thank you,
Jan
Comment 16Purnendu Bhushan
2019-06-14 03:11:53 UTC
Hi Jan,
I tried with RHEL 7.7and seem to be resolved.
Thanks
Purnendu
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2019:2014