<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Freebsd on Kenno&#39;s Open Note</title>
    <link>https://blog.khmersite.net/tags/freebsd/</link>
    <description>Recent content in Freebsd on Kenno&#39;s Open Note</description>
    <image>
      <title>Kenno&#39;s Open Note</title>
      <url>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <lastBuildDate>Wed, 29 May 2024 22:24:45 +1000</lastBuildDate>
    <atom:link href="https://blog.khmersite.net/tags/freebsd/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to upgrade FreeBSD 13.2 to 14.0</title>
      <link>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.2-to-14.0/</link>
      <pubDate>Wed, 29 May 2024 22:24:45 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.2-to-14.0/</guid>
      <description>&lt;p&gt;I just found out that FreeBSD 13.2-RELEASE will be end-of-life support within 1 month time from now. It&amp;rsquo;s time to upgrade FreeBSD on one of nas boxes
to 14.0-RELEASE. The following is to capture the steps used to perform the upgrade. It&amp;rsquo;s similar to my old &lt;a href=&#34;https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.0-to-13.1/&#34;&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;ol start=&#34;0&#34;&gt;
&lt;li&gt;SSH into the server, and run &lt;code&gt;tmux&lt;/code&gt; or &lt;code&gt;screen&lt;/code&gt;. You really don&amp;rsquo;t want to lose SSH connection during the upgrade.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ssh kenno@nas2

$ tmux
&lt;/code&gt;&lt;/pre&gt;&lt;ol&gt;
&lt;li&gt;Check the current running version of FreeBSD:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # freebsd-version
13.2-RELEASE-p11
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Make sure the system is up-to-date with all the patches:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # freebsd-update fetch
root@nas2:~ # freebsd-update install

root@nas2:~ # pkg update
root@nas2:~ # pkg upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Upgrade FreeBSD from 13.2 to 14.0&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # freebsd-update -r 14.0-RELEASE upgrade
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 13.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic kernel/generic-dbg world/base world/lib32

The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? y

Fetching metadata signature for 14.0-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system...
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;Wait for a long while&amp;hellip; then when the update process detects changes in some important files, I&amp;rsquo;m asked to decide what to do by editing that file,
pick the desired changes, and save them. For example:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;The following changes, which occurred between FreeBSD 13.2-RELEASE and                                                                       [0/143]
FreeBSD 14.0-RELEASE have been merged into /etc/ssh/sshd_config:
--- current version
+++ new version
@@ -87,11 +87,11 @@
 #UsePAM yes

 #AllowAgentForwarding yes
 #AllowTcpForwarding yes
 #GatewayPorts no
-#X11Forwarding yes
+#X11Forwarding no
 #X11DisplayOffset 10
 #X11UseLocalhost yes
 #PermitTTY yes
 #PrintMotd yes
 #PrintLastLog yes
@@ -104,11 +104,11 @@
 #PidFile /var/run/sshd.pid
 #MaxStartups 10:30:100
 #PermitTunnel no
 #ChrootDirectory none
 #UseBlacklist no
-#VersionAddendum FreeBSD-20230719
+#VersionAddendum FreeBSD-20231004

 # no default banner path
 #Banner none

 # override default of no subsystems
Does this look reasonable (y/n)? y

The following changes, which occurred between FreeBSD 13.2-RELEASE and
FreeBSD 14.0-RELEASE have been merged into /etc/sysctl.conf:
--- current version
+++ new version
@@ -1,6 +1,5 @@
-# $FreeBSD$
 #
 #  This file is read when going to multi-user and its contents piped thru
 #  ``sysctl&amp;#39;&amp;#39; to adjust kernel values.  ``man 5 sysctl.conf&amp;#39;&amp;#39; for details.
 #

Does this look reasonable (y/n)? y
To install the downloaded upgrades, run &amp;#34;/usr/sbin/freebsd-update install&amp;#34;.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;5&#34;&gt;
&lt;li&gt;Perform the update by running the above suggested command.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # /usr/sbin/freebsd-update install
src component not installed, skipped
Creating snapshot of existing boot environment... done.
Installing updates...
Kernel updates have been installed.  Please reboot and run
&amp;#34;/usr/sbin/freebsd-update install&amp;#34; again to finish installing updates.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;6&#34;&gt;
&lt;li&gt;I guess we know what to do next&amp;hellip;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # reboot
Connection to nas2 closed by remote host.
Connection to nas2 closed.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;7&#34;&gt;
&lt;li&gt;Reconnect to the server with SSH. There is no need to run &amp;rsquo;tmux&amp;rsquo; session this time.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # /usr/sbin/freebsd-update install
src component not installed, skipped
Creating snapshot of existing boot environment... done.
Installing updates...rm: ///usr/include/c++/v1/__string: is a directory

Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 863.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning /usr/share/certs/untrusted for certificates...
Scanning /usr/share/certs/trusted for certificates...

Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run &amp;#34;/usr/sbin/freebsd-update install&amp;#34;
again to finish installing updates.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;8&#34;&gt;
&lt;li&gt;How to rebuild all installed 3rd party software? I&amp;rsquo;m guessing I need to run &lt;code&gt;pkg update &amp;amp;&amp;amp; pkg upgrade&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # pkg update
pkg: Warning: Major OS version upgrade detected.  Running &amp;#34;pkg bootstrap -f&amp;#34; recommended
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%    178 B   0.2kB/s    00:01
Fetching data.pkg: 100%    7 MiB   3.6MB/s    00:02
Processing entries: 100%
FreeBSD repository update completed. 34072 packages processed.
All repositories are up to date.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;9&#34;&gt;
&lt;li&gt;Love the suggestion about running &lt;code&gt;pkg bootstrap -f&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # pkg bootstrap -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.21.3...
package pkg is already installed, forced install
Extracting pkg-1.21.3: 100%
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;10&#34;&gt;
&lt;li&gt;This time, I should be able to continue updating the 3rd party software.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
root@nas2:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking for upgrades (44 candidates): 100%
Processing candidates (44 candidates): 100%
The following 43 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
        binutils-2.40_5,1 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        bsdinfo-0.22_2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        btop-1.3.2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        dmidecode-3.5 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
...&amp;lt;SNIP&amp;gt;...
        tmux-3.3a_2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        tree-sitter-0.22.2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        unibilium-2.1.1_1 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        zstd-1.5.6 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)

Number of packages to be reinstalled: 43

395 MiB to be downloaded.

Proceed with this action? [y/N]: y
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s it!&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 14 shared object libssl.so.111 not found</title>
      <link>https://blog.khmersite.net/p/freebsd-14-shared-object-libssl-so-111-not-found/</link>
      <pubDate>Sat, 02 Dec 2023 20:32:28 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-14-shared-object-libssl-so-111-not-found/</guid>
      <description>&lt;p&gt;FreeBSD 14.0-RELEASE just got relesed at the end of last month, and I wanted to upgrade my NAS server running FreeBSD 13.x-RELEASE to 14.0.&lt;/p&gt;
&lt;p&gt;Using the installation instruction from [1], I was able to upgrade smoothly without any issues. Here are the steps:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# freebsd-update fetch
# freebsd-update install
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# freebsd-update upgrade -r 14.0-RELEASE
# freebsd-update install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reboot:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# reboot
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After rebooting, freebsd-update(8)[2] needs to be run again to install the new userland components:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to configure IPv6 on FreeBSD via SLAAC</title>
      <link>https://blog.khmersite.net/p/how-to-configure-ipv6-on-freebsd-via-slaac/</link>
      <pubDate>Fri, 08 Sep 2023 19:05:36 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-configure-ipv6-on-freebsd-via-slaac/</guid>
      <description>&lt;p&gt;I recently got IPv6 running at home, with most devices including my iPhone happily get an IPv6 assigned. My NAS running FreeBSD13.2 currently only has an IPv4 assigned, so I&amp;rsquo;m going to configure IPv6 for it too.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m still new to IPv6. The way I have it setup on my router, running OPNsense, is to set the &amp;ldquo;Router Advertisements&amp;rdquo; to &amp;ldquo;Unmanaged&amp;rdquo; with DHCPv6 disabled. &amp;ldquo;Unmanaged&amp;rdquo; for SLAAC (A flag), and SLAAC stands for Stateless Address Autoconfiguration. In simple term, each client will pick its own IPv6 based on the route prefix advertised by the router. This is just a simplification, and you should not quote for me this.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to upgrade FreeBSD from 13.0 to 13.1</title>
      <link>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.0-to-13.1/</link>
      <pubDate>Tue, 19 Jul 2022 10:51:46 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.0-to-13.1/</guid>
      <description>&lt;p&gt;I feel upgrading FreeBSD from 13.0 to 13.1 is so &lt;em&gt;minor&lt;/em&gt; that it might not worth a blog post. The thing is, I just did this upgrade on one of my 2 nas servers a month ago, and now I forgot how to do this already.&lt;/p&gt;
&lt;p&gt;This post should be short, and I will include the reference(s) at the end if you&amp;rsquo;d like to learn more about this update process.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Start and Stop Network Service on FreeBSD</title>
      <link>https://blog.khmersite.net/p/how-to-start-stop-network-service-on-freebsd/</link>
      <pubDate>Sun, 05 Jun 2022 21:09:31 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-start-stop-network-service-on-freebsd/</guid>
      <description>&lt;p&gt;A quick note for me to remind myself how to stop/start network service on FreeBSD (13.0).&lt;/p&gt;
&lt;p&gt;To stop or start, run one of the following commands:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# service netif stop
# service netif start
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To restart, just replace &lt;code&gt;stop&lt;/code&gt; or &lt;code&gt;start&lt;/code&gt; with &lt;code&gt;restart&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# service netif restart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I also just found out that the above commands will nto restarting the routing service, as they only stop/start/restart network.&lt;/p&gt;
&lt;p&gt;To restart the routing service on FreeBSD, run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>List Block Devices on FreeBSD</title>
      <link>https://blog.khmersite.net/p/list-disk-on-freebsd/</link>
      <pubDate>Wed, 14 Jul 2021 15:00:03 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/list-disk-on-freebsd/</guid>
      <description>&lt;p&gt;Recently, I found out that the ZFS pool on a FreeBSD is running out of space. There is no option to clean up this storage, but there are spare disks. So the next logical thing to do is to add 2 extra disks to the existing (mirror) ZFS pool.&lt;/p&gt;
&lt;p&gt;This FreeBSD server is a virtual machine (VM), and after attaching 2 physical disks to this VM, I had difficulty identifying these disks. Well, I could guess it, but this is a production server, and I really don&amp;rsquo;t want to spend my whole weekend to setup this server from the backup. :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Remove ZFS Meta Data on FreeBSD</title>
      <link>https://blog.khmersite.net/p/how-to-remove-zfs-meta-data-on-freebsd/</link>
      <pubDate>Wed, 26 May 2021 23:02:42 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-zfs-meta-data-on-freebsd/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been quite a while since I last posted something here. It&amp;rsquo;s not that I haven&amp;rsquo;t come across many issues in tech, it&amp;rsquo;s just that I haven&amp;rsquo;t had enough time to write anything.&lt;/p&gt;
&lt;p&gt;So I&amp;rsquo;m going to share how to easily clear the ZFS metadata on a disk previously used in a ZFS pool. Here is an example - I have an external drive, and it is detected as &lt;code&gt;/dev/da0&lt;/code&gt; when plugged into a FreeBSD server. Though I don&amp;rsquo;t remember having used it as a member of a ZFS pool called &lt;code&gt;tank&lt;/code&gt;, the following output does show that it is the case:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vim Replace String 256 with &lt;T_CO&gt;</title>
      <link>https://blog.khmersite.net/p/vim-replace-string-256-with-t_co/</link>
      <pubDate>Sun, 09 May 2021 13:24:54 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/vim-replace-string-256-with-t_co/</guid>
      <description>&lt;p&gt;What was your first text editor when you started using Linux/Unix? Mine was &lt;a href=&#34;https://en.wikipedia.org/wiki/Pico_(text_editor)&#34;&gt;pico&lt;/a&gt;. It was very easy to get started with and quite similar to &lt;code&gt;nano&lt;/code&gt;. Then I moved to &lt;code&gt;emacs&lt;/code&gt; and sticked with it for a long while. Eventually, I&amp;rsquo;ve switched to &lt;code&gt;vim&lt;/code&gt; (or &lt;code&gt;neovim&lt;/code&gt;), and that&amp;rsquo;s what I have been using until now.&lt;/p&gt;
&lt;p&gt;Well, the thing about text editor or may be this also applies to many other things, you&amp;rsquo;re only familiar with features that you constantly use. This means I only know a small subsets of what &lt;code&gt;vim&lt;/code&gt; can do.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Looping Through Line in a File in Bash</title>
      <link>https://blog.khmersite.net/p/looping-through-line-in-file-in-bash/</link>
      <pubDate>Sat, 17 Apr 2021 18:39:37 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/looping-through-line-in-file-in-bash/</guid>
      <description>&lt;p&gt;I wanted to install &lt;code&gt;vim&lt;/code&gt; package on FreeBSD 13.0, and did so without realizing that there were over 86 additional dependency packages installed. This was done with &lt;code&gt;pkg install -y vim&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;Anyway, I wanted to clean up by removing &lt;code&gt;vim&lt;/code&gt; and those dependencies after all this is a headless server. Removing &lt;code&gt;vim&lt;/code&gt; package doesn&amp;rsquo;t remove the installed dependencies.&lt;/p&gt;
&lt;p&gt;Fortunately, I was able to copy and paste the names of dependency packages and save it to a file. My first thought was to just go through each line in that file and run &lt;code&gt;pkg delete -y PACKAGE&lt;/code&gt;. In the past I needed to do similar thing in a bash script or command to loop through the content of a file per line. Guess what? I no longer remember how to do that. Hence I&amp;rsquo;m writing this post to remind my future self in case I need to do this similar thing again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Freebsd adduser ERROR - User Disappeared During Update</title>
      <link>https://blog.khmersite.net/p/freebsd-error-adding-new-user-disappeared/</link>
      <pubDate>Sat, 07 Nov 2020 23:53:57 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-error-adding-new-user-disappeared/</guid>
      <description>&lt;p&gt;While creating a new user account on one my servers running FreeBSD 12, I encountered the following error:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@nas2:~ # adduser
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Username: devops
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Full name: Ansible Operator  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Uid (Leave empty for default): 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Login group [devops]:      
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Login group is devops. Invite devops into other groups? []: 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Login class [default]: 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Shell (sh csh tcsh nologin) [sh]: 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home directory [/home/devops]:               
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home directory permissions (Leave empty for default): 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Use password-based authentication? [yes]: no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Lock out the account after creation? [no]: no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Username   : devops
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password   : &amp;lt;disabled&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Full Name  : Ansible Operator
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Uid        : 1002
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Class      : 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Groups     : devops 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home       : /home/devops
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home Mode  : 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Shell      : /bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Locked     : no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;OK? (yes/no): yes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pw: user &amp;#39;devops&amp;#39; disappeared during update
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;adduser: ERROR: There was an error adding user (devops).
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Add another user? (yes/no): no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Goodbye!
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;According to a discussion on a FreeBSD forum, the problem could have caused by the databases being out of sync.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tmux - Open Terminal Failed Can&#39;t Find Terminfo Database</title>
      <link>https://blog.khmersite.net/p/tmux-open-terminal-failed-cant-find-terminfo-database/</link>
      <pubDate>Thu, 15 Oct 2020 00:16:36 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/tmux-open-terminal-failed-cant-find-terminfo-database/</guid>
      <description>&lt;p&gt;Apart from being an aparent Linux user, I&amp;rsquo;m also a fan of FreeBSD. A few years ago I challenged myself to perform all work related tasks on a FreeBSD machine for 6 months. It turned out that FreeBSD&amp;rsquo;s been working out quite well as a general usage work desktop.&lt;/p&gt;
&lt;p&gt;Today, I&amp;rsquo;d like to share a quick solution to a small annoying issue that may or may not affect you when you&amp;rsquo;re using FreeBSD. Basically, when I ssh from my Linux machine, which uses Alacritty terminal, to the remote FreeBSD machine at work I am not able to resume my tmux session.&lt;/p&gt;</description>
    </item>
    <item>
      <title>List Open Ports on FreeBSD</title>
      <link>https://blog.khmersite.net/p/list-open-ports-on-freebsd/</link>
      <pubDate>Wed, 08 Apr 2020 12:13:07 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/list-open-ports-on-freebsd/</guid>
      <description>&lt;p&gt;On Linux to list running services and open ports, I either use &lt;code&gt;netstat&lt;/code&gt; or &lt;code&gt;ss&lt;/code&gt; (socket stat?) most recently.&lt;/p&gt;
&lt;p&gt;Though &lt;code&gt;netstat&lt;/code&gt; is available on FreeBSD, the syntax is completely different.&lt;/p&gt;
&lt;p&gt;Today, I have the need to list the running services with the port display. On FreeBSD, we can do this using &lt;code&gt;sockstat&lt;/code&gt; command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@bsd1:~ # sockstat -4 -l
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;minio    minio      49274 10 tcp46  *:9000                *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root     sendmail   675   4  tcp4   127.0.0.1:25          *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root     sshd       672   4  tcp4   *:22                  *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ntpd     ntpd       616   21 udp4   *:123                 *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ntpd     ntpd       616   22 udp4   149.171.180.154:123   *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ntpd     ntpd       616   25 udp4   127.0.0.1:123         *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root     syslogd    523   7  udp4   *:514                 *:*
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here are some other options which can be passed to the &lt;code&gt;sockstat&lt;/code&gt; command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Ansible on Freebsd</title>
      <link>https://blog.khmersite.net/p/install-ansible-on-freebsd/</link>
      <pubDate>Thu, 21 Feb 2019 14:11:22 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/install-ansible-on-freebsd/</guid>
      <description>&lt;p&gt;This post briefly explains how to install Ansible on a FreeBSD host.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to install Ansible in a virtual environment using Python 3. (If you still use Python 2, it&amp;rsquo;s time to start migrating to Python 3 &lt;strong&gt;now&lt;/strong&gt;.)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo pkg install python36
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ mkdir ~/dev/python3-venv
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ python3 -m venv ~/dev/python3-venv/ansible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, activate the Python venv (ansible), and start installing Ansible using &lt;code&gt;pip&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ source ~/dev/python3-venv/ansible
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ pip install ansible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You may or may not need to update &lt;strong&gt;pip&lt;/strong&gt; module as I did. In my case, Python complains that I have older version of pip. To update pip, just run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to set timezone in FreeBSD 12.0</title>
      <link>https://blog.khmersite.net/p/how-to-set-timezone-in-freebsd-12-0/</link>
      <pubDate>Mon, 28 May 2018 17:11:37 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-set-timezone-in-freebsd-12-0/</guid>
      <description>&lt;p&gt;FreeBSD 12.0 install media :20180208 misses a lot of timezone file. E.g. it doesn’t have &lt;code&gt;/usr/share/zoneinfo/Australia/Sydney&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Ensure: &lt;code&gt;zoneinfo&lt;/code&gt; package is installed.&lt;/p&gt;
&lt;p&gt;Then run:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# tzsetup
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And confirm: Fri Feb 16 00:19:48 AEDT 2018&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make Github code viewer more pleasant on Firefox on FreeBSD</title>
      <link>https://blog.khmersite.net/p/make-github-code-viewer-more-pleasant-on-firefox-on-freebsd/</link>
      <pubDate>Sun, 22 Apr 2018 13:56:08 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/make-github-code-viewer-more-pleasant-on-firefox-on-freebsd/</guid>
      <description>&lt;p&gt;Ever since I have FreeBSD 12 installed on a spare laptop, I notice that this is the most frequently used portable machine at home. (Of course, I still use my main desktop, which runs Fedoda 27, for everything.) I think one of the main reasons is that I like the experiences when I started using Linux years ago – not everything works out of the box, and sometimes I’m forced to learn and understand better about an issue before it can be fixed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to change FreeBSD Firefox user agent</title>
      <link>https://blog.khmersite.net/p/how-to-change-freebsd-firefox-user-agent/</link>
      <pubDate>Tue, 13 Mar 2018 17:50:15 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-change-freebsd-firefox-user-agent/</guid>
      <description>&lt;p&gt;This laptop runs FreeBSD 12.0 current. The version of the installed Firefox is 59, which is pretty new isn’t it? Well, that’s not new or good enough to browse outlook.office365.com email. What happened is that, the Outlook web based email would just automatically switch to class Outlook web access. This problem is not unique to Outlook email, even some work related websites refuse to load correctly on Firefox running FreeBSD.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to extend ZFS partition</title>
      <link>https://blog.khmersite.net/p/how-to-extend-zfs-partition/</link>
      <pubDate>Sun, 11 Mar 2018 11:37:07 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-extend-zfs-partition/</guid>
      <description>&lt;p&gt;I have a FreeBSD server which used to run of a smaller SSD drive. When replaced with a larger capacity SSD by using &lt;code&gt;dd&lt;/code&gt; command to clone the disk, there is free space allocated. I want to extend the existing &lt;code&gt;zroot&lt;/code&gt; pool to use this space. The following describes how I achieve this with the help of a forum &lt;a href=&#34;https://forums.freebsd.org/threads/extend-zfs-partition.55964/&#34;&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s list some information about the &lt;code&gt;zroot&lt;/code&gt; pool:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@nas:~ # zfs list zroot
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;NAME    USED  AVAIL  REFER  MOUNTPOINT
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zroot  4.88G  50.8G   144K  none
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;List the partition scheme of the drive I&amp;rsquo;d like to extend my &lt;code&gt;zroot&lt;/code&gt; zpool with:&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 12 : Can&#39;t update packages size mismatch</title>
      <link>https://blog.khmersite.net/p/freebsd-12-cant-update-packages-size-mismatch/</link>
      <pubDate>Thu, 15 Feb 2018 23:10:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-12-cant-update-packages-size-mismatch/</guid>
      <description>&lt;p&gt;It’s another night with another FreeBSD problem. Well, I could just use Linux like Ubuntu or Void, but then things would just work. Where is the fun? 😉&lt;/p&gt;
&lt;p&gt;So, I’ve been having problem with upgrading or installing new binary packages on a machine running FreeBSD 12.0 for a few days now.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@vansota:~ # pkg upgrade
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating FreeBSD repository catalogue...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;FreeBSD repository is up to date.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;All repositories are up to date.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Checking for upgrades (13 candidates): 100%
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Processing candidates (13 candidates): 100%
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;The following 6 package(s) will be affected (of 0 checked):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;New packages to be INSTALLED:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	p5-Locale-gettext: 1.07
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installed packages to be REINSTALLED:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	xorg-server-1.18.4_6,1 (needed shared library changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	xf86-input-synaptics-1.9.0 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	texinfo-6.5,1 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	m4-1.4.18,1 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	help2man-1.47.5 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Number of packages to be installed: 1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Number of packages to be reinstalled: 5
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;The process will require 2 MiB more space.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;3 MiB to be downloaded.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Proceed with this action? [y/N]: y
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[1/6] Fetching xorg-server-1.18.4_6,1.txz: 100%    1 MiB 184.0kB/s    00:08    
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pkg: cached package xorg-server-1.18.4_6,1: size mismatch, fetching from remote
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[2/6] Fetching xorg-server-1.18.4_6,1.txz:  18%  272 KiB 180.2kB/s    00:08 ETA
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First I&amp;rsquo;d thought it was just some FreeBSD mirrors were out of sync of each others. This happens quite frequently with Ubuntu mirrors. Usually, we give it a bit of time and the problem will fix itself.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix: Fail running Firefox on FreeBSD without D-Bus running</title>
      <link>https://blog.khmersite.net/p/fix-fail-running-firefox-on-freebsd-without-d-bus-running/</link>
      <pubDate>Sun, 11 Feb 2018 17:15:08 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-fail-running-firefox-on-freebsd-without-d-bus-running/</guid>
      <description>&lt;p&gt;This weekend I replaced Kubuntu 16.04 with FreeBSD 12 on an old HP laptop. I came across with lots of problems, but mainly because I wanted to have some experiences with UEFI and GPT.&lt;/p&gt;
&lt;p&gt;Anyway, currently the laptop is running FreeBSD 12-current with i3 as the windows manager. After Firefox was installed, I ran it from the menu (rofi) and nothing appeared. So I ran it from a terminal instead. Here was the output:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a FreeBSD install disk with dd on OS X</title>
      <link>https://blog.khmersite.net/p/create-a-freebsd-install-disk-with-dd-on-os-x/</link>
      <pubDate>Fri, 09 Feb 2018 22:23:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/create-a-freebsd-install-disk-with-dd-on-os-x/</guid>
      <description>&lt;p&gt;I need to create a bootable FreeBSD install disk and the downloaded file happened to be on a Mac laptop. Since OS X is based on BSD, it also comes with &lt;code&gt;dd&lt;/code&gt; utility.&lt;/p&gt;
&lt;p&gt;After a USB is inserted, I need to identify the disk. This can be done using &lt;code&gt;diskutil&lt;/code&gt; command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         250.7 GB   disk0s2
/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +250.7 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            98.6 GB    disk1s1
   2:                APFS Volume Preboot                 21.4 MB    disk1s2
   3:                APFS Volume Recovery                509.8 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *2.1 GB     disk2
   1:        Apple_partition_map                         4.1 KB     disk2s1
   2:                  Apple_HFS                         2.4 MB     disk2s2
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;From the above output, the USB drive is &lt;code&gt;/dev/disk2&lt;/code&gt;. Now, I can use &lt;code&gt;dd&lt;/code&gt; to copy the image file to the USB drive using the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD Recover GTP Table</title>
      <link>https://blog.khmersite.net/p/freebsd-recover-gtp-table/</link>
      <pubDate>Sat, 03 Feb 2018 22:30:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-recover-gtp-table/</guid>
      <description>&lt;p&gt;Recently one of my servers that runs FreeBSD 11.1 keeps hanging on boot. Usually, the 2nd hard reboot will fix it. The root file system on this server is using ZFS and the ZFS pool report it as healthy.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;nas:~ # zpool status                                                                                                [136/462]
  pool: zroot                                                                                                                     
 state: ONLINE                                                                                                                    
  scan: scrub repaired 0 in 0h0m with 0 errors on Tue Jan 23 23:54:42 2018                                                        
config:                                                                                                                           
                                                                                                                                  
        NAME        STATE     READ WRITE CKSUM                                                                                    
        zroot       ONLINE       0     0     0                                                                                    
          gpt/zfs0  ONLINE       0     0     0                                                                                    
                                                                                                                                  
errors: No known data errors                                        
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So I’ve been reluctant to do anything about it. Until tonight, when I accidentally list the partition of that drive (&lt;code&gt;ada4&lt;/code&gt;):&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to unban IP from PF firewall</title>
      <link>https://blog.khmersite.net/p/how-to-unban-ip-from-pf-firewall/</link>
      <pubDate>Fri, 17 Nov 2017 13:26:49 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-unban-ip-from-pf-firewall/</guid>
      <description>&lt;p&gt;This post is probably more relevant to my use case of PF firewall running on FreeBSD 11.1, and I need to remind myself how to unblock an IP from the block list.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a snippet of what&amp;rsquo;s in &lt;code&gt;/etc/pf.conf&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table persist
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Don&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#39;&lt;/span&gt;t send rejections. Just drop.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set block-policy drop
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Exempt the loopback interface to prevent services utilizing the
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# local loop from being blocked accidentally.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set skip on lo0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# all incoming traffic on external interface is normalized and fragmented
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# packets are reassembled.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;scrub in on $ext_if all fragment reassemble
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# set a default deny policy.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in log all
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# This is a desktop so be permissive in allowing outgoing connections.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pass out quick modulate state
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Enable antispoofing on the external interface
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;antispoof for $ext_if inet
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#antispoof &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; $ext_if inet6
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# block packets that fail a reverse path check. we look up the routing
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# table, check to make sure that the outbound is the same as the source
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# it came in on. &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; not, it is probably source address spoofed.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in from urpf-failed to any
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# drop broadcast requests quietly.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in quick on $ext_if from any to 255.255.255.255
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in log quick on $ext_if inet from  to any
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the &lt;code&gt;pf.conf&lt;/code&gt;, the blocked IP table is called &lt;code&gt;sshguard&lt;/code&gt;. To list all the blocked IPs, run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing a User&amp;#8217;s Password on FreeBSD</title>
      <link>https://blog.khmersite.net/p/changing-a-users-password-on-freebsd/</link>
      <pubDate>Tue, 10 Jan 2017 23:12:57 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-a-users-password-on-freebsd/</guid>
      <description>&lt;p&gt;Before getting into how to change a user’s password on FreeBSD, let’s have a quick revision on how that can be done on a Linux system.&lt;/p&gt;
&lt;p&gt;As a user we can change the password by typing:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ passwd
Changing password for user kenno.
Changing password for kenno.
Current password: 
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or with a &lt;code&gt;root&lt;/code&gt; account, we can change/set the password for another user:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# passwd kenno
Changing password for user kenno.
New password: 
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;How about a FreeBSD? It should be the same way as how it’s done on Linux right? Right? Well, not quite.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 11 Blank Screen After Login via SLiM</title>
      <link>https://blog.khmersite.net/p/freebsd-11-blank-screen-after-login-via-slim/</link>
      <pubDate>Mon, 09 Jan 2017 16:46:23 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-11-blank-screen-after-login-via-slim/</guid>
      <description>&lt;p&gt;After rebooting my FreeBSD 11.0, I wasn’t able to login to Mate desktop manager via SLiM (Login Manager).&lt;/p&gt;
&lt;p&gt;I spent sometimes to try to fix it, but failed. I’ll try it again later when I have a bit of free time.&lt;/p&gt;
&lt;p&gt;Here’s a quick note of a work around, so I won’t forget what I’ve done.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Disable loading slim on start up by editing &lt;code&gt;/etc/rc.conf&lt;/code&gt; and commented out the following line:&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD upgrade pool zroot</title>
      <link>https://blog.khmersite.net/p/freebsd-upgrade-pool-zroot/</link>
      <pubDate>Tue, 27 Sep 2016 21:09:39 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-upgrade-pool-zroot/</guid>
      <description>&lt;p&gt;Today I successfully upgraded my FreeBSD home nas server from 10.3 to 11.0. This is the final release of version 11.0, though the official announcement is expected to be made on September 28.&lt;/p&gt;
&lt;p&gt;After the system upgrade, I need to also upgrade the 2 zpools (tank and zroot) so they can have new features. Upgrading &lt;code&gt;tank&lt;/code&gt; was easy, all I needed to do was running this command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# zpool upgrade tank
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;This system supports ZFS pool feature flags.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Enabled the following features on &amp;#39;tank&amp;#39;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  sha512
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  skein
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For &lt;code&gt;zroot&lt;/code&gt;, in addition to running the above command (by replacing the actually zpool name to &lt;code&gt;zroot&lt;/code&gt;), I also need to update the boot code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix corrupted GPT on FreeBSD</title>
      <link>https://blog.khmersite.net/p/fix-corrupted-gpt-on-freebsd/</link>
      <pubDate>Thu, 14 Jul 2016 18:40:15 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-corrupted-gpt-on-freebsd/</guid>
      <description>&lt;p&gt;One of the disks in my FreeBSD server reported an issue:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Jul 14 18:00:56 nas kernel: GEOM: da0: the primary GPT table is corrupt or invalid.
Jul 14 18:00:56 nas kernel: GEOM: da0: using the secondary instead -- recovery strongly advised.
Jul 14 18:00:56 nas kernel: GEOM: diskid/DISK-67304734999999999999: the primary GPT table is corrupt or invalid.
Jul 14 18:00:56 nas kernel: GEOM: diskid/DISK-67304734999999999999: using the secondary instead -- recovery strongly advised.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To verify it, first I used gdisk command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD git fatal: Unable to find remote helper for &#39;https&#39;</title>
      <link>https://blog.khmersite.net/p/freebsd-git-fatal-unable-to-find-remote-helper-for-https/</link>
      <pubDate>Fri, 01 Jul 2016 23:15:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-git-fatal-unable-to-find-remote-helper-for-https/</guid>
      <description>&lt;p&gt;I just found out that git is not fully functional on my FreeBSD (11) box. It was installed from port (using &lt;code&gt;portmaster git&lt;/code&gt;). I can clone a repo using SSH key, but not with HTTPS.&lt;/p&gt;
&lt;p&gt;I’m not quite sure if it’s always been this way. Here is how to fix it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reinstall &lt;code&gt;curl&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# pkg remove curl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# portmaster curl
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Reinstall &lt;code&gt;git&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# pkg remove git
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# portmaster git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Why did I install &lt;code&gt;git&lt;/code&gt; from port? Well, &amp;lsquo;cuz there is no binary package for FreeBSD 11 arm, which runs on my Raspberry Pi B+.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Pip with Python 3.5 on FreeBSD</title>
      <link>https://blog.khmersite.net/p/installing-pip-with-python-3-5-on-freebsd/</link>
      <pubDate>Fri, 06 May 2016 16:09:41 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-pip-with-python-3-5-on-freebsd/</guid>
      <description>&lt;p&gt;Here is a quick note serves as a self-reminder on how to get &lt;code&gt;pip&lt;/code&gt; working or installed on FreeBSD 10.3.&lt;/p&gt;
&lt;p&gt;First, ensure that Python 3 package is installed. Python 3 is provided by &lt;code&gt;python35&lt;/code&gt; package.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# pkg install python35
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;However, there is no package for &lt;code&gt;pip&lt;/code&gt;, at least at the time of this writing, on FreeBSD. To have it installed, run the following command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# python3.5 -m ensurepip
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We should as well update &lt;code&gt;pip&lt;/code&gt; to new version:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mouse not working in Xorg on FreeBSD</title>
      <link>https://blog.khmersite.net/p/mouse-not-working-in-xorg-on-freebsd/</link>
      <pubDate>Fri, 19 Feb 2016 09:45:06 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/mouse-not-working-in-xorg-on-freebsd/</guid>
      <description>&lt;p&gt;After installing Mate desktop environment on a fresh FreeBSD 10.2 box, mouse was not working. This is what I have in my &lt;code&gt;/etc/rc.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
moused_enable=&amp;#34;YES&amp;#34;
hald_enable=&amp;#34;YES&amp;#34;
dbus_enable=&amp;#34;YES&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Some suggests that the order of hald and dbus to be swapped around. I tried that, and it still didn&amp;rsquo;t work.&lt;/p&gt;
&lt;p&gt;A bit of more Googlings, I found out a working solution [1]. I need to install: &lt;code&gt;xf86-input-mouse&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how I did it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# portmaster x11/drivers/xf86-input-mouse
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And that was all required. If your keyboard is not working in Xorg, you might want to also install &lt;code&gt;xf86-input-keyboard&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PF firewall rule for DNS server</title>
      <link>https://blog.khmersite.net/p/pf-firewall-rule-for-dns-server/</link>
      <pubDate>Thu, 09 Jul 2015 21:06:27 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pf-firewall-rule-for-dns-server/</guid>
      <description>&lt;p&gt;A reminder to readers, most of these blog posts are to remind me what I have done or fixed some problems. What works for me may not work for you. Most of the time, they aren&amp;rsquo;t even the best practice.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a snippet of the PF firewall rule on my FreeBSD box which acts as a DNS server. Basically, the firewall opens up UDP port 53 to allow LAN access it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remove a file/directory starting with dash/hyphen</title>
      <link>https://blog.khmersite.net/p/remove-file-directory-starting-with-dash-hyphen/</link>
      <pubDate>Tue, 07 Jul 2015 21:15:12 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/remove-file-directory-starting-with-dash-hyphen/</guid>
      <description>&lt;p&gt;I just noticed that in the /root directory, there exists a directory with its name starting with a dash: -p in my FreeBSD box.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@raspbsd:~ # ls -l
total 144
drwxr-xr-x  2 root  wheel    512 May  5 18:26 -p
drwxr-xr-x  2 root  wheel    512 May  5 20:45 .byobu
drwxr-xr-x  3 root  wheel    512 May  5 20:45 .cache
-rw-r--r--  2 root  wheel    959 Jan 23 00:59 .cshrc
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As much as I wanted to get rid of it, I was curious to find out what’s inside that directory.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install PostgreSQL server on Raspberry Pi from FreeBSD port</title>
      <link>https://blog.khmersite.net/p/install-postgresql-server-on-raspberry-pi-from-freebsd-port/</link>
      <pubDate>Thu, 18 Jun 2015 20:04:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-postgresql-server-on-raspberry-pi-from-freebsd-port/</guid>
      <description>&lt;p&gt;Before I wrote this blog post, I had thought there was no binary package for PostgreSQL server for FreeBSD 11 running on Raspberry Pi. Hmm… how wrong I was! I just wasted the whole night compiling Postgres from source. DOH!&lt;/p&gt;
&lt;p&gt;Anyhow, here’s the step I took to do it. If you’re familiar with FreeBSD, there’s nothing new here. But, I only use FreeBSD once in awhile, and so I tend to forget a lot what I do.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ការបញ្ចូល git ក្នុង Raspberry Pi ដើរ​ FreeBSD 11</title>
      <link>https://blog.khmersite.net/p/installing-git-command-on-raspberrypi-freebsd11/</link>
      <pubDate>Fri, 29 May 2015 21:36:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-git-command-on-raspberrypi-freebsd11/</guid>
      <description>&lt;p&gt;ដោយ​សារ​ពុំមាន​ កញ្ចប់បាយនារី (binary package) នៃ​​ git យើង​​ត្រូវ​បញ្ចូល​ git​ពីសោះ​ខូត ដូច​ខាងក្រោម៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# cd /usr/ports/devel/git
# make install clean
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;សង្ឃឹម​ថា​ថ្ងៃ​ក្រោយ​ឆាប់ៗ កញ្ចប់​បាយនារី នឹង​បាន​បង្កើត​ឡើង​ ព្រោះខំផាយ​ពី សោះខូត​យើត​ណាស់ ជាពិសេស​ពេល​ខំផាយ​វា​លើ​ រ៉ាស់​ប៊ែរី​ផាយ។&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 10: Shared object &#39;libstdc&#43;&#43;.so.6&#39; not found</title>
      <link>https://blog.khmersite.net/p/freebsd-10-shared-object-libstdc-so-6-not-found/</link>
      <pubDate>Fri, 25 Apr 2014 11:53:53 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-10-shared-object-libstdc-so-6-not-found/</guid>
      <description>&lt;p&gt;Today while I was updating &lt;code&gt;py27-m2crypto&lt;/code&gt; package on FreeBSD 10 using &lt;code&gt;portmaster&lt;/code&gt;, the following error message was displayed:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Shared object &amp;quot;libstdc++.so.6&amp;quot; not found, required by &amp;quot;swig&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Fortunately, someone else has found the problem and solution before me. According this &lt;a href=&#34;http://www.laszlopusztai.net/2014/01/26/running-perforce-on-freebsd-10/&#34;&gt;blog post&lt;/a&gt;, FreeBSD 10 includes a &lt;a href=&#34;https://wiki.freebsd.org/NewC++Stack&#34;&gt;new C++ stack&lt;/a&gt; and gcc, including &lt;code&gt;libstdc++&lt;/code&gt;, is not installed by default.&lt;/p&gt;
&lt;p&gt;Therefore, to fix the missing this &lt;code&gt;libstdc++.so.6&lt;/code&gt; issue, we need to install &lt;code&gt;lang/gcc&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you use &lt;strong&gt;portmaster&lt;/strong&gt;, the command to install &lt;code&gt;lang/gcc&lt;/code&gt; is:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrade existing Perl 5.12 to Perl 5.18 on FreeBSD 9</title>
      <link>https://blog.khmersite.net/p/upgrade-existing-perl-5-12-to-perl-5-18-on-freebsd-9/</link>
      <pubDate>Wed, 30 Oct 2013 12:20:19 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrade-existing-perl-5-12-to-perl-5-18-on-freebsd-9/</guid>
      <description>&lt;p&gt;Recently I’ve been trying to update the perl package on my FreeBSD box to the latest version 5.18 without any success. Here’s a snippet of the error message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Creating various symlinks in /usr/bin...
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl5
Done.
Installing perl5.18-5.18.1_2...pkg-static: perl5.18-5.18.1_2 conflicts with perl-5.12.5 (installs files into the same place).  Problematic file: /usr/local/bin/a2p
*** [fake-pkg] Error code 70
Stop in /usr/ports/lang/perl5.18.
*** [install] Error code 1

Stop in /usr/ports/lang/perl5.18.

===&amp;gt;&amp;gt;&amp;gt; Installation of perl5.18-5.18.1_2 (lang/perl5.18) failed
===&amp;gt;&amp;gt;&amp;gt; Aborting update

===&amp;gt;&amp;gt;&amp;gt; Killing background jobs
Terminated

===&amp;gt;&amp;gt;&amp;gt; You can restart from the point of failure with this command line:
portmaster lang/perl5.18

===&amp;gt;&amp;gt;&amp;gt; Exiting
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So I turned to Google to see if other people experienced the same thing as me. According to an answer to a similar question about upgrading perl on &lt;a href=&#34;http://serverfault.com/questions/405605/what-is-the-easiest-way-to-upgrade-my-existing-perl-5-14-to-perl-5-16-on-freebsd&#34;&gt;serverfault.com&lt;/a&gt;, one should read&lt;/p&gt;</description>
    </item>
    <item>
      <title>Portsnap snapshot corrupt</title>
      <link>https://blog.khmersite.net/p/portsnap-snapshot-corrupt/</link>
      <pubDate>Mon, 07 Oct 2013 08:15:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/portsnap-snapshot-corrupt/</guid>
      <description>&lt;p&gt;ថ្ងៃ​នេះខ្ញុំ​​មាន​បញ្ហា​ជាមួយ​ portsnap លើ​ FreeBSD ស៊ើវើ។ ពេល​ខ្ញុំ​រត់​ខំម៉ាន​ portsnap fetch upate មាន​ពត៌មាន​ដូច​នេះ&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/usr/ports/files/.gz not found — snapshot corrupt.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;តាម​ប្លក់នេះ របៀប​ជួសជុល​វា មិន​ពិបាកទេ។&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;rm -rf /var/db/portsnap/*
portsnap fetch
portsnap extract
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Source: &lt;a href=&#34;http://neonpulse.net/2008/11/20/portsnap-corrupt-snapshot/&#34;&gt;http://neonpulse.net/2008/11/20/portsnap-corrupt-snapshot/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD configure: error: XML::Parser perl module is required for intltool</title>
      <link>https://blog.khmersite.net/p/freebsd-configure-error-xmlparser-perl-module-is-required-for-intltool/</link>
      <pubDate>Wed, 24 Jul 2013 06:13:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-configure-error-xmlparser-perl-module-is-required-for-intltool/</guid>
      <description>&lt;p&gt;If you get this error message on a FreeBSD host, you may need to reinstall &lt;code&gt;p5-XML-Parser&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# portmaster textproc/p5-XML-Parser
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>PHP Fatal error: Call to undefined function utf8_decode()</title>
      <link>https://blog.khmersite.net/p/php-fatal-error-call-to-undefined-function-utf8_decode/</link>
      <pubDate>Tue, 25 Dec 2012 03:57:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/php-fatal-error-call-to-undefined-function-utf8_decode/</guid>
      <description>&lt;p&gt;This occurs on a FreeBSD server. According to this post[1], I need to install &lt;code&gt;php5-xmlphp5-xml&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# whereis php5-xmlphp5-xml
php5-xml: /usr/ports/textproc/php5-xml
# portmaster textproc/php5-xml
...
# service apache22 restart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;[1] &lt;a href=&#34;http://hi.baidu.com/ericyangbj/item/8289a32771e4171d09750856&#34;&gt;http://hi.baidu.com/ericyangbj/item/8289a32771e4171d09750856&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD: Fatal error: Call to undefined function session_name()</title>
      <link>https://blog.khmersite.net/p/freebsd-fatal-error-call-to-undefined-function-session_name/</link>
      <pubDate>Tue, 25 Dec 2012 00:08:49 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-fatal-error-call-to-undefined-function-session_name/</guid>
      <description>&lt;p&gt;I just setup Apache and PHP on FreeBSD 9, configured a vhost, then when I tried to access it, I got the following error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Fatal error: Call to undefined function session_name() in /srv/www/sugaku.domain.com/inc/init.php on line 144&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;so apparently, the “session” support is missiong from php5 installation. To fix it, I need to install &lt;code&gt;php5-session&lt;/code&gt; port.&lt;/p&gt;
&lt;p&gt;Let’s do it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# whereis php5-session&amp;lt;br /&amp;gt; php5-session: /usr/ports/www/php5-session&amp;lt;br /&amp;gt; portmaster www/php5-session&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If the installation is successful, then we can restart apache.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD: How to check version of installed packages</title>
      <link>https://blog.khmersite.net/p/freebsd-how-to-check-version-of-installed-packages/</link>
      <pubDate>Wed, 01 Aug 2012 22:52:43 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-how-to-check-version-of-installed-packages/</guid>
      <description>&lt;p&gt;&lt;code&gt;# pkg_version -v&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Running pkg_version -v could take a while. If we only want a quick look:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# pkg_info -xI&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If we want to see if some packages are out of date:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# pkg_version -v -X -s&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And to check all out of date packages:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# pkg_version -vL &amp;quot;=&amp;quot;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing FreeBSD 9 source</title>
      <link>https://blog.khmersite.net/p/installing-freebsd-9-source/</link>
      <pubDate>Sun, 29 Jul 2012 12:01:21 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-freebsd-9-source/</guid>
      <description>&lt;p&gt;Well, I need FreebSD 9 source to compile &lt;code&gt;fusefs-kmod&lt;/code&gt;, which is required by &lt;code&gt;gvfs&lt;/code&gt;, which’s in turn required by &lt;code&gt;xfce&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A lot of people recommend to use sysinstall to add the so called userland sources.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sysinstall -&amp;gt; Configure -&amp;gt; Distribution -&amp;gt; src&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, it didn’t work!!&lt;/p&gt;
&lt;p&gt;Thanks to wblock@[1] who pointed out that “sysinstall is mostly dead” and suggested a few ways to get the sources to your system. One of them is:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Change cursor theme in Xfce on Freebsd</title>
      <link>https://blog.khmersite.net/p/change-cursor-theme-in-xfce-on-freebsd/</link>
      <pubDate>Thu, 26 Jul 2012 11:19:29 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/change-cursor-theme-in-xfce-on-freebsd/</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Install the preferred cursor theme. I personally like dmz-cursor-theme.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# pkg_add -r cursor-dmz-theme
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Then, &lt;strong&gt;Applications Menu -&amp;gt; Settings -&amp;gt; Mouse&lt;/strong&gt;. Click on Theme tab, select the preferred theme and click Close.&lt;/li&gt;
&lt;li&gt;Log out of the current Xfce session, then log back in.&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
  </channel>
</rss>
