Can you upload diskboot.exec and boot.exec somewhere? Did you see any
errors? Ideally we should have errored out if those files are not 512 bytes

On Tue, 3 Jan 2023 at 09:09, Immolo via Grub-devel <[email protected]>
wrote:

> Using Gentoo with clang on a MBR system I have come across an extra string
> the content /lib/ld-linux.so.2 is being added to
> /usr/lib/grub/i386-pc/diskboot.img and /usr/lib/grub/i386-pc/boot.img
> taking it over 512 bytes meaning it can't be used on a MBR system.
>
> You can use truncate to remove the extra string then it will install and
> boot correctly but I am highlighting this here in hopes of a better fix.
>
> Steps to reproduce in Gentoo:
>
>    1. Use a clang stage3 on a MBR system.
>    2. emerge -va sys-boot/grub
>    3. grub-install /dev/sda
>
> Error:
>
> Installing for i386-pc platform.
> grub-install: error: diskboot.img size must be 512 bytes.
>
> Workaround:
>
> 1. truncate -s 512 /usr/lib/grub/i386-pc/diskboot.img
> 2. truncate -s 512 /usr/lib/grub/i386-pc/boot.img
> 3. grub-install /dev/sda
>
> I'm not really sure what files I can attach to help debugging this one but
> if you can think of any please ask for them.
> _______________________________________________
> Grub-devel mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
-- 
Regards
Vladimir 'phcoder' Serbinenko
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to