-
Notifications
You must be signed in to change notification settings - Fork 94
"Buffer Too Small" when loading initrd from ext2 partition #38
Description
While trying to make systemd-boot use these drivers to load initrd and kernel from custom XBOOTLDR partition, I get "Buffer Too Small" error when I try using ext2 with efifs driver instead of vfat for it. Is there some trick I'm missing for using these drivers?
You can reproduce my error by running
docker run --device /dev/kvm --rm -it yoriksar/nixos-qemu-vm:3ifn9pacv6wqv1r49j002p01cz7w4ama
It's a NixOS system wrapped in QEMU VM in Docker image. Note that similar system that uses FAT boots just fine, even though it also loads ext2_64.efi driver:
docker run --device /dev/kvm --rm -it yoriksar/nixos-qemu-vm:7nbbvwpjwa292ws2k58vr98vmlq7pgvc
(you may omit --device /dev/kvm if you don't want containers to get access to it, but it will be slow)
Both examples use the same version of everything, only the format of the boot drive differs.
In my previous attempts I managed to get more debug from systemd-boot:
OpenVolume
OpenVolume
Open(3E7F2998 <ROOT>, "\EFI\nixos\775xip76m7ipmad91aqg4qmzv11ag5f7-linux-5.15.55-bzImage.efi")
RET: 3EE78E18
Close(3E7F2998|'/') <ROOT>
GetInfo(3EE78E18|'/EFI/nixos/775xip76m7ipmad91aqg4qmzv11ag5f7-linux-5.15.55-bzImage.efi', 0)
Get regular file information
GetInfo(3EE78E18|'/EFI/nixos/775xip76m7ipmad91aqg4qmzv11ag5f7-linux-5.15.55-bzImage.efi', 600)
Get regular file information
Read(3EE78E18|'/EFI/nixos/775xip76m7ipmad91aqg4qmzv11ag5f7-linux-5.15.55-bzImage.efi', 7821408)
Close(3EE78E18|'/EFI/nixos/775xip76m7ipmad91aqg4qmzv11ag5f7-linux-5.15.55-bzImage.efi')
OpenVolume
Open(3E7F2998 <ROOT>, "EFI\nixos\688xmj1rc311djm1ql9c80kr4gmcc3va-initrd-linux-5.15.55-initrd.efi")
RET: 3E7DB018
GetInfo(3E7DB018|'/EFI/nixos/688xmj1rc311djm1ql9c80kr4gmcc3va-initrd-linux-5.15.55-initrd.efi', 592)
Get regular file information
EFI stub: ERROR: Failed to get file info
Close(3E7DB018|'/EFI/nixos/688xmj1rc311djm1ql9c80kr4gmcc3va-initrd-linux-5.15.55-initrd.efi')
Close(3E7F2998|'/') <ROOT>
EFI stub: ERROR: Failed to load initrd!
EFI stub: ERROR: efi_main() failed!
Close(3E7F2998|'/') <ROOT>
Failed to execute NixOS (\EFI\nixos\775xip76m7ipmad91aqg4qmzv11ag5f7-linux-5.15.55-bzImage.efi): Buffer Too Small
it seems like it fails to get file information using this driver first, so "Buffer Too Small" might not be the root issue.