Skip to content

Instantly share code, notes, and snippets.

View robinsmidsrod's full-sized avatar

Robin Smidsrød robinsmidsrod

View GitHub Profile
@NiKiZe
NiKiZe / dnsmasq.conf
Last active January 27, 2024 06:16
Trying to chainload iPXE with full feature set from a lesser featured one. dnsmasq ProxyDHCP edition
# Known working dnsmasq version 2.85 config for iPXE proxydhcp usage
# things to replace:
# * 10.1.1.0 - your subnet
# * eth0 - interface to listen on, or switch to bind-dynamic
# * 10.1.1.2 - your tftp server ip
# * http://gentoo.ipxe.se/boot.ipxe - script to run once inside iPXE
# Debug logging
log-debug
hass:account
hass:alert
hass:alert-circle
hass:altimeter
hass:apple-safari
hass:apps
hass:arrow-bottom-left
hass:arrow-down
hass:arrow-left
hass:arrow-right
@CalvinHartwell
CalvinHartwell / ubuntu-18.04-lts-preseed.cfg
Last active December 10, 2021 19:48
ubuntu-18.04-lts-preseed.cfg
### Preseed for Ubuntu 18.04
# Derived from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Usage
# We recommend to use the build-iso.sh script to build an image with embedded
# preseed and other required files. In that case the preseed file gets loaded
# automatically and all additional files are available to the installer.
### Unattended Installation
d-i auto-install/enable boolean true
@AdamNaj
AdamNaj / about.md
Last active July 13, 2022 19:50
Z Wave Graph for Home Assistant
@mikejoh
mikejoh / docker-dhcpd.md
Last active April 3, 2024 16:37
Short guide on how to set up a Docker container as a DHCP server

Setting up a Docker container as a DHCP server

In this guide I’ve tested a number of different commands and configurations using Docker to run a container with dhcpd (+macvlan driver) to serve my clients in my home network. In the end i’ll migrate from my Windows 2012 R2 Server running DHCP to a much more lightweight Docker container (7.42 MB in total). Wow.

My home environment:

  • Firewall (Juniper)
    • I’m running IP helper for bootp which in this case means that i relay DHCP requests from various VLANs into one where i've placed my Windows 2012 R2 server. This is also where my container will live. See the FW configuration below:
@robinsmidsrod
robinsmidsrod / elive.ipxe
Created July 7, 2016 11:17
Booting Elive 2.6.18 beta using iPXE and NFS
:elive
echo Starting Elive ${elive-version} for ${initiator-iqn}
# Get the ISO from http://www.elivecd.org/download/beta/
set base-url elive-${elive-version}
set kernel-args \
boot=live swap=off \
ip=dhcp root=/dev/nfs nfsroot=${nfs-server}:${nfs-root}${base-url} \
config username=eliveuser
kernel ${base-url}/live/vmlinuz1 ${kernel-args}
initrd ${base-url}/live/initrd1.img
@robinsmidsrod
robinsmidsrod / nic-menu.ipxe
Created April 7, 2016 10:46
iPXE embedded menu that tries to boot each network adapter in turn
#!ipxe
set timeout 1000
:menu
menu Network boot options for ${uuid}
item --key a default Try to boot (a)ll network adapters in turn
item
item --gap -- --- Detected network adapters ---
set i:int8 0
@robinsmidsrod
robinsmidsrod / signjar.cmd
Last active March 1, 2016 15:26
Batch file for cmd.exe for signing an existing Java archive (.jar file)
@echo off
set startdir=%cd%
set tmpdir="C:\Temp\signjar.tmp"
set notepadpp="C:\Program Files (x86)\Notepad++\notepad++.exe"
set veracrypt="C:\Program Files\VeraCrypt\VeraCrypt.exe"
set vc_volume="\\nas\company\kunder\Fagbokforlaget V&B AS\code-signing\FVB.hc"
set vc_drive="K"
@robinsmidsrod
robinsmidsrod / sysrcd.ipxe
Last active February 15, 2024 12:47
SystemRescueCD iPXE menu script and monkeypatch for preloading sysrcd.dat with iPXE instead of loading from local storage
#!ipxe
set sysrcd-version 4.7.1
echo Booting SystemRescueCD ${sysrcd-version} x86 for ${initiator-iqn}
# Kernel command-line options are documented here:
# http://www.system-rescue-cd.org/Sysresccd-manual-en_Booting_the_CD-ROM#Network_boot_using_PXE
set base-url sysrcd-${sysrcd-version}-x86/
kernel ${base-url}isolinux/altker${archs} setkmap=no net.ifnames=0 backstore=off
initrd ${base-url}isolinux/initram.igz
initrd ${base-url}sysrcd.dat /sysrcd.dat
# Load the ramdisk again as a file inside the ramdisk, so our custom init script
@voxpelli
voxpelli / README.md
Last active July 19, 2016 18:36
How to get references to all PR:s on a "git fetch origin" – forgot where I found this, but rediscovered the setup in one of my local repos

In the .git/config file add the fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to the remote you want to fetch references to PR:s from.