User Tools

Site Tools


project:bsd:freebsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
project:bsd:freebsd [2018/07/14 09:54] – created maxfxproject:bsd:freebsd [2018/12/11 09:04] – [Debug ports] maxfx
Line 1: Line 1:
-====== Informations about FreeBSD ======+====== General informations about FreeBSD ======
  
 ====== Derivates FreeBSD OS ====== ====== Derivates FreeBSD OS ======
Line 5: Line 5:
 ^  Derivate FreeBSD  ^  Use      ^  Link                                                                                        ^   ^ ^  Derivate FreeBSD  ^  Use      ^  Link                                                                                        ^   ^
 | FreeBSD            | Easy use  | [[https://www.freebsd.org/|https://www.freebsd.org/]]                                        |   | | FreeBSD            | Easy use  | [[https://www.freebsd.org/|https://www.freebsd.org/]]                                        |   |
-| TrueOS / PCBSD     | Easy use  | [[https://www.trueos.org/|https://www.trueos.org/]]                                          |   |+| TrueOS             | Easy use  | [[https://www.trueos.org/|https://www.trueos.org/]]                                          |   |
 | GhostBSD           | Easy use  | [[http://www.ghostbsd.org/|http://www.ghostbsd.org/]]                                        |   | | GhostBSD           | Easy use  | [[http://www.ghostbsd.org/|http://www.ghostbsd.org/]]                                        |   |
 | DesktopBSD         | Easy use  | [[http://www.desktopbsd.net/|http://www.desktopbsd.net/]]                                    |   | | DesktopBSD         | Easy use  | [[http://www.desktopbsd.net/|http://www.desktopbsd.net/]]                                    |   |
Line 19: Line 19:
 | True-Pico          |           | [[https://www.trueos.org/trueos-pico/|https://www.trueos.org/trueos-pico/]]                  |   | | True-Pico          |           | [[https://www.trueos.org/trueos-pico/|https://www.trueos.org/trueos-pico/]]                  |   |
 | BSD Router Project |           | https://bsdrp.net/                                                                             | | BSD Router Project |           | https://bsdrp.net/                                                                             |
 +| PfSense            |           | https://www.pfsense.org/                                                                       | 
 +| OpenSense          |           | https://opnsense.org/                                                                        |   |
 \\ \\
  
Line 195: Line 196:
 [[https://bsdmag.org/dynamic-memory-allocation-unix-systems/]] [[https://bsdmag.org/dynamic-memory-allocation-unix-systems/]]
  
-==== FreeBSD Port ====+====  Making a New Port  ====
 [[https://networking.ringofsaturn.com/Unix/createportpatch.php| Creating a FreeBSD Port Patch]] [[https://networking.ringofsaturn.com/Unix/createportpatch.php| Creating a FreeBSD Port Patch]]
  
-=== Making a New Port ===+[[http://zewaren.net/site/node/172 |  
 +Build your own FreeBSD ports and make packages out of them using jails, poudriere and portshaker 
 +]] 
 [[https://www.freebsd.org/doc/handbook/ports-poudriere.html | Building Packages with Poudriere]] [[https://www.freebsd.org/doc/handbook/ports-poudriere.html | Building Packages with Poudriere]]
  
Line 541: Line 545:
  
 </code> </code>
 +
 +==== QT Creator - Debugging ====
 +I cannot debug C/C++ programs because message "No symbol table is loaded.  Use the \"file\" command" ... 
 +
 +Best solution is install //devel/gdb//  with path ///usr/local/bin/gdb// 
 +
 +
 ====== Mount ====== ====== Mount ======
 ==== Mount msdosfs ==== ==== Mount msdosfs ====
Line 636: Line 647:
 </code> </code>
  
-more information +more information in
 <code> <code>
 /usr/ports/Mk/bsd.port.mk /usr/ports/Mk/bsd.port.mk
 +</code>
 +
 +===== Debug Makefile ports =====
 +
 +Debug makefile for your port
 +<code>
 +make -d A
 </code> </code>
 ====== Compiling programs ======  ====== Compiling programs ====== 
Line 674: Line 692:
 ====== Jails ===== ====== Jails =====
 Simple script for create jail on zfs filesystem Simple script for create jail on zfs filesystem
 +<code bash>
 +#!/bin/sh
 + 
 +########################################################################                         
 +# Donwload amd64 base, ports tree FreeBSD OS
 +# and unpack base OS to your jail folder
 +########################################################################                          
 +
 +set +x
 +
 +name_jail="freebsd11_2"
 +arch_jail="amd64"
 +version_jail="11.2-RELEASE"
 + 
 +# Create new zfs dataset for jail - only once
 +#zfs create -o mountpoint=/usr/local/jails zroot/jails
 + 
 +# Create jail folder 
 +zfs create zroot/jails/$name_jail 
 + 
 +rm  /tmp/base.txz
 +rm  /tmp/ports.txz
 + 
 +echo "Fetching package from FreeBSD server ..."
 + 
 +fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/$arch_jail/$version_jail/base.txz -o /tmp/base.txz
 +fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/$arch_jail/$version_jail/ports.txz -o /tmp/ports.txz
 + 
 +mkdir -p /usr/local/jails/$name_jail
 + 
 +echo "Unpacking Freebsd base OS ..."
 +tar -xf /tmp/base.txz -C /usr/local/jails/$name_jail
 +tar -xf /tmp/ports.txz -C /usr/local/jails/$name_jail
 + 
 +cp /etc/resolv.conf /usr/local/jails/$name_jail/etc
 +</code>
 +
 +
 <code bash> <code bash>
 #!/bin/sh #!/bin/sh
Line 728: Line 784:
     ip4.addr = 10.0.2.15;     ip4.addr = 10.0.2.15;
 } }
- 
 </code> </code>
  
-Packet forwarding+Packet forwarding  
 + 
 +/etc/pf.conf
 <code> <code>
 +# /etc/pf.conf
 #Define the interfaces #Define the interfaces
 ext_if = "em0" ext_if = "em0"
Line 1108: Line 1166:
 zpool import -f zroot zpool import -f zroot
 </code> </code>
 +
 +
 +==== How to mount disk with geli from live CD  ====
 +
 +Boot live system ...
 +
 +<code>
 +geli attach /dev/ada0p3
 +password: 
 +</code>
 +
 +The command mount only part of filesystem.
 +For example /usr; /tmp; /var; but not /boot
 +<code>
 +zpool import -f /mnt zroot
 +</code>
 +
 +The command mount /boot etc..
 +<code>
 +zfs mount zroot/ROOT/default
 +</code>
 +
 +
 +