# Installing NAT fills hard-drive



## Glader (Nov 22, 2010)

Hi again everyone. In an attempt to solve my BSD-router problems described in this thread:
http://forums.freebsd.org/showthread.php?t=19556

I followed the guide at http://freebsd.rogness.net/redirect.cgi?basic/nat.html and did the following:


```
cd /sys/amd64/conf
cp GENERIC LOCAL
nano LOCAL
added line options IPDIVERT
config LOCAL

cd ../compile/LOCAL
make depend && make && make install
```

which proceeded with filling my hard-drive.
After that I figured that the default partition of the BSD installer was a bit cramped so I stayed up all night reinstalling BSD and trying again which gave me the same problemx(.

Can anyone tell me how to safely delete the superfluous files without taking an important chunk out of the file-system, and how to actually install NAT?


----------



## Zare (Nov 22, 2010)

Why are you following that guide? Typing "freebsd nat" in google takes you right to the handbook (as it should).

http://www.freebsd.org/doc/handbook/network-natd.html

Always refer to the handbook first. Use third party references only if you find handbook incomplete or outdated on specific topic.


----------



## dalecosp (Nov 22, 2010)

Canonical NAT resource:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-natd.html

What "superfluous files" are we talking about?


----------



## SirDice (Nov 22, 2010)

Glader said:
			
		

> I followed the guide at http://freebsd.rogness.net/redirect.cgi?basic/nat.html and did the following:
> 
> 
> ```
> ...


It won't help you with your problem but this is the old way of doing things. It's not the recommended way.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html


----------



## Glader (Nov 22, 2010)

When talking about superfluous files I ment the files created by the wonky installation guide I followed (should have chosen my words better, sorry about that). I followed that guide because I found it in a thread here related to the things I had problems with and figured I'd give it a shot ( after all, I've been having problems for a good while and random googling hasn't yielded much).

I have reinstalled BSD again on a much smaller drive now (1.8" 30GB toshiba ZIF-drive) to get the noise level down (and awesomeness) and I'm gonna give the official info a go. Thanks everyone for the links, I'll keep you posted!


----------



## Glader (Nov 22, 2010)

Could an admin please mark this thread as "solved"? I think I've managed to enable NAT correctly so I guess that the problem related to the thread topic is solved.

Thanks for the replies, I'll be going back to the thread http://forums.freebsd.org/showthread.php?t=19556 to beg for more help regarding the original problem.


----------



## jem (Nov 26, 2010)

I suspect the problem here is that your root partition is too small for your NAT-enabled kernel to be installed.

The default partition layout created by sysinstall currently only allocates 512MB to /, and with the amd64 GENERIC kernel plus debugging symbols adding up to 261MB, you're not going to have space to install a second similar kernel.

You can free up space in your root partition by removing *.symbols files from existing kernel directories (/boot/kernel, /boot/GENERIC), and you can avoid creating these files when you build new kernels by commenting out the following line in your kernel config file:


```
makeoptions    DEBUG=-g
```


----------

