Skip to content

Instantly share code, notes, and snippets.

View marineam's full-sized avatar

Michael Marineau marineam

  • San Francisco, CA
View GitHub Profile
@marineam
marineam / gist:9493021
Created March 11, 2014 19:19
CoreOS postinst
# replacement psudocode for src/platform/installer
EFIPART=/dev/sda1
NEWROOT=/dev/sda4
mount -o ro $NEWROOT /media/newroot
mount $EFIPART /media/efi
# Normal boot
cp /media/newroot/boot/vmlinuz /media/efi/syslinux/vmlinuz.B
#cloud-config
coreos:
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
- name: update-engine.service
command: restart
@marineam
marineam / gist:50f92ded40e02c163c19
Created September 4, 2014 19:49
3.16.1 + PV Xen boot failure
Xen Minimal OS!
start_info: 0xac4000(VA)
nr_pages: 0x26700
shared_inf: 0x7e38b000(MA)
pt_base: 0xac7000(VA)
nr_pt_frames: 0x9
mfn_list: 0x990000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.1.0-rc5+ (marineam@crispin) (gcc version 4.8.4 (Gentoo 4.8.4 p1.4, pie-0.6.1) ) #179 SMP Tue May 26 22:15:05 PDT 2015
[ 0.000000] Command line: initrd=\f06334242ef80a24f117c44a527873e0\4.1.0-rc5+\initrd luks.options=discard luks.uuid=e13aa7d2-f5a8-4b0f-ab3e-62b4195356e6 resume=UUID=b0972a5b-ed54-4e2d-92e7-0dfeb6c776aa luks.uuid=f30f8625-cc56-475b-9461-b84b6b95196c root=UUID=e6b399d2-baa1-4eea-944c-e16b70648baf rootfstype=ext4 rootflags=data=writeback ro init=/usr/lib/systemd/systemd loglevel=6 video=efifb:off
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x0000000000057fff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000058000-0x0000000000058fff] reserved
@marineam
marineam / gist:cd257cafed4d6d86b56a
Created September 3, 2015 21:00
Gentoo Git + CVS hsitory
git clone git://anongit.gentoo.org/repo/gentoo.git
git remote add gentoo-gitmig-20150809-draft git://github.com/gentoo/gentoo-gitmig-20150809-draft.git
git fetch gentoo-gitmig-20150809-draft
git replace --graft 56bd759df1d0c750a065b8c845e93d5dfa6b549d 2ebda5cd08db6bdf193adaa6de33239a83a73af0
# TODO: respect SDK_VERSION in version.txt
V=master
S=/mnt/host/source/src/scripts
B=amd64-usr
./bin/cork create --replace --sdk-version=${V} --verbose
./bin/cork enter -- ${S}/update_chroot --toolchain_boards=${B}
./bin/cork enter -- ${S}/build_packages --board=${B} --skip_chroot_upgrade --getbinpkgver=master --toolchainpkgonly
./bin/cork enter -- ${S}/build_image --board=${B} prod
./bin/cork enter -- ${S}/prune_images
@marineam
marineam / bootxen.sh
Created September 12, 2013 02:22
Testing Xen with PXE CoreOS images
#!/bin/bash
XEN=$HOME/xen-3.4.4
#XEN=$HOME/xen-4.2.2
KERNEL=$HOME/latest/coreos_developer_pxe.vmlinuz
INITRD=$HOME/latest/coreos_developer_pxe_image.cpio.gz
COREOS_ARGS="root=squashfs: state=tmpfs:"
XEN_ARGS="console=hvc0 earlyprintk=xen"
CPU=host
#CPU=qemu64,+avx
@marineam
marineam / gist:11f0e7d9e4a55cb599fe
Created February 16, 2016 19:54
squish openstack image
$ qemu-img convert -O raw coreos_production_openstack_image.img coreos_production_openstack_image.bin
$ sudo losetup --show --find --partscan coreos_production_openstack_image.bin
/dev/loop0
$ sudo losetup --show --find --partscan coreos_production_image.bin
/dev/loop1
$ sudo dd if=/dev/loop0p6 of=/dev/loop1p6 bs=1M
128+0 records in
#!/bin/bash
set -e
eval $(go env)
tmp=$(mktemp)
trap "rm -f '$tmp'" EXIT
find "$GOROOT/src" -name '*.go' -type f -printf '%h\n' \
| grep -v -e '/cmd/' -e '/internal/' -e '/testdata/' \
#!/bin/bash
set -ex
KOLA=$(which kola)
PAYLOAD="$HOME/coreos/testupdates/update.gz"
CACHE_DIR="$HOME/coreos/testupdates/stable/"
STABLE_URL="https://stable.release.core-os.net/amd64-usr/"
STABLE_VERSIONS=(
367.1.0