Skip to content

Instantly share code, notes, and snippets.

@pfandl
pfandl / opnsense-create-iso.sh
Last active June 23, 2021 00:20
Create OPNsense ISO with custom config.xml on linux for installation.
#!/usr/bin/env bash
# ------------------
# IT DOES NOT WORK, cannot create a sane ISO with mkisofs
# ------------------
config="${1:?please pass the config file path as argument}"
keymap="${2:-NO}" # keymap in /usr/share/{syscons,vt}/keymaps/* (or NO).
set -euo pipefail
@pfandl
pfandl / centos-installer-rw-overlay.sh
Last active March 31, 2020 05:09
Create a read-write overlay of / on the installation medium and chroot into it
# RAW: https://bit.ly/2UvzYZ6
# * Boot into the Rescue option of the ISO.
# * ALT+TAB to get into shell or wait for the option 3)
# * setup networking
# ncmli connection up enp0s3
# * setup keymap to not get insane
# localectl set-keymap at
# * prepare overlayfs
mkdir /tmp/upper /tmp/work /tmp/root
@pfandl
pfandl / keyboard-layout.ks
Created March 30, 2020 01:26
CentOS 8 kickstart post install snippet to set a grub2 keyboard layout.
%post
# Setup grub2 keyboard layout.
KEYBOARD_LAYOUT=at
[ -d /sys/firmware/efi ] \
&& boot_directory=/boot/efi/EFI/centos \
|| boot_directory=/boot