# Run FreeBSD 7/9 with minimal hardware



## Ben (Dec 19, 2012)

Hi,

I am trying to run FreeBSD (7 or 9, I don't care) on a very small device in terms of hardware capacity.

It is a 128 MB system with 1 GB of HDD.

I tried a standard installation to get a feeling for it, FreeBSD 9.0 AMD64 takes 600 MB HDD without the portstree and uses around 12MB RAM in idle.

Can you tell me from your experience what I could do to not exceed the limits? I was thinking to use FreeBSD 7.4 which seems to be less demanding. Also I remember I read once about a tool which can be used to install ports without downloading the complete portstree.

You can give me some hints what I could do? Compiling the kernel etc. is not the way I want to go. It should be as close to standard as possible, but maybe you have some sysctl-flags etc which can help?

Thanks in advance!


----------



## Sfynx (Dec 19, 2012)

I would think about building port packages on a different machine anyway, I have a system-on-chip box with 128 MB RAM and a compact flash card and compiling software on it on a regular basis is simply not an option. I'm using a big Intel Xeon machine to build its updates to pkgng style package files, after which I install them using ports-mgmt/pkg on the low power machine. Ideal devices for network management services such as DNS and DHCP :e


----------



## Ben (Dec 19, 2012)

Yes, I guess I will go this way and maybe not even build the ports myself. I might just go by the packages in the repository. I need to check in detail what packages I need, but this is for sure a good suggestion. Thanks.


----------



## morbit (Dec 20, 2012)

You have amd64 with 128MB of ram and 1GB HDD?


----------



## Ben (Dec 20, 2012)

I used AMD64 as it is a virtual machine and the Virtio module only supports AMD64. The performance gain is significant (2-3 times as fast).

Also this way I can compile packages on the main server which is running AMD64. But you are right, normally I would not have done it.


----------



## morbit (Dec 20, 2012)

Ok, have a look at nanobsd and tinybsd scripts.


----------



## nbittech (Dec 27, 2012)

I have been wondering about an old Panasonic ToughBook I have.  It's a p3 600 with a 12gb hdd and 256mb of RAM.  But it is built like a tank, and worth the attempt.

I thought about using my Phenom X4 powered desktop running i386 FreeBSD in Virtualbox (Windows 7) to set up a package repo for this slower machine.  But I have no idea where to start.  Is there a good tutorial on doing something like this?

I would also possibly use some flags to save disk space when building said packages (-Os when practical, -fconserve-space, static-libs, no_profile, etc.)  Smaller binaries=less RAM and less disk space!


----------



## morbit (Dec 27, 2012)

You would like to have kern.cam.ctl.disable=1 for 9.1 then.


----------



## Ben (Dec 27, 2012)

You have a more complete list of compiler flags?

I use pkgng to build the packages, its quite easy.

What does the sysctl parameter do?


----------



## kpa (Dec 27, 2012)

The CAM target layer driver was added to 9-STABLE some time ago before 9.1-RELEASE branch was split off and it was naturally included in 9.1 BETA and RC releases. Unfortunately it's included by default in the GENERIC kernel and it consumes a not so small amount of memory at initialization. The amount of memory is not a problem on a usual desktop PC or server but is a problem on embedded and other low memory systems. The setting  kern.cam.ctl.disable=1 in loader.conf(5) (it can't be set in sysctl.conf, it's too late) turns the initialization off. A better solution is to compile a custom kernel with the ctl  device removed from the kernel config.


```
nodevice ctl
```


----------



## Beastie (Dec 27, 2012)

You can read more about CAM Target Layer (CTL) here:
http://freebsdfoundation.blogspot.com/2012/01/cam-target-layer.html
http://lists.freebsd.org/pipermail/freebsd-current/2012-January/031007.html
http://www.bsdcan.org/2012/schedule/events/355.en.html


----------



## morbit (Dec 27, 2012)

I wouldn't mess with flags at this point. I've run pretty standard FreeBSD 6-7 on similar hardware.

*This was about that PIII system.


----------

