Before going forward a generic setup with a valid installation for OpenBSD 7.0 is needed as HyperbolaBSD is also in need for testing-environment. We recommend to use an official mirror offering that version like mirrors.dotsrc.org. You can find the needed data and ISO-file here.
Therefore, Hyperbola Project clarifies here which is recommending the OpenBSD installation in a virtual machine in order to replace it with HyperbolaBSD. Once the official HyperbolaBSD live image be ready, this part of the documentation will be removed.
You should setup your preferred way for virtualization, either with qemu or qtemu.
Mount the root FFS2 as secondary device:
# mkdir hbbsd_dir/
# mount /dev/sd1a hbbsd_dir/
Mount a primary EXT2 as third device:
# mkdir ext2_dir/
# mount /dev/sd2i ext2_dir/
The following requirements are needed:
The next preparation steps are:
$ TARCH=x86_64-unknown-hyperbolabsd
$ doas pacman -S $TARCH-gcc $TARCH-binutils
$ doas pacman -S bmake athena-jot
$ git clone https://git.hyperbola.info:50100/hyperbolabsd/hyperbk.git
$ KARCH=amd64 KCFG=GENERIC.MP
$ cd hyperbk/arch/$KARCH/compile/$KCFG; unset KARCH KCFG
$ cp -va obj_gen obj
$ cd obj
$ NTHREADS=2
$ bmake -j $NTHREADS CC=$TARCH-cc LD=$TARCH-ld
$ unset CC LD NTHREADS TARCH
Steps to clean source code:
$ KARCH=amd64 KCFG=GENERIC.MP
$ cd hyperbk/arch/$KARCH/compile/$KCFG; unset KARCH KCFG
$ bmake clean
The following requirements are needed:
The next preparation steps are:
$ TARCH=x86_64-unknown-hyperbolabsd
$ doas pacman -S $TARCH-gcc $TARCH-binutils
$ doas pacman -S bmake rpcsvc-proto sharutils ctags
$ URL=https://git.hyperbola.info:50100
$ git clone $URL/hyperbolabsd/userspace-alpha.git
$ unset URL
$ cd userspace-alpha
$ doas cp usr.bin/lorder/lorder.sh /usr/local/bin/lorder
$ doas chown 0:0 /usr/local/bin/lorder
$ doas chmod 0755 /usr/local/bin/lorder
$ ./sys.sh
$ bmake -f obj.mk
$ NTHREADS=2
$ bmake -m $PWD/share/mk -j $NTHREADS CC=$TARCH-cc LD=$TARCH-ld
$ unset CC LD NTHREADS TARCH
Steps to clean source code:
$ cd userspace-alpha
$ bmake -m $PWD/share/mk clean
$ bmake -f obj.mk clean
$ qemu-img create obsd.img 2.2G
$ qemu-system-x86_64 -machine q35 -cpu max -smp 2 -m 4G -device intel-hda -device hda-duplex -name OpenBSD -net nic -net user,id=port1,hostfwd=tcp::2022-:22 -s -hda install70.img -hdb obsd.img -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device virtio-net,netdev=mynet0
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? i Choose your keyboard layout ('?' or 'L' for list) [default] System hostname? (short form, e.g. 'foo') openbsd Which network interface do you wish to configure? (or 'done') [em0] IPv4 address for em0? (or 'autoconf' or 'none') [autoconf] IPv6 address for em0? (or 'autoconf' or 'none') [none] Which network interface do you wish to configure? (or 'done') [done] DNS nameservers? (IP address list or 'none') [none] Password for root account? (will not echo) openbsd Password for root account? (again) openbsd Start sshd(8) by default? [yes] Do you expect to run the X Window System? [yes] Do you want the X Window System to be started by xenodm(1)? [no] Change the default console to com0? [no] Setup a user? (enter a lower-case loginname, or 'no') [no] openbsd Full name for user openbsd? [openbsd] OpenBSD Password for user openbsd? (will not echo) openbsd Password for user openbsd? (again) openbsd Allow root ssh login? (yes, no, prohibit-password) [no] Which disk is the root disk? ('?' for details) [sd0] sd1 Use (W)hole disk MBR, whole disk (G)PT or (E)dit? [whole] Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] Which disk do you wish to initialize? (or 'done') [done] Location of sets? (cd0 disk http nfs or 'done') [cd0] disk Is the disk partition already mounted? [yes] no Which disk contains the install media? (or 'done') [sd0] Which sd0 partition has the install sets? (or 'done') [a] Pathname to the sets? (or 'done') [7.0/amd64] Set name(s)? (or 'abort' or 'done') [done] Directory does not contain SHA256.sig. Continue without verification? [no] yes Location of sets? (cd0 disk http nfs or 'done') [done] What timezone are you in? ('?' for list) [Canada/Montain] Etc/UTC Exit to (S)hell, (H)alt or (R)eboot? [reboot] h
$ qemu-img create ext2.img 5G
$ qemu-system-x86_64 -machine q35 -cpu max -smp 2 -m 4G -device intel-hda -device hda-duplex -name OpenBSD -net nic -net user,id=port1,hostfwd=tcp::2022-:22 -s -hda obsd.img -hdb ext2.img -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device virtio-net,netdev=mynet0
# newfs_ext2fs -IO 1 sd1c
# halt -p
$ qemu-system-x86_64 -machine q35 -cpu max -smp 2 -m 4G -device intel-hda -device hda-duplex -name OpenBSD -net nic -net user,id=port1,hostfwd=tcp::2022-:22 -s -hda obsd.img -hdb ext2.img -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device virtio-net,netdev=mynet0
$ cd /usr
$ cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs checkout -rOPENBSD_7_0 -P src
$ cvs -d anoncvs@anoncvs.spacehopper.org:/cvs checkout -P src
Are you sure you want to continue connecting (yes/no)? yes
nano /usr/src/sys/sys/disklabel.h: --- -#define DOSPTYP_OPENBSD 0xa6 /* OpenBSD partition type */ +#define DOSPTYP_OPENBSD 0x6a /* HyperbolaBSD partition type */
# cd /usr/src/sys/arch/amd64/compile/GENERIC.MP
# make obj
# make config
# make
# mount -t ext2fs /dev/sd1c /mnt
# cd /usr/obj/??
# cp -va biosboot boot /mnt
# umount /mnt
# halt -p
$ cp obsd.img hbbsd.img
Create the HyperbolaBSD userspace, with same as locations, owners, groups and permissions from OpenBSD userspace.
# cd hbsd_base/var/sysmerge/etc_dir/
# bsdtar cvozf ../etc.tgz --options gzip:compression-level=9 *
# cd ..
# rm -r etc_dir
# cd hbsd_base/
# bsdtar cvzf ../hbbsd_base.tgz *
$ qemu-system-x86_64 -machine q35 -cpu max -smp 2 -m 4G -device intel-hda -device hda-duplex -name OpenBSD -net nic -net user,id=port1,hostfwd=tcp::2022-:22 -s -hda obsd.img -hdb install70.img -hdc ext2.img -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device virtio-net,netdev=mynet0
# mkdir ext2_dir
# mount /dev/sd1a /mnt
# mount -t ext2fs /dev/sd2c ext2_dir
# mkdir /mnt/hbbsd
# cp -va /mnt/7.0/amd64/INSTALL.amd64 /mnt/hbbsd
# cd ext2_dir
# cp -va bsd bsd.mp bsd.rd /mnt/hbbsd
# cp -va hbbsd_base.tgz /mnt/hbbsd/base70.tgz
# cd /mnt/hbbsd
# sha256 * > SHA256
# chmod 0644 *
# chmod 0755 bsd bsd.mp
# chown build:2000 *
# chown 0 INSTALL.amd64 bsd.rd
# chown 0:wheel SHA256
# cd
# umount /mnt
# umount ext2_dir
# rmdir ext2_dir
# halt -p
$ qemu-img create hbbsd_inst.img 2.2G
$ qemu-system-x86_64 -machine q35 -cpu max -smp 2 -m 4G -device intel-hda -device hda-duplex -name HyperbolaBSD -net nic -net user,id=port1,hostfwd=tcp::2022-:22 -s -hda install70.img -hdb hbbsd_inst.img -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device virtio-net,netdev=mynet0
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? i Choose your keyboard layout ('?' or 'L' for list) [default] System hostname? (short form, e.g. 'foo') hyperbolabsd Which network interface do you wish to configure? (or 'done') [em0] IPv4 address for em0? (or 'autoconf' or 'none') [autoconf] IPv6 address for em0? (or 'autoconf' or 'none') [none] Which network interface do you wish to configure? (or 'done') [done] DNS nameservers? (IP address list or 'none') [none] Password for root account? (will not echo) hyperbolabsd Password for root account? (again) hyperbolabsd Start sshd(8) by default? [yes] Do you expect to run the X Window System? [yes] Do you want the X Window System to be started by xenodm(1)? [no] Change the default console to com0? [no] Setup a user? (enter a lower-case loginname, or 'no') [no] hyperbolabsd Full name for user hyperbolabsd? [hyperbolabsd] HyperbolaBSD Password for user hyperbolabsd? (will not echo) hyperbolabsd Password for user hyperbolabsd? (again) hyperbolabsd Allow root ssh login? (yes, no, prohibit-password) [no] Which disk is the root disk? ('?' for details) [sd0] sd1 Use (W)hole disk MBR, whole disk (G)PT or (E)dit? [whole] Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] Which disk do you wish to initialize? (or 'done') [done] Location of sets? (cd0 disk http nfs or 'done') [cd0] disk Is the disk partition already mounted? [yes] no Which disk contains the install media? (or 'done') [sd0] Which sd0 partition has the install sets? (or 'done') [a] Pathname to the sets? (or 'done') [7.0/amd64] hbbsd Set name(s)? (or 'abort' or 'done') [done] Directory does not contain SHA256.sig. Continue without verification? [no] yes Location of sets? (cd0 disk http nfs or 'done') [done] What timezone are you in? ('?' for list) [Canada/Montain] Etc/UTC
# halt -p
$ qemu-system-x86_64 -machine q35 -cpu max -smp 2 -m 4G -device intel-hda -device hda-duplex -name HyperbolaBSD -net nic -net user,id=port1,hostfwd=tcp::2022-:22 -s -hda obsd.img -hdb hbbsd.img -hdc hbbsd_inst.img -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 -device virtio-net,netdev=mynet0
# mkdir hbbsd_dir
# mount /dev/sd1a hbbsd_dir
# mount /dev/sd2a /mnt
# cd /mnt
# cp -va altroot bin bsd bsd.mp bsd.rd dev etc home mnt root sbin tmp usr var hbbsd_dir
# umount hbbsd_dir
# umount /mnt
# rmdir hbbsd_dir
# halt -p