Copy files over Telnet/SSH with base64 or uuencode

No SCP or SFTP? Ship the file as text with base64 or uuencode and rebuild it on the other end.

November 13, 2026 · 5 min

A LUKS server that hangs and never comes back: watchdog, SSH unlock with dropbear, and netconsole

Three pieces so a hang costs a minute instead of hours: the watchdog reboots, dropbear in the initramfs lets you type the LUKS passphrase over SSH, and netconsole keeps the kernel’s last messages on another box.

October 5, 2026 · 7 min

badblocks on large disks: 'Value too large for defined data type (must be 32-bit value)'

badblocks -b 4096 -sv /dev/sdX. The block counter is 32-bit and with 1 KiB blocks it stops at 4 TiB; with 4 KiB it covers 16 TiB. -w wipes the disk; for a quick check, smartctl -t long.

September 26, 2026 · 3 min

Grow a Linux VM disk online: rescan, growpart, pvresize, lvextend and xfs_growfs

echo 1 > /sys/class/block/sda/device/rescan; growpart /dev/sda 3; pvresize /dev/sda3; lvextend -r -l +100%FREE /dev/vg/lv. Without LVM: resize2fs or xfs_growfs. All online.

September 26, 2026 · 4 min

Mount a qcow2 disk on the host with qemu-nbd (read or repair files of a powered-off VM)

modprobe nbd max_part=16; qemu-nbd -c /dev/nbd0 vm.qcow2; partprobe; mount /dev/nbd0p1. When done, umount and qemu-nbd -d, or the VM will not start because of the lock. VM off, always; -r to only read.

September 26, 2026 · 4 min

rsync: resume huge transfers, copy only the directory tree, and decide what counts as 'changed'

rsync -av –partial –append-verify –inplace source/ host:/dest/ picks up where it stopped. -f’+ */’ -f’- *’ copies only folders. By default rsync compares size and date; –checksum reads everything; –ignore-times copies everything.

September 26, 2026 · 4 min

LUKS: back up and restore the header, and add, change or remove keys

No header, no data, passphrase or not: back it up off the disk and back it up again after every key change, because the old backup keeps the old keys.

September 25, 2026 · 4 min

LVM: the volume group will not activate after a power failure

First pvs/vgs/lvs -a: is a PV missing or did the thin pool fail? vgchange -ay –activationmode degraded for LVM RAID; partial only to copy data read-only; lvconvert –repair for thin pools; vgcfgrestore if the metadata is broken.

September 25, 2026 · 4 min

mdadm: add a disk and grow a RAID 5 (reshape) without losing data

–add brings the disk in as a spare; –grow –raid-devices=N starts the reshape (hours). Backup file off the array, touch nothing until /proc/mdstat finishes, then resize2fs or xfs_growfs.

September 25, 2026 · 3 min

SSH: "no matching host key type found. Their offer: ssh-rsa" (and ssh-dss)

OpenSSH 8.8 turned off RSA/SHA-1 signatures and OpenSSH 10.0 deleted DSA. ssh-rsa takes two options; ssh-dss now only works from an older client.

September 25, 2026 · 4 min