Skip to content

Instantly share code, notes, and snippets.

@ohadlevy
Created July 16, 2020 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohadlevy/5dc0dc04b00a8b6133797b861dcc488b to your computer and use it in GitHub Desktop.
Save ohadlevy/5dc0dc04b00a8b6133797b861dcc488b to your computer and use it in GitHub Desktop.
#! /bin/sh -e
URL=$1
MOUNT='mount -o loop,ro image'
KERNEL='images/vmlinuz'
INITRD='images/initramfs.img'
KERNEL_ARG='mitigations=auto,nosmt systemd.unified_cgroup_hierarchy=0 coreos.liveiso=fedora-coreos-31.20200319.dev.1 rd.neednet=1 ip=dhcp ignition.firstboot ignition.platform.id=metal'
TMP=`mktemp -d`
cd $TMP
mkdir mnt
wget $URL
$MOUNT mnt && cd mnt
kexec --force --reset-vga --initrd=$INITRD --append="$KERNEL_ARG" $KERNEL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment