# (SOLVED)GRUB2 error: failure to read sector 0x0 from "hd1"

## Splooshie123

Hello.

When I select Gentoo in the grub menu, I get an error something like this:

```
error: failure to read sector 0x0 from hd1
```

Then it loads the kernel and initrd and says press any key to continue.

It boots fine once I get past that, but I don't want to have to see this error every time I boot.

Any idea what might be causing it? Or at least a way to bypass it, since Gentoo boots fine afterward?Last edited by Splooshie123 on Sat Nov 10, 2012 7:06 am; edited 1 time in total

----------

## srs5694

Are you sure that's an EFI version of GRUB 2? Normally an EFI boot loader doesn't deal with low-level sector accesses, but with higher-level file accesses.

One option is to peruse the /boot/grub/grub.cfg file for references to "hd1" to find something that's incorrect. Perhaps it shouldn't be accessing the low-level device at all, or maybe there's an error in the reference -- for instance, a BIOS-style boot stanza might have been created rather than an EFI-style boot stanza. Without seeing your grub.cfg file, I can't be more specific than this. If you're using GRUB 2's scripts to create your grub.cfg file, you may need to edit files in /etc/grub.d or elsewhere and then re-generate the grub.cfg file to fix the problem in a long-term way.

If this really is an EFI installation, another option is to bypass GRUB 2 altogether. If you're booting a 3.3.0 or later kernel, my recommendation is to rely on its built-in EFI stub loader. You can boot this directly by creating an entry in your firmware's boot manager or by using a separate boot manager such as rEFInd or gummiboot. (Note that I maintain rEFInd, so I'm not exactly unbiased.) See this Web page I wrote on the subject of EFI boot loaders for more details and more options. Details about your partitioning system, and particularly the size of your EFI System Partition (ESP) and the filesystem on your /boot partition (if it's separate), would be helpful in providing more specific advice.

----------

## Splooshie123

Hello, thanks for replying.

Yes I'm sure I'm using the EFI version. The rEFInd entry points to a file called "grub.efi" and booting from it works, so, *shrugs*

Anyway, I can't use the EFI stub loader because I want to switch to the integrated graphics and power down the discrete graphics card and rEFInd is just a boot manager and not a boot loader so I need grub. I added these lines to my grub.cfg, right before the gentoo kernel is loaded.

```
outb 0x728 1

        outb 0x710 2

        outb 0x740 2

        outb 0x750 0
```

For some reason, after adding these lines to grub.cfg, the error still appears, but only for a split second and it doesn't pause and ask me to press a key. It also solves my other problem with the intel graphics not working

If it's stupid but it works, it's not stupid  :Very Happy: 

----------

