Clean up disk space for Void Linux

With continuous upgrade, the disk space become less on Void Linux:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        470M     0  470M   0% /dev
tmpfs           495M     0  495M   0% /dev/shm
tmpfs           495M  464K  494M   1% /run
/dev/sda1       7.9G  6.0G  1.5G  81% /
cgroup          495M     0  495M   0% /sys/fs/cgroup
tmpfs           495M  125M  370M  26% /tmp

Only 1.5G left. After referring this document, I do following cleaning-up:

// Cleaning package cache
# xbps-remove -yO

// Removing orphaned packages
# xbps-remove -yo

// Purging old kernels...
# vkpurge rm all

Now the free space is doubled:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        470M     0  470M   0% /dev
tmpfs           495M     0  495M   0% /dev/shm
tmpfs           495M  460K  494M   1% /run
/dev/sda1       7.9G  4.3G  3.2G  58% /
cgroup          495M     0  495M   0% /sys/fs/cgroup
tmpfs           495M     0  495M   0% /tmp

 

Allow root to login Dragonfly BSD through SSH

To allow root to login Dragonfly BSD through SSH, you need to modify two parts in /etc/ssh/sshd_config:

......
PermitRootLogin yes
......
PasswordAuthentication yes
......

Otherwise you will bump into following error:

$ ssh root@192.168.35.195
The authenticity of host '192.168.35.195 (192.168.35.195)' can't be established.
......
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.35.195' (ECDSA) to the list of known hosts.
root@192.168.35.195: Permission denied (publickey,keyboard-interactive).

 

Fix “identifier “__builtin_is_constant_evaluated” is undefined” error on Arch Linux

The Arch Linux has shipped gcc 9, but the newest CUDA V10.1.168 still only supports gcc 8. So I met following error after upgrading Arch Linux:

......
/usr/include/c++/9.1.0/bits/stl_function.h(437): error: identifier "__builtin_is_constant_evaluated" is undefined
......

Unfortunately, gcc-8 package is not ready now. So I fell back to gcc-7:

SET(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -ccbin=gcc-7"}

Although the CUDA release note claims it already supports clang 8, I indeed bumped into some compile errors when using clang 8. So using gcc-7 is a feasible work-around for me.

First taste of DragonFly BSD

Last week, I needed to pick a BSD Operating System which supports NUMA to do some testing, so I decided to give Dragonfly BSD a shot. Dragonfly BSDonly can run on X86_64 architecture, which reminds me of Arch Linux, and after some tweaking, I feel Dragonfly BSD may be a “developer-friendly” Operating System, at least for me.

I mainly use Dragonfly BSD as a server, so I don’t care whether GUI is fancy or not. But I have high requirements of developer tools, i.e., compiler and debugger. The default compiler of Dragonfly BSD is gcc 8.3, and I can also install clang 8.0.0 from package. This means I can test state-of-the-art features of compilers, and it is really important for me. gdb‘s version is 7.6.1, a little lag behind, but still OK.

Furthermore, the upgradation of Dragonfly BSD is pretty simple and straightforward. I followed document to upgrade my Operating System to 5.6.0 this morning, just copied and pasted, no single error, booted successfully.

Last but not least, there are many out-of-box packages which I can explore in the future.

It sounds interesting, right? Why not try it yourself?