Ask Your Question

Error message after chosing fedora kernel in GRUB2

asked 2015-03-19 04:28:29 -0500

yellowgh0st gravatar image

updated 2015-03-19 05:48:27 -0500


I run fedora on Macbook Pro 7,1 with Intel Core 2 Duo and Nvidia Chipset hardware.

There is error message showed every time after I select fedora kernel to boot:

Error: failure reading sector 0x0 from hd0

Press any key to continue...

If I press the key the procces pass and succusfully boot my kernel then the system starts without any problems.

Can I get rid of this message?

Here is my grub2.conf:

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-03-19 16:58:54 -0500

Can you post the output of the ls command when run from within the GRUB command prompt (hit "c" at the GRUB menu)? Also provide the output of echo $root from the GRUB command prompt so we know which disk GRUB understands to be your boot disk. Can your post the output of blkid from bash once the OS is up and running? This will show us which devices correspond to which UUIDs so we can validate the grub.cfg syntax and try to figure out which device is hd0.

I believe the error you are seeing is thrown by the GRUB search command as it attempts to seek out the root device for your system. Something is preventing it from reading hd0, but it's not clear what that is. After the search command fails due to this error, your system boots properly nonetheless because the proper root device is correctly inferred from a pre-defined environment variable. To verify this hypothesis, press 'e' at the GRUB boot menu with the default menu selection highlighted and remove the lines which correspond to lines 82-87 as numbered in your pastebin post. Then, press F10 to boot. My guess is that you don't see the error message using this boot method.

The only downside with simply permanently removing those lines is that you'd be stuck relying on the variable inference method for determining your boot disk, and that could be broken by removing or adding disks to the system or by EFI detecting disks in a different order than usual. I know this isn't a complete answer, but it wouldn't fit in a comment and I'd be glad to run this down with you to see if we can figure out why your system has trouble accessing hd0.

edit flag offensive delete link more



just deleted lines no. 82-87 ( ) but no change.

Same error still showed in same way.

Here's the ls output:

I want mention that OSX Yosemite is encrypted on HFS partition.

yellowgh0st gravatar imageyellowgh0st ( 2015-03-20 03:26:24 -0500 )edit

That's very strange. Try this - in the GRUB menu, hit c to bring up the command prompt. Now, execute the following commands one-by-one, and report when the error message is seen:

1) load_video 2) set gfxpayload=keep 3) insmod gzio 4) insmod part_gpt 5) insmod lvm 6) insmod ext2 7) set root='lvmid/PaIfKd-h020-OllU-acaR-NAt1-iND8-FpB9Ou/RaGp1A-F8Ol-IM9P-W5Rb-Nah0-Oggt-6hzg09' 8) linuxefi /boot/vmlinuz-3.18.9-200.fc21.x86_64 root=/dev/mapper/fedora-root ro rhgb quiet LANG=en_US.UTF-8 9) initrdefi /boot/initramfs-3.18.9-200.fc21.x86_64.img

bitwiseoperator gravatar imagebitwiseoperator ( 2015-03-20 10:22:57 -0500 )edit

Also, do you know what device hd0 is on your system? I see that hd1 is the only device with recognized GPT partitions. If you can get that blkid output, we can match up the UUID of the device you are intending to boot from with the devices listed by blkid. That will help us to figure out what might be the problem with that hd0 device.

bitwiseoperator gravatar imagebitwiseoperator ( 2015-03-20 10:24:33 -0500 )edit

I am not sure which partition hd0 is. But If its GPT it should be encrypted lvm with OS X Yosemite. I currently have both systems on my device and nothing else. I will try get the UDID using blkid. I don't know where the hd0 in grub.cfg exactly is or why its trying to access it.

yellowgh0st gravatar imageyellowgh0st ( 2015-03-20 11:46:12 -0500 )edit

Your BIOS (or UEFI firmware) is detecting and presenting a storage device known as hd0 to GRUB. That name isn't the same as the one used for the device in Fedora (e.g. /dev/sda1), so don't worry if they don't match up. Let's get that blkid output and we can narrow this down. It'd also help if you know definitively which storage devices are connected to your system (how many hard disks, any USB devices, etc.).

bitwiseoperator gravatar imagebitwiseoperator ( 2015-03-23 11:06:23 -0500 )edit

answered 2016-01-23 16:16:04 -0500

I also had this problem. Short answer is I fixed it by reinstalling grub2, I had to do 2 steps:

  1. sudo yum install grub2-efi-modules
  2. sudo grub2-install /dev/sda

Long answer: I installed Fedora 23 from a DVD. Since I only had the one HDD and the one DVD drive, I thought the error might be from GRUB trying to read my empty DVD drive. When I ran 'ls' from the GRUB command prompt it gave the error about failing to read from sector 0x0 on hd1, hd0 properly showed the partitions on my HDD.

I rebooted the machine with a DVD in the drive and ran another 'ls' from the GRUB command prompt, now instead of giving the error, it listed partitions for cd0. Booting into Fedora 23 from GRUB normally no longer gave the error.

I also noticed a second problem, changes to /etc/default/grub were not showing up in GRUB after running 'sudo grub2-mkconfig -o /dev/grub2/grub.cfg'. The combination of these two issues made me thing GRUB wasn't installed correctly. This wasn't too surprising as I had another linux distro installed on the drive previously.

After installing grub2-efi-modules (needed if you get an error about a missing file) and running grub2-install it boots without the error and changes to /etc/default/grub are showing up.

edit flag offensive delete link more


This is incorrect and destructive. You are running commands that apply to legacy systems and will break UEFI systems. GRUB is not installed to a drive MBR on UEFI systems. The grub config file is not located at /boot/grub2/grub.cfg on UEFI systems.

randomuser gravatar imagerandomuser ( 2016-03-10 15:38:15 -0500 )edit

Question Tools

1 follower


Asked: 2015-03-19 04:28:29 -0500

Seen: 2,155 times

Last updated: Mar 20 '15