Skip to content

Instantly share code, notes, and snippets.

View ghfields's full-sized avatar

Garrett Fields ghfields

  • George Washington University
  • Washington DC
View GitHub Profile
@ghfields
ghfields / Ubuntu 19.10 zfs installer Encryption
Last active January 7, 2022 22:44
Fix Ubuntu 19.10 zfs installer /usr/share/ubiquity/zsys-setup (encryption)
1) Start in uefi mode.
At Line 216 use:
echo password | zpool create -f \
-o ashift=12 \
-O compression=lz4 \
-O acltype=posixacl \
-O xattr=sa \
-O relatime=on \
@ghfields
ghfields / TPM 1.2 - Auto Unlock - Cheat Sheet
Last active March 18, 2023 15:49
Read/Write password to TPM
# Check TPM version
# Install TPM 1.2 dependancies
apt install tpm-tools
# My tpm didn't have a one time configuration done in the factory and required me to run an additional command. I had output like:
# Tspi_TPM_TakeOwnership failed: 0x00000023 - layer=tpm, code=0023 (35), No EK
# https://sourceforge.net/p/trousers/mailman/message/19415379/ instructed me to run:
# tpm_createek
@ghfields
ghfields / zfs.htm
Last active December 19, 2018 19:08
zfs.py output 1812191404
<!DOCTYPE html>
<title>ZFS Feature Matrix</title>
<meta charset="utf-8" /><meta name="referrer" content="never" />
<style>body{font-family: "Helvetica", "Arial", sans-serif}
.yes{background-color:lightgreen}
.warn{background-color:yellow}
.no{background-color:lightsalmon}
table{border-collapse: collapse}
th,td{padding:0.2em 0.4em;border:1px solid #aaa;background-color:#f9f9f9}
@ghfields
ghfields / zfs.py
Created December 19, 2018 18:33
ZFS Features Manual Comparison
#!/usr/bin/env python3
# A messy script that figures out features.
# It's... uh... messy. Sorry.
# Feel free to steal it, modify it to suit your own needs, et cetera.
# I am not responsible if this script eats your laundry.
# License: CC0 https://creativecommons.org/share-your-work/public-domain/cc0/
# Yes, this uses manpages.
@ghfields
ghfields / Ubuntu 18.04.1 Rpool Encryption Trial.sh
Last active February 16, 2022 03:36
Change "zpool create" to more feature rich set with improved encryption algorithm
# Run as root
# sudo -i
# Prepare LiveCD Environment
add-apt-repository -y ppa:jonathonf/zfs
apt install -y zfs-dkms
systemctl stop zfs-zed.service
modprobe -r zfs
modprobe zfs
@ghfields
ghfields / gist:cd495e55f811de6651a31cbb4a7de1a2
Created June 13, 2018 14:01
ubiquity log using preseed.cfg
This file has been truncated, but you can view the full file.
Ubiquity 18.04.14
/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py:54: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gdk, GObject, GLib, Atk, Gio
(ubiquity:1414): IBUS-WARNING **: 12:11:51.408: The owner of /home/ubuntu/.config/ibus/bus is not root!
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version('NM', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import NM, NMA
/usr/lib/ubiquity/ubiquity/frontend/gtk_components/nmwidgets.py:5: PyGIWarning: NMA was imported without specifying a version first. Use gi.require_version('NMA', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import NM, NMA
/usr/lib/ubiquity/plugins/ubi-timezone.py:195: PyGIWarning: TimezoneMap was imported without spe