Skip to content

Instantly share code, notes, and snippets.

@shibatch
Created May 3, 2019 07:42
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 shibatch/ff4e1146f069d629556f06e29c107f70 to your computer and use it in GitHub Desktop.
Save shibatch/ff4e1146f069d629556f06e29c107f70 to your computer and use it in GitHub Desktop.
Script for installing debian on QEMU
#!/bin/bash
set -e
image_size_g=64
cdimage_file=mini.iso
image_file=qemu_ppc64le.img
dd if=/dev/zero of=$image_file bs=1 count=0 seek=$((image_size_g * 1024 ** 3))
mkfs.ext4 -F $image_file
qemu-img convert -O qcow2 $image_file $image_file.qcow2 && rm -f $image_file
qemu-system-ppc64 -M cap-htm=off -m 8G -smp cores=4,threads=1 -nographic -nodefaults -monitor pty -serial stdio -netdev user,id=n1 -device e1000,netdev=n1 -hda $image_file.qcow2 -cdrom $cdimage_file -boot d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment