Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(SOLVED)GRUB2 error: failure to read sector 0x0 from "hd1"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Splooshie123
n00b
n00b


Joined: 16 Apr 2012
Posts: 26

PostPosted: Sat Nov 10, 2012 12:17 am    Post subject: (SOLVED)GRUB2 error: failure to read sector 0x0 from "h Reply with quote

Hello.

When I select Gentoo in the grub menu, I get an error something like this:
Code:
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
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 431
Location: Woonsocket, RI

PostPosted: Sat Nov 10, 2012 2:23 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Splooshie123
n00b
n00b


Joined: 16 Apr 2012
Posts: 26

PostPosted: Sat Nov 10, 2012 7:00 am    Post subject: Reply with quote

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.

Code:
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 :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum