PFSenseDevWiki : BuildingpFSense

PfSenseDevHome :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2009-05-24 22:04:25 by ChrisBuechler

Additions:

The current page is:

DevelopersBootStrapAndDevIso


Deletions:

The current page is:

DeveloperBootStrapApfSenseDevelopersISOInstallation




Edited on 2009-05-24 22:03:53 by ChrisBuechler

Additions:

This is outdated, retained for historical purposes only - DO NOT USE



Deletions:

This is outdated, retained for historical purposes





Edited on 2009-05-24 22:03:39 by ChrisBuechler

Additions:

This is outdated, retained for historical purposes



Deletions:
This is outdated, retained for historical purposes




Edited on 2009-05-24 22:03:25 by ChrisBuechler

Additions:
This is outdated, retained for historical purposes

The current page is:

DeveloperBootStrapApfSenseDevelopersISOInstallation


Deletions:

This is outdated, retained for historical purposes

The current page is: DeveloperBootStrapApfSenseDevelopersISOInstallation




Edited on 2008-07-05 05:04:20 by ChrisBuechler

Deletions:
NOTICE! We need someone to turn this into a shell script.



Edited on 2008-07-05 05:04:04 by ChrisBuechler

Additions:

This is outdated, retained for historical purposes

The current page is: DeveloperBootStrapApfSenseDevelopersISOInstallation
How to build pfSense from scratch


Deletions:
These docs are now not needed, but left for historical purposes. Please see
DeveloperBootStrapApfSenseDevelopersISOInstallation

How to build pfSense from scratch





Edited on 2008-03-28 06:30:36 by ScottLambert

Additions:
Categories
CategoryHowTo




Edited on 2008-03-18 13:52:22 by BiptoN

Additions:
%%pkg_add -r http://pfsense.iserv.nl/packages/All/bsdinstaller-2.0.2007.0827.tbz
pkg_add -r http://pfsense.iserv.nl/packages/All/cpdup-1.05.tbz
pkg_add -r http://pfsense.iserv.nl/packages/All/lua-5.0.2_1.tbz
pkg_add -r http://pfsense.iserv.nl/packages/All/lighttpd-1.4.9_1.tbz


Deletions:
%%pkg_add -r http://www.pfsense.org/packages/All/bsdinstaller-1.1.6.2005.1221.tbz
pkg_add -r http://www.pfsense.org/packages/All/cpdup-1.05.tbz
pkg_add -r http://www.pfsense.org/packages/All/lua-5.0.2_1.tbz
pkg_add -r http://www.pfsense.com/packages/All/lighttpd-1.4.9_1.tbz




Edited on 2007-08-18 23:36:57 by ChrisBuechler

Additions:
These docs are now not needed, but left for historical purposes. Please see

Deletions:
These docs are now not needed. Please see



Oldest known version of this page was edited on 2007-08-18 23:36:28 by ChrisBuechler []
Page view:
These docs are now not needed. Please see

DeveloperBootStrapApfSenseDevelopersISOInstallation





How to build pfSense from scratch


NOTE: This is featured for your luxury only. No support is available on this process officially.

These instructions have recently changed (11/15)! Please redo your environment.

NOTICE! We need someone to turn this into a shell script.

Install FreeBSD 6
We'll let you handle this one.
Ensure that you have internet access and that you can ping out.

Prepare the FreeBSD chroot build environment:
export PFSENSEROOT=/usr/jails/pfsense
mkdir -p $PFSENSEROOT
# NOTE - make buildworld takes a _LONG_ time ;-)
# Do this overnight and/or get a FAST machine with very fast disks
# Make sure you have cvsupped the src files for RELENG_6
cd /usr/src/ && make DESTDIR=$PFSENSEROOT buildworld
cd /usr/src/ && make DESTDIR=$PFSENSEROOT installworld distribution
cp /etc/resolv.conf  ${PFSENSEROOT}/etc/resolv.conf
mount -t devfs none ${PFSENSEROOT}/dev
# Copy ports tree to chroot dir
cp -R /usr/ports ${PFSENSEROOT}/usr


Enter the chroot build environment and install bash (optional):
echo PS1=\'pfSense jail - $PS1\'>> ${PFSENSEROOT}/root/.bashrc
SHELL=/bin/sh chroot $PFSENSEROOT
pkg_add -r bash
exit


Enter the FreeBSD chroot build environment and setup a .cvsrc in the ~ (root home dir) and make.conf:
chroot $PFSENSEROOT
pkg_add -r cvsup-without-gui
pkg_add -r rsync
pkg_add -r cpdup
pkg_add -r cdrtools
pkg_add -r pcre
pkg_add -r libevent
echo SKIP_RSYNC=yes >> /etc/make.conf
echo SKIP_CHECKOUT=yes >> /etc/make.conf
echo "cvs -q" >~/.cvsrc 
echo "diff -u" >>~/.cvsrc 
echo "update -d" >>~/.cvsrc


Prepare and fetch the pfsense builder directory items:
mkdir -p /home/pfsense
cd /home/pfsense
touch ~/.cvspass
cvs -z3 -d :pserver:anonymous@cvs.freesbie.org:/cvs co -P freesbie2
fetch http://www.pfsense.com/cvs.tgz
tar xzvpf cvs.tgz


Checkout pfsense and tools to /home/pfsense by issuing (note the captial S in pfSense):
cd /home/pfsense
cvs -d /home/pfsense/cvsroot co tools pfSense
pkg_add -r curl
cd /home/pfsense/tools/pfPorts/php4-pfsense && make && make install && make clean

N.B.: if you build your packages in another box, instead of downloading them with 'pkg_add -r', please verify that libcurl is built without libidn support! This happens if you build curl on a box where libidn is already installed, it's one of those 'smart' (???) ports which changes its dependencies based on what is already installed on the box it's built. You can verify by issuing the following command: "ldd /usr/local/lib/libcurl.so.3", libidn must not be present. In any case, you can rebuild libcurl with -DWITHOUT_LIBIDN.

Setup skip RSYNC:
echo export SKIP_RSYNC=yes >> /home/pfsense/tools/builder_scripts/pfsense_local.sh
echo export SKIP_CHECKOUT=yes >> /home/pfsense/tools/builder_scripts/pfsense_local.sh


Install needed packages for BSD Installer and webConfigurator:
pkg_add -r http://www.pfsense.org/packages/All/bsdinstaller-1.1.6.2005.1221.tbz
pkg_add -r http://www.pfsense.org/packages/All/cpdup-1.05.tbz
pkg_add -r http://www.pfsense.org/packages/All/lua-5.0.2_1.tbz
pkg_add -r http://www.pfsense.com/packages/All/lighttpd-1.4.9_1.tbz


Exit the build-ready chroot environment, save a copy and re-enter (optional):
exit
tar zcf /bigdisk/pfSense-jail.tar.gz $PFSENSEROOT
chroot $PFSENSEROOT

Now cd to the builder scripts directory:
cd /home/pfsense/tools/builder_scripts/


To sync with FreeBSD and patch up:
(assumes that /etc/current-supfile exists)
./cvsup_current


Then run (to build a livecd iso):
./build_iso.sh

or (to build a full update version)
./build_updates.sh

or (to build a embedded image)
./build_embedded.sh


Environment variables that can be overridden:
General:
env NO_COMPRESSEDFS=yes

Emebedded:
env MSDOS_CONF=yes

env SECTT=220000


Cutting down more stuff from the freesbie2 build:
cd /usr/local/pfsense-fs && find . -print -depth > /some/file/in/your/home
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.3
Page was generated in 0.3113 seconds