Skip to content

Instantly share code, notes, and snippets.

Robin Smidsrød robinsmidsrod

Block or report user

Report or block robinsmidsrod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
robinsmidsrod / dhcpd.conf
Last active Jul 11, 2019
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
View dhcpd.conf
ddns-update-style none;
deny bootp; #default
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN (private network)
subnet netmask {
option subnet-mask;
robinsmidsrod /
Last active Jul 10, 2019
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
else {
    filename "undionly.kpxe";

(or see for a more elaborate setup

robinsmidsrod /
Last active Jun 19, 2019
Embedded iPXE menu to choose which network adapter to boot from (autodetects up to 10 adapters)

Go into your git checkout folder of ipxe.

Save the below file as nic-menu.ipxe.

Build iPXE like this:

cd src && make EMBED=../nic-menu.ipxe && cd ..

Requirements: current iPXE as of 2013-08-01 (for proper behavior of autoboot with a network device specified, netX feature, PCI vendor/device ID display and inc command)

robinsmidsrod / sysrcd.ipxe
Last active Jun 9, 2019
SystemRescueCD iPXE menu script and monkeypatch for preloading sysrcd.dat with iPXE instead of loading from local storage
View sysrcd.ipxe
set sysrcd-version 4.7.1
echo Booting SystemRescueCD ${sysrcd-version} x86 for ${initiator-iqn}
# Kernel command-line options are documented here:
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
robinsmidsrod / nic-menu.ipxe
Created Apr 7, 2016
iPXE embedded menu that tries to boot each network adapter in turn
View nic-menu.ipxe
set timeout 1000
menu Network boot options for ${uuid}
item --key a default Try to boot (a)ll network adapters in turn
item --gap -- --- Detected network adapters ---
set i:int8 0
robinsmidsrod / logstash.conf
Created Dec 5, 2012
Logging Windows event log information to Logstash using nxlog and JSON transport
View logstash.conf
input {
tcp {
type => "syslog"
host => ""
port => 3514
tcp {
type => "eventlog"
host => ""
port => 3515
robinsmidsrod / gist:395097
Created May 9, 2010
Win32::API x64 compile fail
View gist:395097
g++ -o ..\blib\arch\auto\Win32\API\Callback\Callback.dll -mdll -s -L"C:\Programs\strawberry-perl\perl\lib\CORE" -L"C:\Programs\strawberry-perl\c\lib" Callback.o -Wl,--image-base,0x21000000 C:\Programs\strawberry-perl\perl\lib\CORE\libperl511.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
C:\Programs\strawberry-perl\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 ..\blib\arch\auto\Win32\API\Callback\Callback.dll
C:\Programs\strawberry-perl\perl\bin\perl.exe -MExtUtils::Command -e "cp" -- ..\blib\arch\auto\Win32\API\Callback\
C:\Programs\strawberry-perl\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 ..\blib\arch\auto\Win32\API\Callback\
C:\Programs\strawberry-perl\perl\bin\perl.exe C:\Programs\strawberry-perl\perl\lib\ExtUtils\xsubpp -typemap C:\Programs\strawberry-perl\perl\lib\ExtUtils\typemap -typemap typemap AP
robinsmidsrod / gist:f8227a22ae1109b4a9ab
Created May 27, 2014
Unable to upgrade OmniOS from r151006 to r151008
View gist:f8227a22ae1109b4a9ab
# /usr/bin/pkg update -nv --be-name=omnios-r151008 entire@11,5.11-0.151008
Creating Plan /
pkg update: No matching version of entire can be installed:
Reject: pkg://omnios/entire@11,5.11-0.151008:20131204T230829Z
Reason: This version is excluded by installed incorporation pkg://,5.11-0.151006:20130816T193600Z
This version is excluded by installed incorporation pkg://,5.11-0.151006:20140312T200321Z
This version is excluded by installed incorporation pkg://,5.11-0.151006:20140312T200347Z
This version is excluded by installed incorporation pkg://,5.11-0.151006:20140312T194315Z
robinsmidsrod / remote_logging.conf
Created Jul 4, 2012
rsyslogd setup for remote logging
View remote_logging.conf
$ cat /etc/rsyslog.d/remote_logging.conf
# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514
# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
# Limits reception to our subnet
$AllowedSender UDP,
$AllowedSender TCP,
View list_container_by_parent.sql
CREATE FUNCTION public.list_container_by_parent(in_parent_id uuid, in_locale text, in_sort_key text, in_custom_init_key text) RETURNS SETOF public.node
AS $$
-- Returns the child containers of the specified parent container in the
-- sort order specified by the sort key and locale.
-- If sort key is not specified, the sort key of the parent container,
-- or default for parent container type, is used.
-- If custom_init key is specified, containers that have this key set are
-- excluded from output. The value of the custom_init key doesn't matter.
You can’t perform that action at this time.