Skip to content

Instantly share code, notes, and snippets.

View pr1ntf's full-sized avatar

Trent pr1ntf

View GitHub Profile
@pr1ntf
pr1ntf / bhyvesawce.sh
Last active September 12, 2023 00:52
iocage/bhyve notepad
# Create guest
# iohyve create $name $size $con
__create() {
local name="$2"
local pool="$(zfs list | grep iohyve | head -n1 | cut -d '/' -f 1)"
local size="$3"
local con="$4"
echo "Creating $name..."
# create dataset in case there needs to be files to store in the future. (grub2-bhyve)
zfs create $pool/iohyve/$name
@pr1ntf
pr1ntf / 9front-yabs.sh
Last active September 5, 2023 21:40
Get 9front (Plan9 fork) booted under FreeBSD bhyve
#!/bin/sh
# Yet Another bhyve Script v0.4
# Use this to try and boot 9front, the Plan9 fork.
# Virtio emulation works better (ported drivers)
# PS/2 Mouse emulation requires updated bhyve(8)
# If you don't have it, patch is uploaded with this Gist
# When partitioning, I have had more success with MBR
# GPT may work for some people
@pr1ntf
pr1ntf / mac-yabs.sh
Last active July 20, 2023 20:02
mac-yabs.sh
#!/bin/sh
# Yet Another bhyve Script v0.1.5
# This was once used to test booting MacOS
# Don't expect it to work
name=clover
ram=8192M
cpu=4
disk=clover-capitan.img
@pr1ntf
pr1ntf / iohyve.sh
Last active October 13, 2021 11:03
iohyve v0.2.5 -- bhyve manager based on iocage for FreeBSD
#!/bin/sh
# iohyve v0.2.5 2015/05/06 "ALL HAIL LINUS edition"
# Process command line
__parse_cmd () {
while [ $# -gt 0 ] ; do
case "$1" in
version) __version
exit
@pr1ntf
pr1ntf / leibniz.cc
Created April 30, 2016 08:12
Small C++ program to approximate pi using the Leibniz series.
#include <stdio.h>
// iterations of work unit
// iterprint for output at end of run
long double i = 1000000000;
long long int iterprint = i;
// variables for work unit
// pi starts at 0
// pi1-3 are used by workunit
@pr1ntf
pr1ntf / droid-yabs.sh
Last active January 29, 2019 20:55
Booting Android-x86 under FreeBSD bhyve (Work in progress)
#!/bin/sh
# Yet Another bhyve Script v0.3
# Use this example to boot Android-x86
# Have not tested e1000 network emulation yet
# It will install to hd, but will get stuck in boot loop
# This should get you through the setup in live mode
# Be sure to kldload vmm
name=droid86
@pr1ntf
pr1ntf / food.txt
Created December 29, 2018 23:16
Gobble twitter data from a list of users in food.txt
myusername
yourusername
thatdogsusername
yurausername
@pr1ntf
pr1ntf / grub.cfg
Last active August 4, 2018 14:30
Minix3 and bhyve Hints.
set root=(cd0,msdos2)
multiboot /boot/minix_latest/kernel rootdevname=c0d0p0s0 cttyline=0 cttybaud=9600
module /boot/minix_latest/mod01_ds.gz
module /boot/minix_latest/mod02_rs.gz
module /boot/minix_latest/mod03_pm.gz
module /boot/minix_latest/mod04_sched.gz
module /boot/minix_latest/mod05_vfs.gz
module /boot/minix_latest/mod06_memory.gz
module /boot/minix_latest/mod07_tty.gz
module /boot/minix_latest/mod08_mfs.gz
@pr1ntf
pr1ntf / vnet-vimage-iohyve.txt
Created December 10, 2015 22:58
Old iohyve + vimage docs.
### Welcome! ###
# iohyve is an all in one quick start for utilizing built-in FreeBSD and ZFS
# tools for managing bhyve guests. iohyve acts much like @pannon's iocage and it's
# inspiration is drawn from it's ideas. iohyve's aim is to get a solid basis of how bhyve
# will interact with iocage's ideas. This includes resource limiting/management, store data in
# zfs proprieties, vnet, and UUID's in addition to creation, starting, stopping, and destroying
# live guests. Snapshoting and other features might be better saved for iocage integration.
# Big thanks to @pannon and @skarekrow for all their help, their code, and patience. :)
@pr1ntf
pr1ntf / debian8iohyve
Created July 29, 2015 04:13
Quick and dirty Debian 8 in iohyve
# Create the VM
iohyve create debianvm 8G nmdm8
# Set the correct bootloader
iohyve set debianvm loader=grub-bhyve
# Fetch the image
iohyve fetch http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso
# Install