Skip to content

Instantly share code, notes, and snippets.

@rokiden
rokiden / fedora_to_usb.sh
Created August 31, 2023 13:19
Script for converting Fedora LiveCD to LiveUSB with persistence
#!/bin/bash
# Script for converting Fedora (and maybe other dracut-based) LiveCD to LiveUSB
# with persistence. Only UEFI boot supported. Tested with Fedora 37.
#
# Usage:
# ./fedora_to_usb.sh path/to/mounted/livecd /dev/sdX
#
# Result USB partitioning:
# GPT, 2 partitions:
# - "EFI" (vfat 256MB) for GRUB and kernel
@rokiden
rokiden / linuxserver-wireguard-coredns-hosts.sh
Last active December 20, 2022 20:01
linuxserver/wireguard custom script configuring coredns with domain zone and peers
#!/usr/bin/with-contenv bash
CONFIG_DIR="/config"
if [ -z "$COREDNS_ZONE" ]; then
COREDNS_ZONE="wg.net"
fi
echo "**** CoreDNS hosts zone $COREDNS_ZONE ****"
echo "$COREDNS_ZONE {" > $CONFIG_DIR/coredns/hosts.conf