6

I have been struggling for several hours on how to find a coherient guide on how to create your own BSD distribution based off of FreeBSD. I have looked at the GitHub repositories for pfsense, but I don't understand how it works. My goal is to create a custom distro that comes with a desktop environment and other desktop utilities already setup, etc... (not interested in PCBSD or any other similar solution)

I ran across the following article, but it does not tell you how to install custom ports and customize the ISO, rather just compile the existing source. This article is more in the direction I was aiming for, but it only sets up basic files and not ports. If I copy the binaries from ports, how will the system keep track of which programs need to be updated?

Furthermore, the documentation on the FreeBSD website is of not much help, it still does not cover installing custom ports.

closed as too broad by devnull, Anthon, jasonwryan, slm, strugee Apr 12 '14 at 22:11

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Did you manage to get this in the end? I'm very interested. – Pwdr Oct 18 '16 at 19:35
5

You should first familiarize yourself with FreeBSD and building/getting ports. I really advise you to quietly read the FreeBSD handbook, as FreeBSD is not Linux.

FreeBSD itself is a minimal coherent system (slightly server oriented, as having no X11 by default).

Then you can add ports, also called packages when in binary form. The chapter 5 from the official FreeBSD handbook is quite clear on how to get packages, how to get the ports tree (a set of files to build a package from source) or how to build form ports.

Here is a small reminder regarding ports:

  1. get and/or sync your port tree:

    • get your port tree:

      svn checkout https://svn0.us-east.FreeBSD.org/ports/head /usr/ports
      

      You should use the subversion mirror site close to your location (see the list here).

    • sync your port tree:

      svn update /usr/ports
      
  2. build the port you want to build (ex: bash, as csh is the default FreeBSD shell)

    cd /usr/ports/shells/bash
    make install && make clean
    

Then, once you have your base system with some ports you can try to make an ISO file.

Note:

The howtos you mentioned are targeting 5.x or 6.x. These can be used as guidelines, but it is strongly advised to read between the lines as some things have changed, particularly the way the sources are synchronized (no more unsecured cvsup, svn is now used for instance).

pfSense is not based on a full FreeBSD, but on its extremely minimal form called NanoBSD which is targetting more embedded systems than desktop setup.

To know more:

  • So if I just install the base system, then the ports I want as specified I can just use like "dd if=/dev/sda1 of=/mydistro.iso" kinda thing and that will boot with an installer and everything? – sam Apr 12 '14 at 17:23
  • As soon as you keep all the things in / (no other partition), then there is good chance you got something almost working (you might still need to fix a few conf files). – Ouki Apr 12 '14 at 17:37
  • Beware. An ISO fs requires some other things to properly boot. You should use the mkisofs (or another ISO making tool), as suggested by the link you gave. – Ouki Apr 12 '14 at 18:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.