project:kernellab:bsd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
project:kernellab:bsd [2020/04/30 21:04] – removed maxfx | project:kernellab:bsd [2020/05/01 19:26] – maxfx | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Fundamentals of FreeBSD ====== | ||
+ | ===== Getting Started with FreeBSD | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | |||
+ | ===== The Kernel Boot Process ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ===== The Kernel ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ===== FreeBSD Kernel Porting Guide ===== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Do you like backdoors ? ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | ==== Kernel Porting to ARM Board ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== NetBooting ARM/MIPS ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ==== Kernel Debug, BackTrace ==== | ||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ==== Extended firmware interface (Efi) ==== | ||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ==== Internal Talks ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ==== FreeBSD is not a Linux distribution ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ==== FreeBSD BSDCons ==== | ||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== FreeBSD ASIANBSDCON 2018 ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== FreeBSD ASIANBSDCON 2017 ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ===== Tweaking a Running Kernel ===== | ||
+ | |||
+ | ==== Tuning tips ==== | ||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== FreeBSD Broadcom Wi-Fi ==== | ||
+ | [[https:// | ||
+ | |||
+ | ==== Linux® emulation in FreeBSD ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== How to Become a FreeBSD Committer ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Bios ==== | ||
+ | [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | ====== Bhyve Hypervisor ====== | ||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | ====== Build ports ====== | ||
+ | |||
+ | ==== Reference ==== | ||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | * [[http:// | ||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | * [[https:// | ||
+ | |||
+ | * [[http:// | ||
+ | |||
+ | |||
+ | ==== Portmaster ==== | ||
+ | |||
+ | < | ||
+ | portmaster -L - Check all update for ports | ||
+ | portmaster -a - Upgrade ports | ||
+ | portmaster -af - Rebuild of installed application | ||
+ | </ | ||
+ | |||
+ | ==== Build ports with Poudriere ==== | ||
+ | |||
+ | Create it ports tree for poudriere | ||
+ | < | ||
+ | poudriere ports -c | ||
+ | </ | ||
+ | |||
+ | Configure poudriere, file system, ram, etc... | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | List port tree | ||
+ | < | ||
+ | poudriere ports -l | ||
+ | |||
+ | PORTSTREE METHOD | ||
+ | default | ||
+ | </ | ||
+ | |||
+ | Create it jail for build and the target system | ||
+ | < | ||
+ | poudriere jail -c -j freebsd_11-2x64 -v 11.2-RELEASE -a amd64 | ||
+ | </ | ||
+ | |||
+ | |||
+ | List the jails | ||
+ | < | ||
+ | sudo poudriere jail -l | ||
+ | |||
+ | JAILNAME | ||
+ | freebsd_11-2x64 11.2-RELEASE-p11 amd64 ftp 2019-07-10 20:48:07 / | ||
+ | </ | ||
+ | |||
+ | |||
+ | Copy your port files to / | ||
+ | and then build it port for example | ||
+ | |||
+ | < | ||
+ | sudo poudriere testport -o lang/halide -j freebsd_11-2x64 | ||
+ | </ | ||
+ | |||
+ | ==== Debug ports ==== | ||
+ | |||
+ | Just put the following line to / | ||
+ | |||
+ | < | ||
+ | WITH_DEBUG= | ||
+ | </ | ||
+ | |||
+ | more information in | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ==== Debug Makefile ==== | ||
+ | |||
+ | Debug makefile for your port | ||
+ | |||
+ | < | ||
+ | make -d A | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Desktop tips ====== | ||
+ | |||
+ | ==== FoldingHome on FreeBSD ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Steam on FreeBSD ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Bitcoin Full Node ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Tuning Power Laptops ==== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Optimus on Freebsd - Hot fix ==== | ||
+ | |||
+ | Comment out Nvidia-related parts from your [[https:// | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | |||
+ | Section " | ||
+ | Identifier | ||
+ | Driver | ||
+ | BusID " | ||
+ | EndSection | ||
+ | |||
+ | #Section " | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #EndSection | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Then add the following bits to [[https:// | ||
+ | |||
+ | < | ||
+ | kld_list=' | ||
+ | </ | ||
+ | |||
+ | ==== NTPD synchronize ==== | ||
+ | |||
+ | < | ||
+ | ntpdate_enable=" | ||
+ | ntpdate_hosts=" | ||
+ | </ | ||
+ | |||
+ | Or manually update time and date <WRAP center round important 60%> securelevel on 2 then you cannot set time only about second. </ | ||
+ | |||
+ | < | ||
+ | ntpdate -b pool.ntp.org | ||
+ | sudo service ntpd start | ||
+ | </ | ||
+ | |||
+ | ==== Disable Beep ==== | ||
+ | |||
+ | < | ||
+ | # sysctl hw.syscons.bell=0 | ||
+ | </ | ||
+ | |||
+ | or if you use XFCE | ||
+ | |||
+ | < | ||
+ | set bell-style none | ||
+ | </ | ||
+ | |||
+ | ==== Change standard shell to fish ==== | ||
+ | |||
+ | You must add line in /etc/shells for example fish shell | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Change shell and path your favorite shell | ||
+ | |||
+ | < | ||
+ | chsh -s / | ||
+ | </ | ||
+ | |||
+ | === Paths for shell === | ||
+ | |||
+ | If you need PATH for example compiler or some options | ||
+ | |||
+ | < | ||
+ | # ASAN settings | ||
+ | set -x ASAN_SYMBOLIZER_PATH / | ||
+ | set -x ASAN_OPTIONS verbosity=1 | ||
+ | set -x ASAN_OPTIONS symbolize=1 | ||
+ | set -x ASAN_OPTIONS detect_stack_use_after_scope=1 | ||
+ | |||
+ | # UBSAN settings | ||
+ | set -x UBSAN_SYMBOLIZER_PATH / | ||
+ | set -x UBSAN_OPTIONS verbosity=2 | ||
+ | |||
+ | # MSAN | ||
+ | set -x MSAN_SYMBOLIZER_PATH / | ||
+ | set -x MSAN_OPTIONS fsanitize-memory-track-origins=2 | ||
+ | set -x MSAN_OPTIONS verbosity=2 | ||
+ | set -x MSAN_OPTIONS symbolize=1 | ||
+ | </ | ||
+ | |||
+ | ==== Nano tuning ==== | ||
+ | |||
+ | < | ||
+ | set constantshow | ||
+ | set smooth | ||
+ | set autoindent | ||
+ | set casesensitive | ||
+ | set historylog | ||
+ | set morespace | ||
+ | |||
+ | syntax " | ||
+ | color blue " | ||
+ | |||
+ | ## nanorc files | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | </ | ||
+ | |||
+ | ==== QT Creator - Debugging ==== | ||
+ | |||
+ | I cannot debug C/C++ programs because message "No symbol table is loaded. Use the \" | ||
+ | |||
+ | Best solution is install // | ||
+ | |||
+ | ====== Touchpad ====== | ||
+ | |||
+ | ===== Touchpad reference ===== | ||
+ | [[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ====== Mount ====== | ||
+ | |||
+ | ==== Mount msdosfs ==== | ||
+ | |||
+ | < | ||
+ | # ls /dev/da* | ||
+ | # mount_msdosfs /dev/da0 /media/usb | ||
+ | </ | ||
+ | |||
+ | ==== ReMount /etc/fstab ==== | ||
+ | |||
+ | < | ||
+ | mount -av | ||
+ | </ | ||
+ | ==== Mount ext2/ | ||
+ | |||
+ | Fuse-ext2 mounts an ext2/ | ||
+ | |||
+ | For control kernels fuse modules is command: | ||
+ | |||
+ | < | ||
+ | kldstat | ||
+ | </ | ||
+ | |||
+ | If you don't have fuse.ko module in the kernel you use this command | ||
+ | |||
+ | < | ||
+ | kldload fuse | ||
+ | </ | ||
+ | |||
+ | Then mount your partition | ||
+ | |||
+ | < | ||
+ | fuse-ext2 | ||
+ | </ | ||
+ | |||
+ | ==== Mount NTFS ==== | ||
+ | |||
+ | For mounting ntfs file system you must kernel module loaded. | ||
+ | |||
+ | For control kernels fuse modules is command: | ||
+ | |||
+ | < | ||
+ | kldstat | ||
+ | </ | ||
+ | |||
+ | and load FUSE kernel module: | ||
+ | |||
+ | < | ||
+ | kldload fuse | ||
+ | </ | ||
+ | |||
+ | and then you can mount ntfs filesystem. | ||
+ | |||
+ | < | ||
+ | # ls /dev/da* | ||
+ | # ntfs-3g | ||
+ | </ | ||
+ | |||
+ | ==== Automounting Removable Media ==== | ||
+ | |||
+ | Uncomment in config file in / | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Add lines to / | ||
+ | |||
+ | < | ||
+ | notify 100 { | ||
+ | match " | ||
+ | match " | ||
+ | action "/ | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | Reload service | ||
+ | |||
+ | < | ||
+ | service automount reload | ||
+ | service devd restart | ||
+ | </ | ||
+ | |||
+ | and added configuration / | ||
+ | |||
+ | < | ||
+ | autofs_enable=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Introduction ZFS ====== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ===== Mount ZFS ===== | ||
+ | |||
+ | < | ||
+ | zpool import | ||
+ | </ | ||
+ | |||
+ | For control command mount. | ||
+ | |||
+ | ===== Mount ZFS from Live CD ===== | ||
+ | |||
+ | < | ||
+ | zpool import -fR /media zroot | ||
+ | </ | ||
+ | |||
+ | ===== Tuning zfs on i386 ===== | ||
+ | If you will have i386 OS you must set wm.kmem_size=" | ||
+ | |||
+ | This is little tunables | ||
+ | more information on http:// | ||
+ | < | ||
+ | vfs.zfs.prefetch_disable=0 | ||
+ | vm.kmem_size=" | ||
+ | vm.kmem_size_max=" | ||
+ | vfs.zfs.arc_max=" | ||
+ | vfs.zfs.vdev.cache.size=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Resize partition ===== | ||
+ | |||
+ | We added space for virtual disk (VirtualBox, | ||
+ | but we have disk CORRUPT | ||
+ | < | ||
+ | lol@ ~/> gpart show ada0 | ||
+ | => 40 41942960 | ||
+ | 40 1024 | ||
+ | 1064 | ||
+ | 2048 | ||
+ | | ||
+ | 41940992 | ||
+ | </ | ||
+ | |||
+ | Fix is easy : | ||
+ | < | ||
+ | gpart recover ada0 | ||
+ | </ | ||
+ | |||
+ | Now we need resize partion 3. | ||
+ | < | ||
+ | lol@ ~/> gpart show | ||
+ | => 40 81919920 | ||
+ | 40 1024 | ||
+ | 1064 | ||
+ | 2048 | ||
+ | | ||
+ | 41940992 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | lol@ ~/> zpool list | ||
+ | NAME SIZE ALLOC | ||
+ | zroot 17.9G 17.3G | ||
+ | </ | ||
+ | |||
+ | For device is Busy , we have set this value: | ||
+ | < | ||
+ | lol@ ~/> sysctl kern.geom.debugflags=16 | ||
+ | kern.geom.debugflags: | ||
+ | </ | ||
+ | |||
+ | Now resize partition number 3 | ||
+ | < | ||
+ | lol@ ~/> gpart show | ||
+ | => 40 81919920 | ||
+ | 40 1024 | ||
+ | 1064 | ||
+ | 2048 | ||
+ | | ||
+ | 41940992 | ||
+ | |||
+ | lol@ ~/> sudo gpart resize -i 3 ada0 | ||
+ | |||
+ | ada0p3 resized | ||
+ | |||
+ | lol@ ~/> gpart show | ||
+ | => 40 81919920 | ||
+ | 40 1024 | ||
+ | 1064 | ||
+ | 2048 | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Last step with zfs pool: | ||
+ | < | ||
+ | lol@ ~/> sudo zpool set autoexpand=on zroot | ||
+ | lol@ ~/> sudo zpool online -e zroot ada0p3 ada0p3 | ||
+ | </ | ||
+ | |||
+ | Control space in zpool.Size of zroot is right. | ||
+ | < | ||
+ | lol@ ~/> zpool list | ||
+ | NAME SIZE ALLOC | ||
+ | zroot 37G 17.3G 19.7G | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | lol@ ~/ | ||
+ | kern.geom.debugflags: | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====== Virtualbox ====== | ||
+ | ===== Virtuabox in FreeBSD ===== | ||
+ | |||
+ | Added line with kernel module to / | ||
+ | |||
+ | < | ||
+ | vboxdrv_load=" | ||
+ | </ | ||
+ | |||
+ | Added line for bridged or host-only networking to / | ||
+ | < | ||
+ | vboxnet_enable=" | ||
+ | </ | ||
+ | |||
+ | Added to group | ||
+ | < | ||
+ | pw groupmod vboxusers -m yourusername | ||
+ | chown root: | ||
+ | chmod 0660 / | ||
+ | </ | ||
+ | |||
+ | Permanent permisions added lines to / | ||
+ | < | ||
+ | own | ||
+ | perm vboxnetctl 0660 | ||
+ | </ | ||
+ | |||
+ | ===== FreeBSD as guest Virtualbox ===== | ||
+ | |||
+ | Write to / | ||
+ | |||
+ | < | ||
+ | vboxguest_enable=" | ||
+ | vboxservice_enable=" | ||
+ | </ | ||
+ | |||
+ | ====== | ||
+ | |||
+ | ===== How to setup WIFI card ===== | ||
+ | < | ||
+ | pciconf -l - look for if see wifi hardware | ||
+ | sudo ifconfig wlan0 create wlandev wpi0 | ||
+ | sudo wpa_supplicant -i wlan0 -c / | ||
+ | </ | ||
+ | |||
+ | ===== How to setup USB WIFI ===== | ||
+ | |||
+ | Add kernel module to / | ||
+ | < | ||
+ | |||
+ | # Kernel module for wifi | ||
+ | if_ath_load=" | ||
+ | if_iw_load=" | ||
+ | |||
+ | # Next wifi kernel modules | ||
+ | wlan_wep_load=" | ||
+ | wlan_ccmp_load=" | ||
+ | wlan_tkip_load=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | Add to configure / | ||
+ | Configure you wifi device. | ||
+ | < | ||
+ | wlans_run0=" | ||
+ | create_args_wlan0=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | Look to your hardware if you have drivers. | ||
+ | < | ||
+ | |||
+ | # Look for if see wifi hardware (wpi, run0) | ||
+ | pciconf -l | ||
+ | |||
+ | # Create a device with name wlan0 | ||
+ | sudo ifconfig wlan0 create wlandev wpi0 | ||
+ | |||
+ | # Create wpa_supplicant configure file with ssid network | ||
+ | sudo wpa_supplicant -i wlan0 -c / | ||
+ | |||
+ | # Scan your wifi networks | ||
+ | ifconfig wlan0 up scan | ||
+ | SSID/MESH ID BSSID CHAN RATE | ||
+ | lol 00: | ||
+ | trololo | ||
+ | |||
+ | # IP address from DHCP server | ||
+ | sudo dhclient wlan0 | ||
+ | </ | ||
+ | |||
+ | ====== GELI ====== | ||
+ | < | ||
+ | Install CD -> Partition -> Shell | ||
+ | |||
+ | gpart create -s gpt vtbd0 | ||
+ | gpart add -t freebsd-boot -s 512k -a 4k vtbd0 | ||
+ | gpart add -t freebsd-ufs -a 1M vtbd0 | ||
+ | gpart bootcode -b /boot/pmbr -p / | ||
+ | |||
+ | geli init -b -g vtbd0p2 | ||
+ | geli attach vtbd0p2 | ||
+ | |||
+ | newfs -j / | ||
+ | mount / | ||
+ | |||
+ | - / | ||
+ | / | ||
+ | |||
+ | - / | ||
+ | geom_eli_load=" | ||
+ | |||
+ | exit (installer will continue) | ||
+ | |||
+ | Change | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== FreeBSD Security ====== | ||
+ | ===== Security on FreeBSD ===== | ||
+ | |||
+ | To check the status of the securelevel on a running system: Add to / | ||
+ | |||
+ | < | ||
+ | kern.securelevel=2 | ||
+ | security.bsd.see_other_uids=0 | ||
+ | security.bsd.stack_guard_page=1 | ||
+ | net.inet.ip.random_id=1 | ||
+ | </ | ||
+ | |||
+ | more : [[https:// | ||
+ | |||
+ | ===== Enabling and Utilizing Process Accounting ===== | ||
+ | |||
+ | Tracking information such as CPU statistics and executed commands. | ||
+ | |||
+ | < | ||
+ | touch / | ||
+ | chmod 600 / | ||
+ | accton / | ||
+ | echo ' | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Troubleshooting with FreeBSD ====== | ||
+ | |||
+ | ===== SSH ===== | ||
+ | ==== Too many authentication failures ==== | ||
+ | If You are not able to authenticate via ssh and message "Too many authentication failures" | ||
+ | |||
+ | ===== BOOT on FreeBSD ===== | ||
+ | ==== Fatal double fault FreeBSD 10.3 - i386 , FreeBSD 11 - i386 ==== | ||
+ | |||
+ | The fatal double fault is a problem on FreeBSD - i386 with ZFS file system. | ||
+ | |||
+ | As described in / | ||
+ | This, however, is not an ideal solution for inclusion in the GENERIC kernel configuration, | ||
+ | implicitly decreases available usermode threads in an environment that is already resource-starved. | ||
+ | |||
+ | You must do this steps for new kernel: | ||
+ | < | ||
+ | # mkdir -p /usr/src | ||
+ | # svnlite co svn:// | ||
+ | # make -C /usr/src kernel-toolchain | ||
+ | # printf " | ||
+ | # make -C /usr/src buildkernel KERNCONF=ZFS | ||
+ | # make -C /usr/src installkernel KERNCONF=ZFS | ||
+ | </ | ||
+ | |||
+ | |||
+ | For FreeBSD 10.3 - More information on page https:// | ||
+ | For FreeBSD 11.0 - More information on page https:// | ||
+ | |||
+ | ==== How to boot from live CD ==== | ||
+ | |||
+ | If is a problem with boot on FreeBSD and cannot run the system. | ||
+ | Back to FreeBSD menu and choose option 3. ( Escape to loader prompt ) | ||
+ | For help in command line is command help or ? (list of commands ) | ||
+ | help set are options for the command set | ||
+ | |||
+ | For boot from CD is commnad | ||
+ | < | ||
+ | set boot_cdrom (for mount filesystem) | ||
+ | boot | ||
+ | </ | ||
+ | |||
+ | Look for a mounted filesystem with command mount.If you haven' | ||
+ | < | ||
+ | zpool import -f zroot | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== How to mount disk with geli from live CD ==== | ||
+ | |||
+ | Boot live system ... | ||
+ | |||
+ | < | ||
+ | geli attach /dev/ada0p3 | ||
+ | password: | ||
+ | </ | ||
+ | |||
+ | The command mount only part of filesystem. | ||
+ | For example /usr; /tmp; /var; but not /boot | ||
+ | < | ||
+ | zpool import -f /mnt zroot | ||
+ | </ | ||
+ | |||
+ | The command mount /boot etc.. | ||
+ | < | ||
+ | zfs mount zroot/ | ||
+ | </ |