Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Building pfSense 2.2 / FreeBSD 10.1 - WORKING STEPS

    Scheduled Pinned Locked Moved Development
    50 Posts 14 Posters 21.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tamldt
      last edited by

      Hi PiBa…!

      Thanks for share...! you seem knowledgeable about build iso pfsense. Can you help me some problem?

      in "7. Build ports" you can explain for me about ports.

      I think port as feature of pfsense therefore remove port will remove feature pfsense after build ??? I'm not sure !!! how do you think ?

      Thanks!

      Le Doan Thanh Tam
      ldtt.s2l@gmail.com

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        Hi tamldt,
        I think that indeed if you 'disable' some ports in /usr/home/pfsense/tools/builder_scripts/conf/pfPorts/buildports.RELENG_2_2 that they will be excluded from the resulting pfSense iso and installation. You could be getting into some major trouble though, which will be yours to fix :).

        As for 'knowledgeable' i think thats a bit to much credit, i merely managed to get the iso build, and thought i write the steps down as i saw quite a few people not succeeding that far for different reasons.. Note that these steps only worked recently because some fixes have been commited by other people that where also having trouble, and knew way better than me how to fix it.
        Greets PiBa-NL

        1 Reply Last reply Reply Quote 0
        • H
          Hobby-Student
          last edited by

          Good work @PiBa

          just one thing to mention:

          0 - Gain access to the pfsense-tools

          Use PuTTYgen to generate a SSH-1(RSA) key …

          didn't work for me. I needed to generate the keys inside the FreeBSD machine.

          
          ssh-keygen -b 1024
          
          
          1 Reply Last reply Reply Quote 0
          • P
            PiBa
            last edited by

            Hi Hobby-Student,

            Seems like i made a mistake writing it up there, should have been "SSH-2 RSA", fixed above.

            Thanks.
            PiBa-NL

            1 Reply Last reply Reply Quote 0
            • H
              Hobby-Student
              last edited by

              @PiBa:

              Hi Hobby-Student,

              Seems like i made a mistake writing it up there, should have been "SSH-2 RSA", fixed above.

              Thanks.
              PiBa-NL

              This also doesn't work for me. Every key generated with PuTTYgen is making problems. Perhaps you could add an alternative "0b" with ssh-keygen.

              This Tools-Repo was driving me crazy…  :o

              1 Reply Last reply Reply Quote 0
              • P
                PiBa
                last edited by

                Hi Hobby-Student,

                Seems i have just lost my ability to edit my own post..
                Would have added your "ssh-keygen -b 1024" as an alternative otherwise.
                I've made ssh keys with PuTTYgen twice, and they both worked.. I dont know why yours didn't.

                Greetz PiBa-NL

                1 Reply Last reply Reply Quote 0
                • T
                  tamldt
                  last edited by

                  Hi PiBa!

                  I have created iso file of pfsense. But when I install from this iso file on Vmware WorkStation, CPU load very high, 100% if i creat virtual machine 1 CPU, 50% if 2 CPU, …

                  I see process check_reload_status used 100% CPU

                  You can help me fix it!

                  Thanks!

                  Le Doan Thanh Tam
                  ldtt.s2l@gmail.com

                  1 Reply Last reply Reply Quote 0
                  • P
                    PiBa
                    last edited by

                    Hi tamldt,

                    I dont build verry frequently.. so could be a bug was introduced somewhere recently..

                    The nic in the vm is 'bridged' to a real nic?

                    Another option is that the vm is not having a proper wan connection? And causes gateway checks to keep running and restarting services.. Does it keep that high cpu usage even after 5 or more minutes? Does it have proper dns / wan gateway settings, enough memory assigned?
                    Anything in the systemlogs that indicates a flapping nic or something?

                    I've seen check_reload_status being 'bussy' to for official builds to for a while after booting a vm..

                    Perhaps try and rebuild the whole iso again with a 'clean' environment, if you did some experimentation to get it to build in the first place..?

                    Other than those things i don't know why it would happen, sorry.

                    Greets PiBa-NL

                    1 Reply Last reply Reply Quote 0
                    • T
                      tamldt
                      last edited by

                      Hi PiBa!

                      i will try!

                      Thank PiBa

                      Le Doan Thanh Tam
                      ldtt.s2l@gmail.com

                      1 Reply Last reply Reply Quote 0
                      • T
                        tamldt
                        last edited by

                        Hi PiBa…!

                        i try and i success CPU load low :D, thank you so much...!

                        and i have an idea, make a file script to automatic compile pfsense ! do you know how to implement it ? if you can please help me, i'm just beginning to learn about pfsense :D

                        thank you so much...!

                        Le Doan Thanh Tam
                        ldtt.s2l@gmail.com

                        1 Reply Last reply Reply Quote 0
                        • P
                          PiBa
                          last edited by

                          Hi tamldt,

                          Nice to hear cpu load is good now.

                          As for scripting the +-8 steps required into maybe 4? (you still have to generate a ssh key, and upload it on pfSense portal, and install FreeBSD, and have to checkout pfsense-tools, before you can run a buildscripts in there..), i really don't see why another script would add to make it 'better'.. Choosing a version, and building an iso would be 'hardcoded' in the script, though now you can easily see where you might want to choose to build memstick images instead of an iso, or building pfSense 2.1 instead of 2.2, it would remove understanding of whats going on. That its actually possible to get a working .iso in just 8 steps is already nice i think..
                          As for how to script stuff, just look at the scripts that you've ran while getting it to compile the .iso , if you understand scripting it shouldn't be hard to build another script that calls them in order, and checks if they output errors. Sorry but i'm not going to invest time into making such a script..

                          As for learning pfSense, i really wouldn't think the first step would be to compile it yourself.. You would just install it from the released downloadable .iso files.. wouldn't you?

                          If you want to build it yourself, and presumably change 'things' in it, you will need to be knowledgeable about scripting/c++/php/stuff anyway, and likely will want to skip as many steps in the compilation process as possible, so putting it all in 1 script would only hinder development/testing of changes you make..

                          Hope you succeed with what you wanted to do, and try to push any improvements you make back upstream.

                          Greets PiBa-NL

                          1 Reply Last reply Reply Quote 0
                          • T
                            tamldt
                            last edited by

                            Hi PiBa!

                            Oke! I am very grateful for advice from your!

                            Thanks

                            Le Doan Thanh Tam
                            ldtt.s2l@gmail.com

                            1 Reply Last reply Reply Quote 0
                            • yakarY
                              yakar
                              last edited by

                              Hi PiBa,

                              How can add mysql56-server to buildports.RELENG_2_2 file or how can i build iso with mysql56-server?

                              Thank you for your sharing..

                              Bilgi paylaştıkça artar!
                              5651 sayılı kanun (güncel)
                              pfSense alt yapısı üzerine kurulu iSafe ile işletmelere özel çözümler.

                              1 Reply Last reply Reply Quote 0
                              • P
                                PiBa
                                last edited by

                                We seem to be wondering off of the actual topic here (or how i intended it to be anyway.). Which would be how to build pfSense the same as how it is build by the official buildservers of the pfSense team.

                                Any modifications you want to do to it like adding other packages / binaries, and how to change those are beyond the scope of this topic. So perhaps you could start a new topic with the question you have and a appropriate subject.

                                Anyway I don't know about adding mysql and whats needed for that, ive done verry little development on the pfSense binaries/iso, a little more with the php side of things, but that doesn't help for these questions.. I can only advice you to look at existing buildscripts and try to understand what go's where from those files.. Search for an existing included items/binaries, then try to add mysql in a similar manner and run the buildscripts again, and again, try a little different, and try again..(you get the picture ;) ).

                                1 Reply Last reply Reply Quote 0
                                • yakarY
                                  yakar
                                  last edited by

                                  Thank you very much for your answer.. :)

                                  Bilgi paylaştıkça artar!
                                  5651 sayılı kanun (güncel)
                                  pfSense alt yapısı üzerine kurulu iSafe ile işletmelere özel çözümler.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    sheriftk
                                    last edited by

                                    Hello…

                                    I was trying to build 2.2.1 on FreeBSD 10.1 x64  following the instructions above and it stops while trying to build the ISO.

                                    Builder is running the command: env __MAKE_CONF= BOOT_COMCONSOLE_SPEED=115200 BOOT_BOOT0_COMCONSOLE_SPEED=0 WITHOUT_CROSS_COMPILER=yes script -aq /home/pfsense/tools/logs/buildworld.amd64 make  -j4 __MAKE_CONF= BOOT_COMCONSOLE_SPEED=115200 BOOT_BOOT0_COMCONSOLE_SPEED=0 WITHOUT_CROSS_COMPILER=yes SRCCONF=/home/pfsense/tools/builder_scripts/conf/src/src.conf.10 TARGET=amd64 TARGET_ARCH=amd64 LOCAL_ITOOLS="uuencode uudecode ex" buildworld
                                    make: make: don't know how to make uudecode. Stop

                                    I have tried with various options including starting the build process in a clean state but no joy. The ports build completes successfully. Thanks in Advance.

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      bhawk6901
                                      last edited by

                                      builsding on freebsd10.1-release
                                      getting error on build of mpd5
                                      error is as follows
                                      ******pppoe.c:334:26: warning: 'memset' call operates on objects of type 'struct ngpppoe_init_data' while the size is based on a different type 'struct ngpppoe_init_data *const' [-Wsizeof-pointer-memaccess]
                                              memset(idata, 0, sizeof(idata));
                                                    ~~~~~            ^~~~~
                                      pppoe.c:334:26: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
                                              memset(idata, 0, sizeof(idata));
                                                                      ^~~~~
                                      pppoe.c:718:11: warning: cast from 'char ' to 'const struct typelist ' increases required alignment from 1 to 4 [-Wcast-align]
                                                      tlist = (const struct typelist
                                      ) resp->data;
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      pppoe.c:740:6: error: use of undeclared identifier 'NGM_ETHER_ATTACH'; did you mean 'NGM_ETHER_DETACH'?
                                                  NGM_ETHER_ATTACH, &name, sizeof(name)) < 0) {
                                                  ^~~~~~~~~~~~~~~~
                                                  NGM_ETHER_DETACH
                                      /usr/include/netgraph/ng_ether.h:70:2: note: 'NGM_ETHER_DETACH' declared here
                                              NGM_ETHER_DETACH,              /
                                      our way to be shut down */
                                              ^
                                      pppoe.c:770:10: warning: cast from 'char *' to 'const struct hooklist *' increases required alignment from 1 to 4 [-Wcast-align]
                                              hlist = (const struct hooklist *)resp->data;
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      pppoe.c:899:8: warning: cast from 'const struct pppoe_tag *' to 'const uint32_t *' (aka 'const unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
                                                          (const uint32_t)(pt + 1) == idx)
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
                                      4 warnings and 1 error generated.
                                      *** [pppoe.o] Error code 1

                                      make[2]: stopped in /usr/ports/net/mpd5/work/mpd-5.7/src
                                      1 error

                                      make[2]: stopped in /usr/ports/net/mpd5/work/mpd-5.7/src
                                      *** [_sub.all] Error code 2

                                      make[1]: stopped in /usr/ports/net/mpd5/work/mpd-5.7
                                      1 error

                                      make[1]: stopped in /usr/ports/net/mpd5/work/mpd-5.7
                                      ===> Compilation failed unexpectedly.
                                      Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
                                      the maintainer.
                                      *** Error code 1******
                                      Please help

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        bhawk6901
                                        last edited by

                                        edit: built fine when i tried to build pfsense 2.2-development instead of 2.2.1 :/

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          dmitryluhtionov
                                          last edited by

                                          Hi.
                                          Can I get patched sources of mpd5 ?

                                          I am planned to out mpd-5.8 in nearest time.

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            madscientist159
                                            last edited by

                                            The –build-pfPorts option to ./build.sh no longer exists.  What replaced it?

                                            Thanks!

                                            Don't let the low karma fool you…wading into a politically charged discussion tends to be a bad idea...

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.