Skip to content

Instantly share code, notes, and snippets.


  • New York, NY
Block or report user

Report or block satmandu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
satmandu / k5.6.3.patch
Last active Feb 27, 2020
Patch for zfs-dkms_0.8.3-1ubuntu5 to fix compatibility with kernel 5.6rc3 as per zfs PR #9961 & PR #1064
View k5.6.3.patch
diff -Npaur a/config/kernel-inode-times.m4 b/config/kernel-inode-times.m4
--- a/config/kernel-inode-times.m4 2020-01-22 16:49:01.000000000 -0500
+++ b/config/kernel-inode-times.m4 2020-02-27 12:40:52.273139053 -0500
@@ -1,8 +1,22 @@
-dnl #
-dnl # 4.18 API change
-dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64.
-dnl #
satmandu /
Last active Feb 21, 2020
Generate an arm64 rpi userland for use on ubuntu/arm64.
rm -rf "${workdir}"/rpiuserland.compile.log
sudo apt install -y git patchelf checkinstall
cd "${workdir}"""/rpi-userland || exit
git rev-parse --is-inside-work-tree 2>/dev/null
if [ "$is_git_repo" ]; then
(cd rpi-userland && git clean -d -x -f)
satmandu /
Last active Feb 21, 2020
Sets volumes for all Google home device on the local network programmatically.
# Sets volumes for all Google home device on the local network programmatically.
# Adapted from script at
# from this discussion by reddit user Mjjjjjjjjjjjjjjjj
from __future__ import print_function
import time
import sys
echo "* Disabling any non-vmlinuz kernel lines"
echo " in /boot/firmware/config.txt ."
sed -i -E '/(^kernel=vmlinuz)/!s/^kernel=/#kernel=/g' /boot/firmware/config.txt
echo "* Adding line to use the rpi bootloader to load the kernel"
echo " in /boot/firmware/config.txt ."
if ! grep -qs '^kernel=vmlinuz' /boot/firmware/config.txt
then echo "kernel=vmlinuz" >> /boot/firmware/config.txt
echo "* Adding line to use the rpi bootloader to load the initrd"
satmandu /
Created Jan 9, 2020
set overlay on so that everything mounts at boot
for f in `sudo zfs list -H| awk '{print $1}'`; do sudo zfs set overlay=on "$f" ; done
satmandu /
Last active Nov 20, 2019
Alternative non-bpool/rpool zpool mount service for ubuntu 19.10
#!/bin/bash -e
#export PS4='+(${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
# Place in /usr/local/sbin/
USAGE="Usage: $0 zpool1 zpool2 zpool3 ... zpoolN"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 0
#!/bin/bash -ex
# Hack to add user USERDATA zpool to an Ubuntu 19.10 system.
# I have this at /usr/local/bin/
[[ -n "$user" ]] || (echo "User not specified." && exit 1)
zfs_user_suffix=$(mount | grep rpool/USERDATA/root_ | awk '{print $1}' | sed 's/rpool\/USERDATA\/root_//')
[[ -n "$zfs_user_suffix" ]] || (echo "Can't get Ubuntu ZFS user suffix." && exit 1)
zfs_system_suffix=$(mount | grep rpool/ROOT/ubuntu_ | awk '{print $1}' | head -1 | sed 's/rpool\/ROOT\/ubuntu_//')
[[ -n "$zfs_system_suffix" ]] || (echo "Can't get Ubuntu ZFS system suffix." && exit 1)
satmandu / build-arm64-eoan-rpi4
Last active Jul 25, 2019
Building eoan image for Raspberry Pi 4B
View build-arm64-eoan-rpi4
-v /dev:/dev --privileged
xzcat eoan-preinstalled-server-arm64+raspi3.img.xz > eoan-preinstalled-server-arm64+raspi4.img
kpartx -av eoan-preinstalled-server-arm64+raspi4.img
mount /dev/mapper/loop0p2 /mnt
mount /dev/mapper/loop0p1 /mnt/boot/firmware
git clone --depth=1
satmandu /
Last active Jul 13, 2019 — forked from telenieko/
Sample files to enable wireless on Debian initramfs
# this goes into /etc/initramfs-tools/scripts/init-premount/a_enable_wireless
echo "$PREREQ"
case $1 in
# ***Note*** You need machinectl installed.
# This can be found in the systemd-container package on Ubuntu!
# Place this script in /lib/systemd/system-sleep/
# Then run: sudo chmod +x /lib/systemd/system-sleep/
# This works around the wallpaper corruption on resume from suspend with Nvidia GPUs
# reported at
# and due to this feature of the Nvidia driver:
You can’t perform that action at this time.