Bug 209944 - kernel panic when trying to EFI boot from memory disk
Summary: kernel panic when trying to EFI boot from memory disk
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.3-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Keywords: uefi
Depends on:
Reported: 2016-06-01 18:19 UTC by Nikita
Modified: 2017-02-17 10:23 UTC (History)
2 users (show)

See Also:

screenshot from virtualbox when kernel panics (27.14 KB, image/png)
2016-06-01 18:19 UTC, Nikita
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita 2016-06-01 18:19:12 UTC
Created attachment 170922 [details]
screenshot from virtualbox when kernel panics

while trying to uefi boot FreeBSD 10.3 from memory disk (mfsroot) kernel panics
w/ "panic: error reading '/mfsroot': cant allocate memory" (pic in attach)
Tried on VM (VirtualBox 5.0.20) w/ 1024MB of RAM and on HP Gen9 (256Gig of RAM; Bios version P89 1.32). Both was panicking with the same result.

i was using http://mfsbsd.vx.sk/ to build this image w/ default loader.conf provided by mfsbsd:


disk image is using ufs as FS for bsd's partition.

I'm not sure if it's mfs or efi issue. Would be great if we would be at least figure out this.

If you need any other info - please let me know
Comment 1 Nikita 2016-06-06 21:52:49 UTC
The reason why mem allocation was failing is because default value of EFI_STAGING_SIZE is 48M, and if mfsroot is bigger than that - booting fails.
building a custom loader.efi w/ value for EFI_STAGING_SIZE bigger than mfsroot's size fixed this panic.