[ipxe-devel] initrd corruption since commit ef038491858cb51f8aa17b1f6e50444d2e627413
Sven Dreyer
sven at dreyer-net.de
Mon Apr 28 14:59:20 UTC 2025
Am 26.04.25 um 02:07 schrieb Michael Brown:
> I'm unable to reproduce your problem, sorry. But since you have a
> bisection result: try starting from commit b65f67d44 (i.e. the previous
> commit, which you say works for you), and add in one change at a time
> from commit ef0384918. For example, start by adding the first changed
> line in bzimage.c:
>
> /* Calculate lowest usable address */
> - bottom = userptr_add ( bzimg->pm_kernel, bzimg->pm_sz );
> + bottom = ( bzimg->pm_kernel + bzimg->pm_sz );
>
> Test after each changed line, and see which changed line introduces your
> issue.
>
> Thanks,
>
> Michael
Thanks for your investigation and support, Michael!
This is the change that causes the boot problem on my Debian nfsroot system:
src/arch/x86/image/initrd.c
/* Copy any remaining initrds (e.g. embedded images) to the region */
for_each_image ( initrd ) {
- if ( userptr_diff ( initrd->data, top ) >= 0 ) {
+ if ( initrd->data >= top ) {
len = ( ( initrd->len + INITRD_ALIGN - 1 ) &
~( INITRD_ALIGN - 1 ) );
And this is the change that makes wimboot 2.8.0 fail to boot my Windows
PE 10 x86_64:
src/arch/x86/image/initrd.c
/* Find the highest image not yet in its final position */
highest = NULL;
for_each_image ( initrd ) {
- if ( ( userptr_diff ( initrd->data, current ) < 0 ) &&
+ if ( ( initrd->data < current ) &&
( ( highest == NULL ) ||
I have attached a few screenshots from qemu. The output of imgstat seems
to be the same with and without the changes to initrd.c.
Thanks and best regards,
Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_debian-fail-imgstat.png
Type: image/png
Size: 6619 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_debian-fail-console.png
Type: image/png
Size: 13213 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3_debian-success-imgstat.png
Type: image/png
Size: 6604 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4_debian-success-console.png
Type: image/png
Size: 1993 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5_wimboot-fail-imgstat.png
Type: image/png
Size: 4521 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6_wimboot-fail-console.png
Type: image/png
Size: 13073 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7_wimboot-success-imgstat.png
Type: image/png
Size: 4537 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8_wimboot-success-console.png
Type: image/png
Size: 13451 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20250428/3f19d4c7/attachment-0015.png>
More information about the ipxe-devel
mailing list