Created
May 3, 2019 07:42
-
-
Save shibatch/ff4e1146f069d629556f06e29c107f70 to your computer and use it in GitHub Desktop.
Script for installing debian on QEMU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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