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

How to convert vdi to qcow2 image

vdi file is a type of disk image used by VirtualBox. qcow2, on the other hand, is the format of disk image used by KVM. Recently, I want to move some existing virtual machines running on VirtualBox to KVM. To do that I need to convert the disk image from vdi to qcow2. Here’s one way to achieve that: Ref: How to convert VirtualBox vid to KVM qcow2

July 3, 2016 · 1 min · 68 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

grep: error while loading shared libraries: libpcre.so.0

I have a server running CentOS 6 successfully upgraded to CentOS 7. The only problem I encountered so far is that ‘grep’ doesn’t work. [root@zilla ~]# grep grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory [root@zilla ~]# ldd /usr/bin/grep linux-vdso.so.1 => (0x00007ffc0b639000) libpcre.so.0 => not found libc.so.6 => /lib64/libc.so.6 (0x00007f6be1c6c000) /lib64/ld-linux-x86-64.so.2 (0x00007f6be2038000) First thing I tried was to reinstall pcre package which provides libpcre.so*. It still didn’t work. Fortunately, someone has posted a solution as the following: ...

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

Create bootable USB Fedora 24

Every time there is a new release of Linux distro, I need to create a bootable USB. And, I forgot how I did it last time. So, I tried by using the “Startup Disk Creator” program installed on my Ubuntu workstation, only to find out that it didn’t even work. After a while I remember, it was just a matter of using dd command to copy the ISO image to the USB. ...

June 27, 2016 · 1 min · 181 words · kenno