miniBSD
About News Screenshots Download

miniBSD: the mini FreeBSD system

About

miniBSD v1.0

A script to create minimal, optimized FreeBSD images from an existing FreeBSD installation.
miniBSD - Less is More! 🚀

Overview

miniBSD creates a minimal FreeBSD image by extracting and optimizing components from an existing FreeBSD installation. The script must be run on a functioning FreeBSD system, which serves as the source for all binaries, libraries, and kernel modules.

Features

🔧 Optimizations
  • Minimal footprint: 1GB image with ~750MB free space
  • Selective binary inclusion: Only essential system binaries
  • Stripped libraries: All libraries are stripped of debug symbols
  • Curated kernel modules: VM-optimized module selection (expandable to full set)
  • Clean system: No pkg manager preinstalled, no development tools
🔒 Security
  • Random 6-digit root password generated for each build
  • Standardized root shell (/bin/sh)
  • Safety aliases preconfigured (rm -I, cp -ip, mv -i)
  • SSH ready with custom configuration
⚙️ Built-in Features
  • Automatic NTP synchronization with randomized schedule
  • Dynamic MOTD showing system information
  • Colored terminal output (ls, grep)
  • Customized prompt showing user@host:path
  • Useful aliases preconfigured system-wide

Compatibility

Hypervisor Support

  • Proxmox (KVM/QEMU)
  • VMware ESXi, Workstation, Fusion
  • VirtualBox
  • bhyve (FreeBSD native)
  • Xen
  • Hyper-V
  • Physical hardware

System Requirements

  • Source System: FreeBSD 13.x or newer (developed on 14.x)
  • Privileges: Root access required
  • Free Space: ~2GB for image creation
  • Target Size: 1GB (configurable)

Quick Start

# Download the script
fetch https://github.com/ggiovannelli/work/raw/refs/heads/master/FreeBSD/my.scripts/minibsd.sh

# Make it executable
chmod +x miniBSD.sh

# Run as root
./miniBSD.sh

# Image will be created as miniBSD.img and miniBSD.img.gz
   

Configuration

Key variables at the top of the script:

IMG_SIZE_MB=1024              # Image size (increase to 1536 for full kernel modules)
MINIMAL_KERNEL_MODULES="yes"  # "yes" for VM-optimized, "no" for full set
   

Output

The script creates:

  • miniBSD.img - Raw disk image
  • miniBSD.img.gz - Compressed image for distribution

Each build displays:

  • Unique root password (save it!)
  • NTP sync schedule
  • Build summary

What's Included

  • Core FreeBSD base system
  • Essential networking tools
  • SSH server
  • Text editors (vi, ee)
  • Compression utilities
  • System management tools
  • Virtual machine drivers

What's Excluded

  • Package manager (can be installed post-boot)
  • Development tools (compilers, headers)
  • Documentation and man pages
  • Source code
  • Debug symbols
  • X11/Graphics
  • Sound support

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the BSD 2-Clause License - same as FreeBSD.

Acknowledgments

  • FreeBSD Project for the amazing OS
  • All contributors who helped optimize this script through 97 iterations

 

Legacy project

The original distribution set typically ranges from 12-15 MB (fitting comfortably on a 16 MB flash drive) and includes all essential components needed to run a fully functional FreeBSD system supporting only legacy FreeBSD versions (4.x-6.x). You can get it in the download area.

Credits

The original project was inspired by a similar concept discovered on Martin Kasper's site (see credits) and born from the practical need for a FreeBSD system that could be deployed on small CompactFlash media without sacrificing the usability and functionality of a complete FreeBSD installation. miniBSD strikes a balance between the minimal PicoBSD system (floppy-sized) and NanoBSD.

The actual framework is fully rewritten by Claude.ai with our directions, suggestions and sometime corrections :).

miniBSD is mainly developed by gmarco, vic, flag, luca and dave but we are open to contributions and welcome patches from everyone.

We also want to thanks :
- Manuel Kasper for the original idea about how to reduce a FreeBSD system. Manuel has a great page here that explains everything.
- Freesbie team and in special way dave for all his work and contributions.
- Marco for ideas and web developing.
- 404 Creative Studios for this cute web layout. Please visits their pages
- Paola for creating the little Eddy (full size img), the miniBSD's mascotte.
- The FreeBSD team and users for supporting and developing this wonderful OS.

Copyright © 2005 404 Creative Studios