Skip to content

Instantly share code, notes, and snippets.

@dm0-
dm0- / 09_coreos.cfg
Created July 18, 2016 21:07
Sample GRUB menu item to boot a CoreOS PXE image (assuming it is stored on the seventh GPT partition)
#!/bin/tail -n+2
menuentry 'CoreOS 1109.1.0' --class coreos --class gnu-linux --class gnu --class os --unrestricted {
insmod part_gpt
insmod fat
set root='hd0,gpt7'
linuxefi /coreos/vmlinuz-4.6.4-coreos kvm_intel.nested=1 coreos.autologin=tty1 coreos.configdrive=1
initrdefi /coreos/coreos-1109.1.0.img
}
@dm0-
dm0- / overlay-modules.md
Created July 18, 2016 21:00
Add out-of-tree kernel modules to CoreOS

If the CoreOS developer image was used to build custom kernel modules for the same kernel version as in a CoreOS image, these modules can be added to the existing set with overlayfs. This example mount unit illustrates this if the modules are available under /mnt. Note that usual overlayfs requirements apply: namely that the working directory must be on the same root as the upper layer, and it needs to support extended attributes.

[Unit]
Description=Add custom kernel modules into the mix

ConditionPathExists=/mnt/%v

@dm0-
dm0- / utcbios.bat
Created July 18, 2016 20:58
Set Windows to expect UTC system time (save file, right-click, run as administrator)
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
@dm0-
dm0- / kernel-small.md
Last active July 30, 2019 19:53
Build a modified CoreOS kernel (no initramfs modules; X260 driver notes)

Download and start the CoreOS development image in a container. Make sure to bind writable directories over the kernel's build and install paths.

wget 'http://alpha.release.core-os.net/amd64-usr/current/coreos_developer_container.bin.bz2'
bzcat coreos_developer_container.bin.bz2 > coreos_developer_container.bin
mkdir boot modules src
sudo systemd-nspawn \
    --bind="$PWD/boot:/boot" \
    --bind="$PWD/modules:/lib/modules" \

--bind="$PWD/src:/usr/src" \