User Tools

Site Tools


project:bsd:freebsd

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
project:bsd:freebsd [2018/07/14 11:06] – [FreeBSD Port] maxfxproject:bsd:freebsd [2019/02/04 16:55] – [How to setup USB WIFI] 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]]
  
Line 202: Line 203:
 ]] ]]
  
-=== Making a New Port === 
 [[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 545: 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 633: Line 640:
 =====  Debug ports =====  =====  Debug ports ===== 
  
-Just put the following in /etc/make.conf and then recompile the ports +Just put the following line to /etc/make.conf. Then recompile port with debug symbol.
-you want to include debug symbols: +
 <code> <code>
 WITH_DEBUG= yes WITH_DEBUG= yes
 </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 678: Line 690:
 ====== 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 732: Line 782:
     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 913: Line 965:
 <code> <code>
  
-Kenel drives for wifi +Kernel module for wifi 
 if_ath_load="YES" if_ath_load="YES"
 if_iw_load="YES" if_iw_load="YES"
  
-# Next wifi modules+# Next wifi kernel modules
 wlan_wep_load="YES" wlan_wep_load="YES"
 wlan_ccmp_load="YES" wlan_ccmp_load="YES"
Line 928: Line 980:
 <code> <code>
 wlans_run0="wlan0" wlans_run0="wlan0"
-create_args_wlan0="wlanmode sta country CZ mtu 1500 indoor"+create_args_wlan0="wlanmode sta country CZ indoor"
 </code> </code>
  
Line 1112: Line 1164:
 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>
 +
 +
 +