While experimenting with ZFS in FreeBSD, I made some tweaks to the vk.kmem_size variable in /boot/loader.conf. when setting it like this:

#/boot/loader.conf
vm.kmem_size="1024"

everything worked, but I wanted to see what would happen if i doubled it. Unfortunately, setting vm.kmem_size to 2048 kept the FreeBSD kernel from booting. At startup it would just do this:

panic: kmem_suballoc: bad status return of 3
cpuid = 0

To fix the erroneous variable setting, I had to :

  1. Reboot.

  2. Wait for the FreeBSD Boot menu. (the screen that lists Default, ACPI disabled, safe, and single user modes)

  3. Press 6 to select "Escape to loader prompt"

  4. At the loader prompt, type "show". This will provide all the default variable settings. press the spacebar to page down. In my case, at the end, the incorrect variable was: vm.kmem_size="2048".

  5. to switch it back and allow the system to boot, type

set (variable)=(correct value)

in my case this was:

set vm.kmem_size=1024M
  1. type
boot

When you are finished with all that fun, you should edit the /boot/loader.conf file back so you don't have to do this again. Thanks to "crsd" from the FreeBSD IRC channel for the help.


Comments

comments powered by Disqus