https://man.openbsd.org/release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| dd if=/dev/zero of=mydisk.img bs=1 count=0 seek=2G
vnconfig mydisk.img
fdisk -iy vnd0
disklabel -E vnd0
add slice a with all the storage
newfs /dev/vnd0a
mount /dev/vnd0a /mnt/
cd /mnt/
tar zxvfph base67.tgz
cp /etc/resolv.conf /mnt/etc
cp /etc/installurl /mnt/etc
cd /mnt/dev/
./MAKEDEV all
#If you want to make it bootable copy the kernel
cp /bsd /mnt/
chroot /mnt/ /bin/sh
#Set root password
passwd root
#Create a fstab
#sd0a
# cat /etc/boot.conf
set tty com0
stty com0 115200
#cat /etc/ttys
#tty00 "/usr/libexec/getty std.9600" vt220 on secure
tty00 "/usr/libexec/getty std.115200" vt220 on secure</code></pre>
|
Good idea now is to bake a backup of the image.
Other good stuff to consider:
- Allow ssh?
- Create additional users?
- No network configuration has been made yet
Test the image
OpenBSD has vmd with vmctl that allows you to run a virtual machine easily.
vmctl start -m 1G -i 1 -b /bsd -d mydisk.img "myvm" -c
- m - memory
- i - #nr of interfaces (network)
- b - bios/kernel
- d - disk
- c - attach console after start