Fix corrupted GPT on FreeBSD

One of the disks in my FreeBSD server reported an issue: 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. To verify it, first I used gdisk command: ...

July 14, 2016 · 2 min · 235 words · kenno

FreeBSD git fatal: Unable to find remote helper for 'https'

I just found out that git is not fully functional on my FreeBSD (11) box. It was installed from port (using portmaster git). I can clone a repo using SSH key, but not with HTTPS. I’m not quite sure if it’s always been this way. Here is how to fix it: Reinstall curl # pkg remove curl # portmaster curl Reinstall git # pkg remove git # portmaster git Why did I install git from port? Well, ‘cuz there is no binary package for FreeBSD 11 arm, which runs on my Raspberry Pi B+.

July 1, 2016 · 1 min · 94 words · kenno

Installing Pip with Python 3.5 on FreeBSD

Here is a quick note serves as a self-reminder on how to get pip working or installed on FreeBSD 10.3. First, ensure that Python 3 package is installed. Python 3 is provided by python35 package. # pkg install python35 However, there is no package for pip, at least at the time of this writing, on FreeBSD. To have it installed, run the following command: # python3.5 -m ensurepip We should as well update pip to new version: ...

May 6, 2016 · 1 min · 84 words · kenno

Mouse not working in Xorg on FreeBSD

After installing Mate desktop environment on a fresh FreeBSD 10.2 box, mouse was not working. This is what I have in my /etc/rc.conf: ... moused_enable="YES" hald_enable="YES" dbus_enable="YES" Some suggests that the order of hald and dbus to be swapped around. I tried that, and it still didn’t work. A bit of more Googlings, I found out a working solution [1]. I need to install: xf86-input-mouse. Here’s how I did it: # portmaster x11/drivers/xf86-input-mouse And that was all required. If your keyboard is not working in Xorg, you might want to also install xf86-input-keyboard. ...

February 19, 2016 · 1 min · 105 words · kenno

PF firewall rule for DNS server

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’t even the best practice. Here’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. ...

July 9, 2015 · 1 min · 131 words · kenno