Project Overview
libero-install is an automated installer for Gentoo Linux that provides a guided installation experience while maintaining full system configurability. The project addresses the complexity gap between manual Gentoo installation and simplified distributions by offering a comprehensive CLI-based configuration interface with professional-grade automation.
Key features include support for multiple partitioning schemes, filesystem options (ext4, ZFS, btrfs), RAID configurations, LUKS encryption, and both systemd and OpenRC init systems. The installer generates auditable configuration files and provides recovery mechanisms for failed installations.
System Architecture
The installer follows a modular architecture with clear separation of concerns across multiple shell scripts. The main components communicate through well-defined interfaces and shared configuration state.
Core Components
The project structure separates functionality into distinct modules:
The configure script provides the TUI interface, install orchestrates the
installation process, and the scripts/ directory contains the core implementation logic.
This modular approach enables independent testing and maintenance of each component.
Configuration System
The configuration interface uses dialog to present a menu-driven system with dynamic
option visibility based on user selections:
Each menu item implements a standardized interface with _tag(), _label(),
_show(), _help(), and _menu() functions. This pattern enables
dynamic menu generation and context-sensitive option display.
Partitioning and Storage Management
The installer supports multiple disk layouts through a plugin-like system of partitioning schemes. Each scheme encapsulates the logic for a specific storage configuration:
Each scheme is implemented as a function that configures the appropriate partitioning logic. The progression from simple to complex allows users to select the appropriate level of storage complexity for their use case, with the custom option providing an escape hatch for advanced configurations.
ZFS Implementation
The ZFS-centric layout demonstrates the installer's support for advanced filesystems:
This function parses command-line style arguments to configure ZFS pools with optional compression and encryption. The argument parsing system provides a consistent interface across all partitioning schemes.
Installation Process and Error Handling
The installation process follows a structured pipeline with comprehensive error handling and recovery mechanisms:
Interactive Error Handling
Critical operations include interactive error handling that allows users to recover from failures:
This function provides interactive recovery options when commands fail, allowing users to drop into a shell to diagnose problems, retry operations, or abort the installation. The approach enables sophisticated error recovery without requiring complete installation restart.
Installation Pipeline
The main installation process follows a well-defined sequence:
Each step is modular and can be independently tested or debugged. The pipeline approach enables resumption from specific points if installation fails.
Configuration Generation
The installer generates comprehensive bash configuration files that serve as both installation instructions and system documentation:
Generated Configuration Format
The generated configuration includes vim modeline settings for proper syntax highlighting and detailed comments explaining each section. This approach makes the configuration both machine-readable and human-editable.
Validation System
Extensive validation prevents common configuration errors:
The validation system uses regex patterns and bash parameter expansion to verify configuration correctness before proceeding with installation. This prevents failures during the actual installation phase.
Security and Best Practices
The installer implements several security best practices by default:
SSH Configuration
When SSH is enabled, the installer provides a hardened configuration:
- ED25519 keys only
- Disabled password authentication
- Restricted key exchange algorithms
- Root-only access with key-based authentication
Encryption Support
Multiple encryption options are supported:
- LUKS for traditional filesystem encryption
- ZFS native encryption for ZFS pools
- Full disk encryption with secure key management
Modern Boot Process
The installer defaults to modern boot practices:
- EFI boot preferred over legacy BIOS
- EFI stub booting without bootloader overhead
- Secure boot compatibility
Development and Code Quality
The project maintains high code quality standards throughout the codebase:
Static Analysis
Consistent use of shellcheck for static analysis:
All shell scripts include appropriate shellcheck directives and follow bash best practices for variable handling, error checking, and portability.
Testing Infrastructure
The project includes testing capabilities:
Testing infrastructure enables validation of installation processes in controlled environments before deployment to production systems.
Conclusion
libero-install demonstrates that complex system installation can be automated without sacrificing flexibility or transparency. The project's technical architecture balances ease of use with professional-grade capabilities through careful modular design, comprehensive error handling, and extensive configuration validation.
Key technical achievements include:
- Dynamic menu system with context-sensitive options
- Plugin-based partitioning scheme architecture
- Comprehensive error handling with automatic retry
- Human-readable configuration generation
- Security-focused default configurations
The project serves as a reference implementation for how automation tools can provide both accessibility and control, making it valuable for system administrators who need repeatable, auditable installation processes without sacrificing the flexibility that makes Gentoo unique.