Last active
July 30, 2021 17:16
-
-
Save tobert/c7e5f83bafbe7e4286ecfed38d826b04 to your computer and use it in GitHub Desktop.
my startup script for xhyve
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 | |
# start up my Arch machine | |
# root disk: | |
# dd if=/dev/zero of=root.img bs=1000000 count=4000 conv=sparse | |
# scratch disk is for moving data in and out without networking | |
# e.g. tar -xzvf /dev/vdb | |
# dd if=/dev/zero of=scratchdisk.img bs=1000000 count=2500 conv=sparse | |
data=$HOME/archbox | |
# for system rescue | |
#cmdline="earlyprintk=serial console=ttyS0 archisolabel=RESCUE700 archisobasedir=sysresccd" | |
# regular operation | |
cmdline="earlyprintk=serial console=ttyS0 root=/dev/vda1" | |
/usr/local/bin/xhyve \ | |
-U 03392C0D-BDA9-49FC-9E19-B2D775CBBB10 \ | |
-A \ | |
-m 4G \ | |
-c 4 \ | |
-s 1,ahci-cd,$data/tmp/systemrescue-7.00-amd64.iso \ | |
-s 2,virtio-blk,$data/root.img \ | |
-s 3,virtio-blk,$data/scratchdisk.img \ | |
-s 4,virtio-net,vmnet0 \ | |
-s 0:0,hostbridge -s 31,lpc -l com1,stdio \ | |
-f "kexec,$data/vmlinuz-linux,$data/initramfs-linux.img,$cmdline" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment