Skip to content

Instantly share code, notes, and snippets.

@teknoraver
Last active December 4, 2017 01:11
Show Gist options
  • Save teknoraver/3243de6a849ba435bdc9 to your computer and use it in GitHub Desktop.
Save teknoraver/3243de6a849ba435bdc9 to your computer and use it in GitHub Desktop.
#!/bin/sh
[ $# -eq 2 ] || exec echo "Usage: $0 <install.iso> <disk.img>"
root=/tmp/${0##*/}.$$
mkdir $root
sudo mount -r -oloop "$1" $root
kvm -m 512 -no-reboot -nographic -boot d -cdrom "$1" -drive "file=$2,index=0,media=disk,format=raw" -kernel $root/install.*/vmlinuz -initrd $root/install.*/initrd.gz -append console=ttyS0,115200
sudo umount $root
rmdir $root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment