# bootloader prompt and unload



## cd (Oct 16, 2010)

Hello!

I think unload is not working as expected anymore - when I go into bootloader prompt (6 at the boot menu) and type "unload", the modules are unloader (what I can also check with "lsmod"), but right after I type "boot" kernel and all modules are reloaded again.

So what is the point of the new "unload" command? I think in previous releases it unloaded the modules so after boot there was no modules loaded...

Best regards,


----------



## wblock@ (Oct 16, 2010)

You can unload modules that would normally be loaded in /boot/loader.conf, or unload the default kernel to use a different kernel.  Modules that are built into the kernel can't be disabled this way, because they're part of the kernel.

If that's not what you mean, please show exactly what you are doing.


----------



## cd (Oct 17, 2010)

Well, right now the behavior is a bit different:
-get into bootloader command prompt (6 from the boot menu)
-type "unload" to unload the kernel modules - after this no modules are loaded
-type "boot" - kernel and modules are reloaded again and system is going boot

My problem is caused by vboxnetflt module that, when loaded with /boot/loader.conf, causes kernel crash before init gets running. When vboxdrv module is loaded alone boot is ok, but when I also add vbox's network module then system crash. In that situation, to modify the /boot/loader.conf file I need to get at least into single mode, which is impossible with the network module being loaded...

I remember that in 8.0 (maybe older) I had this issue too, but "unload" worked as expected - only the kernel was booting with no modules. In 8.1 after "unload" modules are reloaded again with kernel. To pass along this issue I had removed "/boot/module" from modules path, but this is not the proper solution I think..


----------



## wblock@ (Oct 17, 2010)

/usr/local/etc/rc.d/vboxnet will also load the vboxnetflt module after boot when you have

```
vboxnet_enable="YES"
```

in /etc/rc.conf.  That would make it look like unload wasn't working, at least for that module.


----------



## da1 (Oct 18, 2010)

```
unload
load /boot/kernel/kernel
load /any/other/needed/module.ko (full path)
boot
```

Did you try like that ?


----------



## cd (Oct 23, 2010)

Ah yes, I had to load the kernel image manually after unload, if not, then everything is loaded back into memory again on boot command. Thank you!


----------

