If you want to set terminal title to keep track of the ones not in tmux/screen, remove the automatic title setting from
.bashrc, and alias or add a
title script as:
/bin/echo -ne "\033]0;$1\007"
Raspberry Pi 4 notes
Apt complains about release info change with
This must be accepted explicitly before updates for this repository can be applied. -> run
sudo apt-get --allow-releaseinfo-change update.
Sshd is not running after installing
openssh-server package -> do
raspi-update and enable SSH from there.
Owl bootstrap 60s. Nice.
Qemu/KVM CentOS guest quest
Some workarounds and fixes for getting CentOS to run as guest in Qemu/KVM.
Kernel crash at startup:
Installation hangs showing only logo:
- revert to text on installation
tab in grub, add
text as a new kernel parameter and press
CentOS hangs at startup, cannot log in:
Cannot ssh to guest / no network:
/etc/sysconfig/network-scripts/ifcfg-eth0 and replace
Cannot ssh to guest II:
- check your
.ssh/authorized_keys permission bits. CentOS seems to give group write permission by default for new files
Nested SSH tunnels
So you need to get with SSH to host C via A and B. One intermediate host is frequently taken care of by giving a separate proxycommand, but this approach leads to a horrible mess of nested quotation if you need more jumps along the route.
A good solution is to use
-J, which is massively awesome.
$ ssh -J user@A:22,user@B:22 user@C
Chrome https localhost
In case your localhost certificate isn't valid but you want Chrome to accept it anyway, enable this flag and restart Chrome.
"Username is not in the sudoers file. This incident will be reported."
In case this happens, you may have removed yourself from the corresponding group, or the some of the configuration files are otherwise broken.
You can regain root access at least as follows:
- boot the machine
e in grub boot menu
init=/bin/sh to linux boot parameters (the line starting
- press Ctrl-x to boot
- get root prompt
Then you can add yourself back to the group or otherwise fix the files.
Commands in Debian, that is.
Example: add /usr/bin/led as an alternative to vi.
$ sudo update-alternatives --install /usr/bin/vi vi /usr/bin/led 1
$ sudo update-alternatives --set vi /usr/bin/led
$ vi --help | head -n 1
Usage: led [flags] [file] ...
qemu with serial output
Problem: You want to run a virtual machine in a terminal, tmux or screen.
- Disable graphics
- Have a serial console in virtual machine
- Use the serial console from host terminal
Enabling serial console in Debian
vm$ vi /etc/default/grub
vm$ sudo update-grub
Starting qemu/kvm with serial console
$ kvm -nographic -serial mon:stdio -hda yourimage.img -smp 2 -m 1G
- kernel messages and login appear to terminal after a few seconds
arduino sensor battery stats
no advanced sleep, led blinks, sensor report every 3s, bme280 sensor @ I2C, binary protocol over 433MHz, 1200mAh 3.7V lipo, transmit 5, measure all 3
- 13:00 started, sensor reports 4.20V
- 18:10 4.12V
sleepdog sleep, radio sleep, no led, sensor report every 10s, same sensor & proto, transmit 5
- 4.7.2017: 09:30 4.20V
- 5.7.2017: 11:00 4.18V
- 6.7.2017: 21:30 4.14V
- 8.7.2017: 19:30 4.11V
- 11.7.2017: 07:00 4.07V
- 14.7.2017: 14:30 4.02V
- 15.7.2017: 20:30 4.00V
- 25.7.2017: 9:30 3.91V