Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.
/ bsdbox Public archive

Building a FreeBSD server with jails and ZFS on a vagrant box.

License

Notifications You must be signed in to change notification settings

wolffaxn/bsdbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bsdbox

MIT licensed GitHub last commit (branch)

Table of Contents

About

Vagrant box with latest FreeBSD and ZFS.

Install FreeBSD root on ZFS

  1. Run
su -

to get a root shell.

  1. Run DHCP client by running
dhclient vtnet0

to get an IPv4 address.

  1. We can now start an SSH daemon by running:
mkdir /tmp/etc
mount_unionfs /tmp/etc /etc
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
passwd root
service sshd onestart
  1. Login to the FreeBSD Shell by running:
ssh root@<ip_address>
cd /tmp
# download zfsinstall.sh from github
fetch --no-verify-peer https://raw.github.com/wolffaxn/bsdbox/master/bin/zfsinstall.sh
chmod 750 zfsinstall.sh
./zfsinstall.sh -d ada0 -p zroot -r 8GB -s 2GB
shutdown -h now
cd /tmp
# download vagrant-setup.sh from github
fetch --no-verify-peer https://raw.github.com/wolffaxn/bsdbox/master/bin/vagrant-setup.sh
chmod 750 vagrant-setup.sh
./vagrant-setup.sh

Virtualbox Settings

Create a new Virtual Machine with the following settings:

  • System -> Motherboard -> Enable I/O APIC
  • System -> Motherboard -> Hardware clock in UTC time
  • System -> Processor -> 2 CPUs
  • System -> Acceleration -> Enable VT-x/AMD-V
  • System -> Acceleration -> Enable Nested Paging
  • Storage -> Add SATA Controller
  • Storage -> Attach a .vdi disk to SATA Port 0
  • Audio -> Disable Audio
  • Network -> Adapter 1 -> Attached to: NAT
  • Network -> Adapter 1 -> Advanced -> Adapter Type -> Paravirtualized Network (virtio-net)
  • Network -> Adapter 2 -> Attached to: host-only Adapter
  • Network -> Adapter 2 -> Advanced -> Adapter Type -> Paravirtualized Network (virtio-net)
  • Ports -> Disable Serial Port
  • Ports -> Disable USB Controller

Package for Vagrant

vagrant package --base <name-of-your-virtual-machine> --output freebsd-10.1-amd64.box

Setup

  1. Install dependencies
  1. Clone this project.
git clone https://github.com/wolffaxn/bsdbox.git
cd bsdbox
  1. Install vagrant plugins
vagrant plugin install vagrant-cachier
vagrant plugin install vagrant-hostsupdater
vagrant plugin install vagrant-vbguest
  1. Startup and SSH
vagrant up
vagrant ssh

License

This project is licensed under the terms of the MIT license.

About

Building a FreeBSD server with jails and ZFS on a vagrant box.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages