freebsd:freebsd
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| freebsd:freebsd [2023/08/29 10:43] – created - external edit 127.0.0.1 | freebsd:freebsd [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== FreeBSD Experience ====== | ||
| - | |||
| - | This page is about my experience using [[https:// | ||
| - | |||
| - | //**Note**: Since I have decided to stick with Linux for now, I will be gearing my FreeBSD usage towards GUI-centric experience.// | ||
| - | |||
| - | // | ||
| - | |||
| - | ====== FreeBSD Installation ====== | ||
| - | |||
| - | My installation notes... | ||
| - | |||
| - | //**Note**: When using VirtualBox on a Linux host, make sure the virtual machine is **NOT** using Intel HD Audio! It creates an ' | ||
| - | |||
| - | ===== Getting FreeBSD ===== | ||
| - | |||
| - | The official way to do this is, of course, to [[https:// | ||
| - | |||
| - | ===== Standard Installation ===== | ||
| - | |||
| - | Latest: Installing FreeBSD-12.0-RELEASE-amd64 on VirtualBox | ||
| - | |||
| - | ==== Base System ==== | ||
| - | |||
| - | * fresh install using memstick image file | ||
| - | * install kernel and base only | ||
| - | * added my main user account to {// | ||
| - | * for desktop use, all users need to be in //video// or //wheel// | ||
| - | * so normal users should be in //video// group | ||
| - | * normal users should also be in // | ||
| - | * enable sshd, enable ntpdate(on-boot), | ||
| - | |||
| - | ==== Desktop (GUI) ==== | ||
| - | |||
| - | * use binary package management tool '' | ||
| - | * by default, even that is not installed... ^_^ | ||
| - | * install x server < | ||
| - | * install desktop environment < | ||
| - | * enable stuffs in ''/ | ||
| - | hald_enable=" | ||
| - | dbus_enable=" | ||
| - | gdm_enable=" | ||
| - | gnome_enable=" | ||
| - | * desktop environment requires procfs - insert into ''/ | ||
| - | proc /proc | ||
| - | * enable sound in ''/ | ||
| - | snd_driver_load=" | ||
| - | * enable switching virtual consoles during X session, edit ''/ | ||
| - | * reduce auto-boot delay, edit ''/ | ||
| - | * **VBOX** install virtualbox additions < | ||
| - | * **VBOX** enable virtualbox start script, edit ''/ | ||
| - | vboxguest_enable=" | ||
| - | vboxservice_enable=" | ||
| - | * **VBOX** disable host time synchronization, | ||
| - | vboxservice_flags=" | ||
| - | |||
| - | ==== Utility ==== | ||
| - | |||
| - | - install useful stuffs | ||
| - | * avahi & multicast dns < | ||
| - | * enable avahi daemon in ''/ | ||
| - | avahi_daemon_enable=" | ||
| - | * modify the '' | ||
| - | hosts: files dns mdns</ | ||
| - | * network manager < | ||
| - | * configure doas - create ''/ | ||
| - | permit nopass keepenv :wheel cmd netcardmgr | ||
| - | permit nopass keepenv :wheel cmd detect-nics | ||
| - | permit nopass keepenv :wheel cmd detect-wifi | ||
| - | permit nopass keepenv :wheel cmd ifconfig | ||
| - | permit nopass keepenv :wheel cmd service | ||
| - | permit nopass keepenv :wheel cmd wpa_supplicant</ | ||
| - | |||
| - | ==== Application ==== | ||
| - | |||
| - | * development < | ||
| - | * console multitasking < | ||
| - | * office & browser < | ||
| - | |||
| - | ==== User Account ==== | ||
| - | |||
| - | * by default root shell is csh and user is sh - edit .shrc to get prettier prompt< | ||
| - | PS1=" | ||
| - | * (IF using slim) to enable x environment after slim login, create '' | ||
| - | exec / | ||
| - | |||
| - | ===== Custom Installation ===== | ||
| - | |||
| - | ==== Network Configuration ==== | ||
| - | |||
| - | //**Note** DHCP client is dhclient - simply run '' | ||
| - | |||
| - | Configure (wireless) network interface (in case was not done during installation) | ||
| - | |||
| - | * FreeBSD has network interface name - based on the driver name (e.g. sis, re) | ||
| - | * to find this, use '' | ||
| - | * for normal wired connection (e.g. re0), add to '/ | ||
| - | * for a wireless connection (e.g. ath0), add in < | ||
| - | ifconfig_wlan0=" | ||
| - | * for a secured wireless connection (e.g. WPA protected), add in < | ||
| - | ifconfig_wlan0=" | ||
| - | network={ | ||
| - | ssid=" | ||
| - | psk=" | ||
| - | }</ | ||
| - | * not sure why but '' | ||
| - | * from official handbook, do '' | ||
| - | * to start up and scan, do '' | ||
| - | * or just scan, do '' | ||
| - | |||
| - | ==== Graphics ==== | ||
| - | |||
| - | Driver for ASUS E5450 Graphics Card (based on Radeon 5450?) | ||
| - | |||
| - | * install driver < | ||
| - | * to load on startup, edit ''/ | ||
| - | |||
| - | For Intel Graphics (Asus H81M-K Motherboard) | ||
| - | |||
| - | * install driver < | ||
| - | * to load on startup, edit ''/ | ||
| - | * install something? (for kernel?) < | ||
| - | * some older ones require '' | ||
| - | |||
| - | ==== Server ==== | ||
| - | |||
| - | Web Server (Apache) | ||
| - | |||
| - | * find apache package(s) < | ||
| - | * install apache package(s) < | ||
| - | * to load on startup, edit ''/ | ||
| - | * default document path is ''/ | ||
| - | |||
| - | Server Script (PHP) | ||
| - | |||
| - | * find php package(s) < | ||
| - | * install php package(s) < | ||
| - | * configure ''/ | ||
| - | < | ||
| - | DirectoryIndex index.php index.html | ||
| - | < | ||
| - | SetHandler application/ | ||
| - | </ | ||
| - | < | ||
| - | SetHandler application/ | ||
| - | </ | ||
| - | </ | ||
| - | * copy template configuration file ''//# | ||
| - | |||
| - | Database (mysql/ | ||
| - | |||
| - | * install package(s) < | ||
| - | * to load on startup, edit ''/ | ||
| - | * by default, it listens to remote request at port 3306. to check:< | ||
| - | # lsof -i4 -i6 | ||
| - | # sockstat -4 -6</ | ||
| - | * to allow local access only, edit ''/ | ||
| - | * now, to make sure all is okay:< | ||
| - | # lsof -i4 -i6 | grep mysql | ||
| - | # netstat -an | grep 3306 | ||
| - | # sockstat -4 -6 | grep 3306</ | ||
| - | |||
| - | ===== Offline Installation ===== | ||
| - | |||
| - | //**Note**: Need to test this... :-P// | ||
| - | |||
| - | * Get the desired packages on a FreeBSD machine with internet connection< | ||
| - | # mkdir / | ||
| - | # pkg fetch -d -o / | ||
| - | * '' | ||
| - | * '' | ||
| - | * Copy those files to a portable USB drive | ||
| - | * On the target machine, copy everything to / | ||
| - | * Then, do a < | ||
| - | * '' | ||
| - | |||
| - | ===== USB Thumb-Drive Installation ===== | ||
| - | |||
| - | I want to try to install to a USB thumb-drive... from my FreeBSD virtual machine (VirtualBox). I have a 16GB USB3 Kingston Data Traveller drive, and already installed FreeBSD 12 on a virtual machine. | ||
| - | |||
| - | To prepare the drive layout, checkout [[freebsd: | ||
| - | |||
| - | - plug in usb drive | ||
| - | * find device name (i.e. /dev/???) | ||
| - | * usually da0 is the first usb drive? | ||
| - | |||
| - | - refer to [[https:// | ||
| - | |||
| - | //to be continued...// | ||
| - | |||
| - | ===== Dual-Boot on UEFI Systems ===== | ||
| - | |||
| - | Find '' | ||
| - | |||
| - | ====== FreeBSD Maintenance ====== | ||
| - | |||
| - | Maintaining the system... | ||
| - | |||
| - | ===== System Upgrade/ | ||
| - | |||
| - | For example, upgrading 10.1-RELEASE to 10.2-RELEASE< | ||
| - | |||
| - | Then run < | ||
| - | |||
| - | To update within a release, do a < | ||
| - | |||
| - | **Hint** hit ' | ||
| - | |||
| - | ===== Package Upgrade/ | ||
| - | |||
| - | Install package < | ||
| - | |||
| - | Delete package < | ||
| - | |||
| - | Update catalogue < | ||
| - | |||
| - | Upgrade software < | ||
| - | |||
| - | List installed packages < | ||
| - | |||
| - | Remove all packages and start over < | ||
| - | |||
| - | Clean all package cache < | ||
| - | |||
| - | Remove orphaned package(s)? < | ||
| - | |||
| - | If pkg installation quits due to size mismatch or something, < | ||
| - | pkg clean | ||
| - | rm -rf / | ||
| - | pkg update -f</ | ||
| - | |||
| - | ===== Using ports system ===== | ||
| - | |||
| - | Will most probably need these at some point... | ||
| - | |||
| - | To get it, < | ||
| - | |||
| - | To update, < | ||
| - | |||
| - | To manage, use '' | ||
| - | |||
| - | ===== Using portmaster ===== | ||
| - | |||
| - | To build portmaster, < | ||
| - | |||
| - | To setup portmaster, < | ||
| - | # cp / | ||
| - | # ee / | ||
| - | |||
| - | To update all ports < | ||
| - | |||
| - | To search updates < | ||
| - | |||
| - | To cleanup < | ||
| - | |||
| - | To remove port < | ||
| - | |||
| - | To rebuild port < | ||
| - | |||
| - | Dumping ground - from portmaster man page... | ||
| - | < | ||
| - | Build a port locally but use packages for build dependencies, | ||
| - | the build dependencies when finished: | ||
| - | | ||
| - | |||
| - | | ||
| - | | ||
| - | |||
| - | | ||
| - | | ||
| - | |||
| - | | ||
| - | | ||
| - | 1. portmaster -aD | ||
| - | 2. portmaster --clean-distfiles | ||
| - | </ | ||
| - | |||
| - | ===== Minor Tweaks ===== | ||
| - | |||
| - | - 'git log' output does not show colorized output | ||
| - | * can see the escape sequence | ||
| - | * so, as user, type < | ||
| - | |||
| - | ====== Useful Stuffs ====== | ||
| - | |||
| - | ===== Creating Disk Layout for Bootable USB ===== | ||
| - | |||
| - | {{page> | ||
| - | |||
| - | ===== Label for Partitions/ | ||
| - | |||
| - | This is nice to have in /etc/fstab when device assignment may change (e.g. usb drive on different machine may be assigned differently) | ||
| - | |||
| - | For ufs,< | ||
| - | |||
| - | To check if assigned,< | ||
| - | |||
| - | For swap,< | ||
| - | |||
| - | To check if assigned,< | ||
| - | |||
| - | Then, /etc/fstab entry can be like,< | ||
| - | / | ||
| - | / | ||
| - | </ | ||
| - | |||
| - | ===== Disk Utility '' | ||
| - | |||
| - | Show partition | ||
| - | |||
| - | < | ||
| - | |||
| - | Resize partition | ||
| - | |||
| - | < | ||
| - | |||
| - | Not really gpart stuff, but don't forget to grow FS to fit new size | ||
| - | |||
| - | < | ||
| - | |||
| - | ===== Access to Linux ExtFS ===== | ||
| - | |||
| - | At the moment, full R/W access for Ext2, Journal-less for Ext3 and R/O for Ext4. | ||
| - | |||
| - | < | ||
| - | # kldload ext2fs | ||
| - | # mount -t ext2fs / | ||
| - | </ | ||
| - | |||
| - | ===== Install on SSD ===== | ||
| - | |||
| - | //**Note:** Generally, it seems that this is no longer an issue - some just did a normal install and have no problems at all. But, I want to put this here anyways.// | ||
| - | |||
| - | Creating partitions (from: https:// | ||
| - | |||
| - | < | ||
| - | # gpart create -s gpt ada0 | ||
| - | # gpart add -t freebsd-boot -s 1m -a 4k -l ssdboot ada0 | ||
| - | # gpart bootcode -b /boot/pmbr -p / | ||
| - | |||
| - | # gpart add -t freebsd-ufs -l ssdroot -b 1m -s 4g ada0 | ||
| - | # gpart add -t freebsd-ufs -l ssdvarfs -a 1m -s 2g ada0 | ||
| - | # gpart add -t freebsd-ufs -l ssdusrfs -a 1m ada0 | ||
| - | |||
| - | # newfs -U -t / | ||
| - | # newfs -U -t / | ||
| - | # newfs -U -t / | ||
| - | </ | ||
| - | |||
| - | create fstab (save as / | ||
| - | |||
| - | < | ||
| - | # Device Mountpoint FStype Options Dump Pass# | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | tmpfs / | ||
| - | </ | ||
| - | |||
| - | ====== FreeBSD on RasPi400 ====== | ||
| - | |||
| - | * got FreeBSD13 arm64 aarch64 image | ||
| - | * write to microsd card | ||
| - | * boot issue | ||
| - | * ok if boot from usb (note: starting pi4, usb boot is possible!) | ||
| - | * need to update u-boot binary (look for that in forum) | ||
| - | * console display is not ok when using on tv (high res?) | ||
| - | * edit config.txt and comment out hdmi_safe=1 | ||
| - | |||
| - | going for dwm | ||
| - | * pkg install libX11 libXft libXinerama | ||
| - | * pkg install git | ||
| - | |||
| - | //work in progress...// | ||
freebsd/freebsd.1693276983.txt.gz · Last modified: by 127.0.0.1
