# Load nvidia module while booting to kernel without loader



## mad2 (Dec 21, 2012)

Hello all,

This is my first post on the FreeBSD forums so if I make a mistake, please don't tear into me too hard.  I have installed FreeBSD on my desktop and I have gotten everything to work except the autoloading of the nvidia module without using the /boot/loader.conf since I am booting straight to the kernel using Grub from my linux install.  I have tried entering 
	
	



```
kldload /boot/modules/nvidia.ko
```
 in my /etc/rc.conf and it seems to load but during boot, it warns that the file exists and it can't load.  Is there a better way to autoload this kernel module without using /boot/loader.conf?  If so please help and thanks in advance.


----------



## SirDice (Dec 21, 2012)

If there's a warning the file exists it means it's already loaded. If you get to see the menu during boot you can be sure /boot/loader.conf is processed.


----------



## Crest (Dec 21, 2012)

Why don't you just start /boot/loader instead of the kernel from GRUB?


----------



## mad2 (Dec 21, 2012)

When I boot to the loader it gives an error that it can't find the kernel.  I have tried chainloading and all but it will not seem to work.


----------



## mad2 (Dec 21, 2012)

SirDice said:
			
		

> If there's a warning the file exists it means it's already loaded. If you get to see the menu during boot you can be sure /boot/loader.conf is processed.



However I am not getting to the menu since I am booting straight to kernel.  I tried putting my module autoload in /boot/loader but it doesn't get started since I am not using the loader.  I basically was wondering if there is a place for a start-up script where I could load the module as an alternative to the loader.


----------



## SirDice (Dec 21, 2012)

Ah. If you put it in rc.conf it will get executed multiple times, various startup scripts source this file. Put your command in /etc/rc.local.


----------



## mad2 (Dec 21, 2012)

SirDice said:
			
		

> Ah. If you put it in rc.conf it will get executed multiple times, various startup scripts source this file. Put your command in /etc/rc.local.



Oh my god, I can't believe I forgot about /etc/rc.local.  That is so simple! Thank you very much!


----------

