# Recover old kernel configuration file possible?



## carmik (Mar 6, 2012)

Hello all. Seems that after 10+ years I've managed to destroy things in a big way: running *rm -rf* on /root that is :r

The biggest damage, from the looks of it, is that I*'*ve lost the specific custom kernel configuration file /root/kernels/MYOWNKERNEL. I was wondering if it would be possible to reconstruct it somehow, from the last [CMD=]make buildkernel[/CMD] process...

Difficult week :\


----------



## kpa (Mar 6, 2012)

Try this:
`# config -x /path/to/kernel`


----------



## SirDice (Mar 6, 2012)

kpa said:
			
		

> Try this:
> `# config -x /path/to/kernel`



That might work. But only if the kernel had been compiled with

```
options INCLUDE_CONFIG_FILE
```


----------



## carmik (Mar 6, 2012)

It didn't, probably due to the reason cited by SirDice. Oh well, seems I'll have to dig the pf-related kernel options somehow


----------



## phoenix (Mar 6, 2012)

`# more /usr/src/sys/conf/NOTES`
`# more /usr/src/sys/<arch>/conf/NOTES`
where <arch> is your CPU architecture (i386, amd64, etc).


----------

