Opened 3 weeks ago
Closed 3 weeks ago
#5857 closed defect (fixed)
grub-2.14: "grub-install --target=i386-pc /dev/sda" fails
| Reported by: | pierre | Owned by: | pierre |
|---|---|---|---|
| Priority: | normal | Milestone: | 13.0 |
| Component: | Book | Version: | git |
| Severity: | blocker | Keywords: | |
| Cc: |
Description
The error I see is `/usr/lib/grub/i386-pc/kernel.img' is miscompiled: its start address is 0x9074 instead of 0x9000: ld.gold bug?
According to arch, it is due to this commit: https://cgit.git.savannah.gnu.org/cgit/grub.git/commit/?id=1a5417f39a0ccefcdd5440f2a67f84d2d2e26960
They revert this commit, but then they have to regenerate configure, which in turn requires the gnulib package.
I've found that adding ax_cv_check_ldflags___Wl___image_base_0x400000=no to the configure command cures the error (it disables the use of --image-base).
Before fixing the book, I'd like to know whether I am the only one to see this. Needs a computer with legacy BIOS (or a VM).
Change History (8)
comment:1 by , 3 weeks ago
comment:2 by , 3 weeks ago
Apparently other guys have also seen it so the upstream is reviewing a fix: https://lists.gnu.org/archive/html/grub-devel/2026-01/msg00055.html.
comment:3 by , 3 weeks ago
Some background on why the error is at this post on the grub-devel list (thanks for pointing me to this list, Xi): https://lists.gnu.org/archive/html/grub-devel/2025-12/msg00003.html. So I think the error is real. All the proposed patches (revert, patch in the mailing list) are big. I think I'll fix the book with the hack proposed in the description, although it is pretty ugly...
comment:4 by , 3 weeks ago
| Severity: | normal → blocker |
|---|---|
| Summary: | grub-2.14: "grub-install --target=i396-pc /dev/sda" fails → grub-2.14: "grub-install --target=i386-pc /dev/sda" fails |
comment:5 by , 3 weeks ago
In this case I'm wondering if sed the configure script would look better... Generally we don't want to sed if there's a way to override via command line, but in this case the ___ thing is too ugly (TM) and I guess it's too easy for the readers to wrongly count the number of _ :(.
Maybe something like sed 's/--image-base/--nonexist-linker-option/' -i configure. Just a personal aesthetic opinion.
comment:6 by , 3 weeks ago
Not sure whether upstream plan a new release when this is fixed. If they do, maybe just wait for them.
comment:7 by , 3 weeks ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
I've tested the first alternative in a VM, and I am sure the second one would do too. I'll put the sed in the book.

I don't have a latest LFS VM but the kernel.img produced during my manual build (on my EFI-based laptop) is also at 0x9074. I guess it won't work if I use grub-install for i386-pc (BIOS).