DON’T set aggressive timeout value

I have a 12 TB USB drive connected to the Raspberry Pi 4 running Raspbian. The drive is formatted as btrfs.

The original line for this drive on fstab is

UUID=”8afd87a4-f10e-11ea-9666-bfec6b15c3e4″ /mnt/btrfsdrive btrfs defaults 0 0

The major issue is when USB drive is offline, RPi4 would not boot. A simple google search directs me to the well-known ArchLinux wikipage. This page implies that nofail,x-systemd.device-timeout=1ms works like a charm. I tried it and find it s**ks. When the USB drive is connected, only some directories are seen after booting, and this partition is NOT even shown in /proc/mounts

The root cause is obvious after comparing the booting log in /var/log/messages. timeout=1ms is not acceptable at all. In fact, the default timeout value is 90 seconds.

Not sure whether this issue happens only on RPi 4, or Raspbian, or Linux. Anyway, suggesting user to set such a small timeout value is misleading.

I am not able to correct the mistake on that wiki because the captcha during registration is What is the output of “pacman -V|base32|head -1” and I won’t install ArchLinux to get the answer…

Log of fstab options=default

Sep 7 20:51:33 myhost kernel: [ 23.019520] Btrfs loaded, crc32c=crc32c-generic
Sep 7 20:51:33 myhost kernel: [ 23.021470] BTRFS: device label myelements devid 1 transid 74693 /dev/sda
Sep 7 20:51:33 myhost kernel: [ 23.298985] BTRFS info (device sda): disk space caching is enabled
Sep 7 20:51:33 myhost kernel: [ 23.299003] BTRFS info (device sda): has skinny extents
Sep 7 20:51:33 myhost kernel: [ 27.445768] random: crng init done
Sep 7 20:51:33 myhost kernel: [ 27.445793] random: 7 urandom warning(s) missed due to ratelimiting
Sep 7 20:51:33 myhost rsyslogd: [origin software=”rsyslogd” swVersion=”8.1901.0″ x-pid=”385″ x-info=”https://www.rsyslog.com”] start
Sep 7 20:51:33 myhost kernel: [ 39.738751] uart-pl011 fe201000.serial: no DMA platform data
Sep 7 20:51:33 myhost kernel: [ 39.763978] 8021q: 802.1Q VLAN Support v1.8
Sep 7 20:51:33 myhost udisksd[401]: udisks daemon version 2.8.1 starting


Log of fstab options=nofail,x-systemd.device-timeout=1ms

Sep 7 20:44:44 myhost kernel: [ 22.972058] Btrfs loaded, crc32c=crc32c-generic
Sep 7 20:44:44 myhost kernel: [ 22.974082] BTRFS: device label myelements devid 1 transid 74693 /dev/sda
Sep 7 20:44:45 myhost kernel: [ 23.440453] broken atomic modeset userspace detected, disabling atomic
Sep 7 20:44:45 myhost kernel: [ 24.015551] broken atomic modeset userspace detected, disabling atomic
Sep 7 20:44:46 myhost lightdm[1325]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
Sep 7 20:44:46 myhost kernel: [ 24.976452] broken atomic modeset userspace detected, disabling atomic
Sep 7 20:44:47 myhost kernel: [ 25.577489] broken atomic modeset userspace detected, disabling atomic
Sep 7 20:44:47 myhost lightdm[1335]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
Sep 7 20:44:48 myhost kernel: [ 26.430257] broken atomic modeset userspace detected, disabling atomic
Sep 7 20:44:48 myhost kernel: [ 27.014250] broken atomic modeset userspace detected, disabling atomic
Sep 7 20:50:53 myhost udisksd[358]: udisks daemon version 2.8.1 exiting


Tips of tmux, rpath, cgdb

  • To make the indicating arrow shown as straight line, not dashed line: manually set TERM to xterm-256color
  • tmux will set TERM to screen-256color, which may fix the size of nested tmux. Solution: manually set TERM to xterm before launching a new tmux in a new machine.
  • Use rpath to include common lib path in ELF, to make it run under CentOS5/6/7…

“吃瓜群众”


不知道瓜是瓜子还是西瓜,反正这个词就这么流行开来了。

前些年还流行过围观改变中国。中国当然被改变了,变得不许围观。于是诞生了吃瓜群众。本质上与鲁迅笔下的看客是一样的,多了些粉饰太平的意味。

吃瓜,听起来很惬意。一般用于描述自身,不是说别人在干什么,而是说自己在干什么。不是说自己在做什么,仅仅是吃瓜,吃的时候并没有看/听/想些什么。绝对安全。

糟糕的是,以后当一个吃瓜群众也不被允许了,毕竟吃瓜是中性的、消极的,不够正能量。

比特币失败的去中心化尝试及其他

经过多年发展,到目前为止(2017年),比特币在以下领域取得了成功:洗钱,反追踪,投机工具。但最重要的初始目标,去中心化尝试,已经彻底失败了。

比特币去中心化的假设是,所有人的计算设备都会拥有类似的算力。但从最初的PC挂机挖矿,到显卡挖矿,再到ASIC矿机,算力越来越被垄断。

比特币的发展历程,与www的发展很类似。www发展之初,每个人都可以建立一个网站,那时上网的人多,内容是稀缺资源。随着www的发展,内容越来越多,稀缺的是关注程度。如今的互联网信息传播方式比以往任何时候都更为中心化。个人主页、论坛、博客、微博、微信、知乎,每一代工具都产生了新的更大的中心。

太公

今天在家谱上看到了爸爸的爷爷,也就是我的太爷爷的信息。名宇崑,字森桂。

当年村里威望最高的人。善卜卦,取名。是村里第一个自愿火葬的人。90多岁时自然死亡。

Set pane title in tmux 2.3

Tmux 2.3 adds a useful option called ‘pane-border-status‘. However I could not find out how to set pane title.  My walk around is as below

cat ~/mylocal/bin/setpane
#!/usr/bin/env csh
printf ‘\033]2;%s\033\\’ $1
tmux set-option -g pane-border-format ‘#{pane_index} “#{pane_title}”‘

This script cannot be called within Tcl. Hope tmux will add a ‘rename-pane’ command in the future.

垣曲时期的贾跃亭

贾跃亭在学校时与一个女同学谈恋爱。女生父亲是时任垣曲县委副书记。贾毕业后被岳父安排进了垣曲国税局。

不久后在时任岳父的帮助下开起了卓越学校,提倡快乐教育,生源主要是当地富裕家庭子女,老师来源是师范学校刚毕业的年轻人。开办之初老师和同学们每天快快乐乐地做游戏搞各种活动,完全不考虑应试。学校很快出现了危机,于是贾许以高薪,从公立学校挖到了一些好老师。学校情况仍然每况愈下,没有生源。贾把老师们拉到县城的广场上,向全县人民逐个介绍和展示。据称,当时的效果与文革时的公审大会差不多,老师们感受到了极大的羞辱。学校情况仍然每况愈下。贾跃亭转向公立学校收购成绩优秀的初三学生。卓越学校学风很差,转来的学生当年重点高中升学率为零。

贾在时任岳父的帮助下,又在县城最好的地段开了家山寨KFC。由于价格昂贵,没有回头客,很快倒闭。

贾跃亭与第一任妻子离婚时,县里的很多人都说结婚时就看出他们会离婚。他们的婚礼是前岳父一手操办的。当地最穷的人家,结婚时也会拿出些鸡蛋、米、面。贾家没有穷到那种程度,仍然什么都没有出。

乐视的CEO贾跃亭成名了,但垣曲人并不知道贾跃亭。 但提到卓越学校,他们马上反应过来,“知道,那个开卓越学校的姓贾的骗子。”

黑车司机的自述

我九十年代就来这儿啦。没办法,家里穷。我是孤儿,没爹没妈的,就靠我一个叔叔养着。那时也不学习,整天都在村里瞎玩,还要干活,学不进去。后来到了三十岁,勉强娶到了个老婆,就出来打工了。

那时我有个老乡在工地上,介绍我过来开拖拉机。白天为单位开,晚上就帮造房子的人家拉建筑材料。拉一车三块钱,挣得比我白天都工作还多。晚上就住在单位旁搭的小棚棚里,一个人。那时真是苦啊。就靠开拖拉机攒了钱,所以我九几年就在这里买房了。现在全家都在这边了,一年也不一定回去一次。我买房是全款,不要贷款的。后来儿子结婚了又给他买了个。

你多大了?30岁才结婚?哎哟这个太晚了。我孙子都快上初中了。我儿子和你差不多大,初中毕业就出来上班了。现在开铲车,一个月五六千块钱。就是比较辛苦,一天要12小时。做二休一。以后我孙子上完大学就要叫他结婚。书不能多读的,再读多了就完蛋了,就不急着结婚了。

我比你们有钱,我不缺钱。我就是找个事情做。待会儿还要去接孙子。孙子平时在我家吃饭,吃完饭再回家。 放假也都在我家。儿子媳妇不管事的,他们自己要玩。有什么办法呢,毕竟是自己孙子。