README.md 1.48 KB
Newer Older
Michael Dexter's avatar
Michael Dexter committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
## occambsd: An application of Occam's razor to FreeBSD
a.k.a. "super svelte stripped down FreeBSD"

This script leverages FreeBSD build options and a kernel configuration file
to build the minimum kernel and userland to boot under the bhyve hypervisor.

By default it builds from /usr/src to a tmpfs mount /usr/obj and a tmpfs work
directory mounted at /tmp/occambsd for speed and unobtrusiveness.

## Requirements

FreeBSD 13.0-ALPHA1 source code or later

## Layout

```
/tmp/occambsd
Michael Dexter's avatar
Michael Dexter committed
18
19
20
21
/tmp/occambsd/jail                      A world/distribution for use with jail(8)
/tmp/occambsd/root                      The optional virtual machine kernel directory
/tmp/occambsd/occambsd.raw              The virtual machine disk image
/tmp/occambsd/mnt                       A mount point used during VM image creation
22
23
24
25
26
/tmp/occambsd/load-vmm-module.sh        A script to load the vmm.ko kernel module
/tmp/occambsd/load-from-directory.sh    A script to load the VM kernel from the directory
/tmp/occambsd/load-from-disk-image.sh   A script to load thd VM from disk image (pick one)
/tmp/occambsd/boot-occam-vm.sh          A script to boot the occam VM
/tmp/occambsd/destroy-occam-vm.sh       A script to destroy/clean-up the occam VM
Michael Dexter's avatar
Michael Dexter committed
27
28
29
30
31
32
```

bhyve load, boot, and destroy commands will be printed after build completion.

## Build times on an EPYC 7402p

Michael Dexter's avatar
Michael Dexter committed
33
buildworld:	1m14.52s
34

Michael Dexter's avatar
Michael Dexter committed
35
buildkernel:	12.09s
36

Michael Dexter's avatar
Michael Dexter committed
37
installworld: 15.02s
38

Michael Dexter's avatar
Michael Dexter committed
39
40
41
42
43
installkernel:	0.32s

Boot time:	Approximately two seconds

This is not a desired endorsement of GitHub