Skip to content

Instantly share code, notes, and snippets.

View antevens's full-sized avatar

Antonia Stevens antevens

View GitHub Profile
@zachfeldman
zachfeldman / mount-encrypted-ubuntu-rpool from LiveUSB
Last active April 19, 2025 22:18
Recover system on Ubuntu LiveUSB with an encrypted rpool
# Heavily copied from https://develmonk.com/2022/05/20/mount-ubuntu-22-04-zfs-partitions-using-live-iso-for-disaster-recovery/ and https://askubuntu.com/questions/1332447/how-to-mount-an-encrypted-ubuntu-20-10-zfs-file-system-from-an-ubuntu-live-cd - kudos!
# No implied warranty - use at your own risk!
# Run as root
sudo su -
# Mount the rpool to extract the system key
zpool import rpool -R /mnt
# Get the system key for the rpool. You'll be prompted for the password
@magnetikonline
magnetikonline / README.md
Last active April 17, 2025 16:19
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}