Skip to content

Instantly share code, notes, and snippets.

View mdhorn's full-sized avatar

Mark Horn mdhorn

View GitHub Profile
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# start_qemu.sh
#
# Copyright (c) 2016 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
From 1ea966fb315d99f33922ab1d8856f3708ba56663 Mon Sep 17 00:00:00 2001
From: Mark D Horn <mark.d.horn@intel.com>
Date: Tue, 26 May 2020 18:42:01 -0700
Subject: [PATCH] iso: Find usable tty for output
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
---
iso_templates/initrd_init_template | 42 +++++++++++++++++++++---------
1 file changed, 30 insertions(+), 12 deletions(-)
@mdhorn
mdhorn / lvm-test-install.yaml
Last active April 28, 2020 18:05
Example YAML for creating an installed image using LVM
# Assumes Advanced Mode is used
# /boot labeled CLR_BOOT_F
# / labeled CLR_ROOT_F on an lvm partition
keyboard: us
language: en_US.UTF-8
bundles: [os-core, os-core-update, openssh-server, storage-utils, curl]
telemetry: false
timezone: UTC
users: [{login: foobar, password: $6$1GLlYvBQt15eqAJ7$5pGpzXZKLgV.WTP9GYztBC19GZUgx6hEPVyjDkegqmvMWjZbmvprzHnyMK2RL9teIicSyqhe.Us89y1Az/3PC1,
admin: true}]
From aff858ae0fb31ca7026641bdef6d5ccf3475201e Mon Sep 17 00:00:00 2001
From: Mark D Horn <mark.d.horn@intel.com>
Date: Tue, 28 Apr 2020 09:47:28 -0700
Subject: [PATCH] Update Makefile to install completions
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
@mdhorn
mdhorn / mk_mdadm_init.sh
Created April 20, 2020 22:20
Script to create CPIO
#!/bin/bash
CWD="$(pwd)"
ROOT="${CWD}/initramfs"
if [ -d "${ROOT}" ]
then
echo "Directory exist: ${ROOT}"
read -p "Remove ${ROOT}? [Y/N] N: " answer
if [ "${answer}" == "Y" ]
then
@mdhorn
mdhorn / raid-test-install.yaml
Created April 20, 2020 21:14
raid-test-install.yaml
keyboard: us
language: en_US.UTF-8
bundles: [os-core, os-core-update, openssh-server, bootloader-extras]
telemetry: false
timezone: UTC
users: [{login: mhorn, password: $6$QRNn9xc486MlF1Up$pG1J.HcOYDgl6/BsGNzCcomD5Pzmxm.UdNuS31QJoU9nfydRr/kggQU0y9m8R8bh5eJnYMFWS3OE1dkFMDlsy/,
admin: true}]
kernel: kernel-native
postArchive: true
autoUpdate: true
$ find . -name vendor -prune -o -type f -name \*.go -exec wc -L {} \; | sort -nr
285 ./.gopath/src/github.com/clearlinux/mixer-tools/builder/bundleset_test.go
285 ./builder/bundleset_test.go
227 ./swupd/delta.go
227 ./.gopath/src/github.com/clearlinux/mixer-tools/swupd/delta.go
208 ./mixer/cmd/build.go
208 ./.gopath/src/github.com/clearlinux/mixer-tools/mixer/cmd/build.go
203 ./swupd-extract/main.go
203 ./.gopath/src/github.com/clearlinux/mixer-tools/swupd-extract/main.go
189 ./.gopath/src/github.com/clearlinux/mixer-tools/builder/build_validate.go
$ find . -name vendor -prune -o -type f -name \*.go -exec wc -L {} \; | sort -nr
841 ./storage/storage_test.go
436 ./args/args_test.go
284 ./network/network_test.go
184 ./user/user_validator_test.go
169 ./gui/pages/user_add.go
167 ./storage/block_devices_ops.go
158 ./gui/pages/disk_config.go
153 ./swupd/swupd.go
148 ./gui/switcher.go
@mdhorn
mdhorn / gist:42e3ed8fe6d75361dfba2b03037b7ff2
Created April 3, 2020 22:04
0045-units-use-var-swapfile-if-found.patch
From 9926178c6ab69c929bcf32205a176131ee7bcdab Mon Sep 17 00:00:00 2001
From: Mark D Horn <mark.d.horn@intel.com>
Date: Fri, 3 Apr 2020 11:35:33 -0700
Subject: [PATCH] units: use /var/swapfile if found
New unit to automatically make use of a swapfile if
it exists, not a symlink, and /var is writable.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
---
@mdhorn
mdhorn / start_qemu.sh
Created March 31, 2020 01:04
Start QEMU with extra disk for install
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# start_qemu.sh
#
# Copyright (c) 2016 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal