# mfsbsd inflate



## Nutz (Oct 29, 2019)

Hello All,

I was trying to boot a server with the great mfsbsd image (11.1)  but this time that's not working !
I got this error message at the boot :






After few research on the web the issue may come from the EFI_STAGING_SIZE.
As I didn't know how to change this setting quickly, I tried to use another mfsbsd image (12.0) and it's working!

But I would like to know why I can't use the 11.1 image, so I checked on FreeBSD source to check if this setting was defined differently between 11.1 and 12.0. And it's the case, for FreeBSD 12 with amd64 the setting is 100 (other is 64), for FreeBSD 11.1 setting is 64.

Does it means the image boot size of FreeBSD 11.1 is bigger than 64 ? or it could be something else ?

Best regards,
N!


----------



## SirDice (Oct 29, 2019)

Keep in mind that 11.1 is End-of-Life since September 2018, so don't spend too much time on it. Use 11.3 instead if you want/need to use 11.


----------



## Nutz (Oct 29, 2019)

Hi Sirdice,

yes of course, honestly, i'm just curious. I would like to understand the issue and why it's happening.

In the mfsbsd source i found this :

```
MFSROOT_MAXSIZE?= 100m
```

But i didnt find the setting for older version, Does anyone have the information or a clue where i can check ?

Best regards,
N!


----------



## Nutz (Nov 4, 2019)

Ok, so i tried to set up the EFI_STAGING_SIZE at the build for a 11.2 :
CFLAGS="-O2 -pipe -DEFI_STAGING_SIZE=100" make buildkernel buildworld -j30 KERNCONF=CUSTOM

and build the mfsbsd again, bu i'm still getting the same error.

So i keep going with a build of a fbsd 12 as it seems to work but when i'm add driver on kernel, the image seems to be too big for mfs...next step is to chnage makefile option MFSROOT_MAXSIZE? and the EFI_STAGING_SIZE


----------



## SirDice (Nov 4, 2019)

Never, ever, set CFLAGS. The most optimal flags are already used, there's no need to overrule that.


----------



## Nutz (Nov 4, 2019)

Hi Sirdice,

hum okay..but finally that's ok with those settings :

```
CFLAGS="-O2 -pipe -DEFI_STAGING_SIZE=200"
```

What is the other way to do that ?

BR,
N!


----------



## SirDice (Nov 4, 2019)

The -D option has nothing to do with CFLAGS. I suggest you read the documentation and build your own images: https://github.com/mmatuska/mfsbsd


----------



## Nutz (Nov 28, 2019)

Someone fix the "issue" and the size is now dynamic :








						Support kernels larger than EFI_STAGING_SIZE in loader.efi · freebsd/freebsd-src@3751493
					

With a very large kernel or module the staging area may be too small to hold it. When this is the case try to allocate more space before failing in the efi copyin/copyout/readin functions.  Reviewe...




					github.com
				




N!


----------

