Kernel Management in MiniOS š§ ā
š¤ Why Replace the Kernel? ā
MiniOS comes with a default kernel, but there are several reasons why you might want to replace it:
š§ Different Debian Kernel Flavours ā
Debian provides several kernel variants optimized for different use cases:
linux-image-6.12.38+deb13-amd64- Standard kernel for 64-bit systems (default in MiniOS)linux-image-6.12.38+deb13-rt-amd64- Real-time kernel for time-critical applicationslinux-image-6.12.38+deb13-cloud-amd64- Optimized for cloud and virtualized environments
š Note: Version numbers (like
6.12.38+deb13) change with updates. To find current available kernels:bashapt search linux-image-.*-amd64 apt search linux-image-.*-rt-amd64 apt search linux-image-.*-cloud-amd64
šÆ Specialized Use Cases ā
- Real-time computing - RT kernels for audio production, industrial control
- Gaming and low-latency - Custom kernels with gaming optimizations
- Security hardening - Kernels with additional security patches (grsecurity, etc.)
- Hardware compatibility - Newer kernels for recent hardware support
- Performance tuning - Custom-compiled kernels with specific optimizations
š ļø Custom Kernel Features ā
- Custom patches - Apply specific patches for your hardware or use case
- Kernel modules - Add support for specialized hardware or filesystems
- Compiler optimizations - Build with different optimization flags
- Size optimization - Remove unnecessary drivers to reduce kernel size
š Common Scenarios ā
- Audio production workstations - Use RT kernel for minimal audio latency
- Gaming systems - Apply gaming-specific patches and optimizations
- Server environments - Use cloud-optimized kernels for better virtualization
- Legacy hardware - Use older kernels for compatibility with vintage systems
- Development systems - Test applications against different kernel versions
āļø MiniOS Kernel Manager Overview ā
MiniOS provides two tools for kernel management:
- š„ļø MiniOS Kernel Manager (GUI): A user-friendly graphical application for packaging, installing, and managing kernels
- āØļø minios-kernel (CLI): A command-line tool for advanced users and automation
Both tools automatically handle:
- Kernel packaging into SquashFS format
- Initramfs generation with proper drivers and boot scripts
- Installation to the MiniOS kernel repository
- Bootloader configuration updates
- Kernel activation and switching
ā ļø Important Considerations: ā
- š Administrative Privileges: Both tools require administrative privileges and will prompt for authentication via PolicyKit
- š Kernel Compatibility: Ensure kernels are compatible with MiniOS. Repository kernels are recommended
- š¾ MiniOS Directory: Tools automatically detect the MiniOS directory (
/minios/) and verify write permissions - š Automatic Updates: Bootloader configurations are updated automatically when kernels are activated
š„ļø Method 1: Using MiniOS Kernel Manager (GUI) ā
The graphical kernel manager provides an intuitive interface for all kernel operations.
š Steps: ā
1. š Launch the Application ā
minios-kernel-managerOr search for "MiniOS Kernel Manager" in your application menu.
2. š¦ Package a New Kernel ā
Using the Package Kernel Tab:
Select Kernel Source:
- Manual Package: Browse and select a local
.debkernel package - Repository: Choose from available kernels in the Debian/Ubuntu repositories
- Manual Package: Browse and select a local
Configure Compression:
- Select SquashFS compression:
zstd(recommended),lz4,lzo,xz, orgzip
- Select SquashFS compression:
Package the Kernel:
- Click "Package Kernel" button
- Monitor progress in the packaging log
- Files are automatically installed to the MiniOS repository
3. š Manage Installed Kernels ā
Using the Manage Kernels Tab:
View Available Kernels:
- See all packaged kernels with status badges:
- ACTIVE: Currently configured kernel
- RUNNING: Currently booted kernel
- AVAILABLE: Available for activation
- See all packaged kernels with status badges:
Activate a Kernel:
- Right-click on a kernel and select "Activate Kernel"
- Confirm the activation dialog
- Bootloader configuration is updated automatically
Delete a Kernel:
- Right-click on an inactive kernel and select "Delete Kernel"
- Confirm deletion (cannot be undone)
āØļø Method 2: Using minios-kernel (CLI) ā
The command-line tool provides scriptable kernel management capabilities.
ā ļø Administrative Privileges Required: ā
The CLI tool requires root privileges and will automatically check for them. Run commands with sudo or through pkexec:
sudo minios-kernel list
# or
pkexec minios-kernel activate 6.12.38+deb13-amd64š Basic Commands: ā
1. š List Available Kernels ā
sudo minios-kernel listShows all packaged kernels with their status.
2. š¦ Package a Kernel ā
From Repository:
sudo minios-kernel package --repo linux-image-6.12.38+deb13-amd64 -o /tmp/kernel-outputFrom Local .deb File:
sudo minios-kernel package --deb /path/to/kernel.deb -o /tmp/kernel-outputWith Custom Compression:
sudo minios-kernel package --repo linux-image-6.12.38+deb13-rt-amd64 --sqfs-comp lz4 -o /tmp/kernel-output3. š Activate a Kernel ā
sudo minios-kernel activate 6.12.38+deb13-amd644. šļø Delete a Kernel ā
sudo minios-kernel delete 6.12.38+deb13-amd645. š Check Status ā
sudo minios-kernel statusShows MiniOS directory status and current kernel information.
6. ā¹ļø Show Kernel Information ā
sudo minios-kernel info # Information about current active kernel
sudo minios-kernel info 6.12.38+deb13-amd64 # Information about specific kernelShows detailed information about a specific kernel including its status and availability.
š§ Advanced CLI Options: ā
JSON Output (for scripting): ā
sudo minios-kernel --json list
sudo minios-kernel --json status
sudo minios-kernel --json info
sudo minios-kernel --json package --repo linux-image-6.12.38+deb13-amd64 -o /tmp/output
sudo minios-kernel --json activate 6.12.38+deb13-amd64
sudo minios-kernel --json delete 6.12.38+deb13-amd64Advanced Package Options: ā
# Use custom temporary directory (requires at least 1024MB free space)
sudo minios-kernel package --repo linux-image-6.12.38+deb13-rt-amd64 -o /tmp/output --temp-dir /custom/temp
# Force package lists update if outdated
sudo minios-kernel package --repo linux-image-6.12.38+deb13-rt-amd64 -o /tmp/output --force-updateHelp and Usage: ā
minios-kernel --help # General help (doesn't require root)
sudo minios-kernel package --help # Package command help
sudo minios-kernel list --help # List command help
sudo minios-kernel activate --help # Activate command help
sudo minios-kernel info --help # Info command help
sudo minios-kernel status --help # Status command help
sudo minios-kernel delete --help # Delete command helpš§ Troubleshooting ā
Common Issues and Solutions: ā
š« MiniOS Directory Not Found ā
- Cause: Tools cannot locate the MiniOS directory
- Solution: Ensure you're running from a MiniOS system or the USB drive is properly mounted
- Check: Run
sudo minios-kernel statusto verify directory detection
š Permission Denied ā
- Cause: MiniOS directory is read-only or insufficient permissions
- Solution: Ensure you have administrative privileges and the filesystem is writable
- Check: Verify the MiniOS directory status in the GUI or CLI
š¦ Package Installation Failed ā
- Cause: Corrupted package, network issues, or dependency problems
- Solution:
- Verify the package file integrity
- Check network connectivity for repository packages
- Update package lists:
sudo apt update
š„ Kernel Panic After Activation ā
- Cause: Incompatible kernel or missing drivers
- Solution:
- Boot from rescue mode or older kernel
- Use
sudo minios-kernel activate <working-version>to activate a known working kernel - Check kernel compatibility with your hardware
š System Boots Old Kernel ā
- Cause: Bootloader configuration not updated properly
- Solution:
- Re-run kernel activation:
sudo minios-kernel activate <version> - Check that the kernel was properly packaged and installed
- Re-run kernel activation:
ā ļø Hardware Not Working After Kernel Change ā
- Cause: Missing drivers in the new kernel
- Solution:
- Verify the SquashFS kernel module file was installed
- Check if the new kernel supports your hardware
- Consider using a different kernel variant
šØ Kernel Recovery from Original MiniOS Image ā
If you need to recover from a corrupted or incompatible kernel, you can boot from the original MiniOS ISO/USB:
# Boot from original MiniOS image with from= parameter
# At boot prompt, specify your installed MiniOS device
from=/dev/sda1 # Replace with your actual MiniOS deviceRecovery Process: When you boot from the original MiniOS ISO/USB image and specify in the from= parameter the device where MiniOS is installed, the init system detects this and allows you to access your installed MiniOS system. The recovery method depends on whether the original kernel files are still present:
If the original kernel still exists:
- Boot happens seamlessly with the original kernel from the ISO/USB
- Manually activate the original kernel:
sudo minios-kernel activate <original-kernel-version>
If the original kernel was deleted:
- Manually copy kernel files from the original MiniOS image and restore them to the appropriate locations on your MiniOS installation
- Manually activate the restored kernel:
sudo minios-kernel activate <original-kernel-version>
In both cases, kernel activation requires manual intervention after the recovery process.
š Diagnostic Commands: ā
Check Current System Status:
sudo minios-kernel status
sudo minios-kernel info # Current active kernel info
uname -r # Current running kernel
cat /proc/version # Kernel version details
lsmod # Loaded kernel modulesVerify Kernel Files:
ls -la /minios/kernels/ # List packaged kernels
ls -la /minios/boot/ # List boot filesCheck Bootloader Configuration:
grep -r "vmlinuz" /minios/boot/ # Find kernel references in boot configsš File Structure Overview ā
The MiniOS Kernel Manager automatically manages these files:
Kernel Repository Structure: ā
/minios/
āāā 01-kernel.sb # Active kernel module (standard location)
āāā kernels/ # Repository of inactive/alternative kernels
ā āāā 01-kernel-<version>.sb # SquashFS kernel modules
ā āāā vmlinuz-<version> # Kernel binaries
ā āāā initrfs-<version>.img # Initial RAM filesystems
āāā boot/
ā āāā vmlinuz-<version> # Active kernel binary
ā āāā initrfs-<version>.img # Active initial RAM filesystem
ā āāā syslinux/
ā ā āāā syslinux.cfg # SYSLINUX bootloader config
ā āāā grub/
ā āāā grub.cfg # GRUB bootloader configNote: The standard 01-kernel.sb module that comes with MiniOS contains additional drivers beyond those included in the original repository kernel packages. These additional drivers provide enhanced hardware compatibility for wireless adapters and storage devices.
Status Indicators: ā
- ACTIVE: Kernel configured in bootloader (will boot on next restart)
- RUNNING: Currently executing kernel
- AVAILABLE: Packaged and ready for activation
Automatic Operations: ā
- ā Kernel packaging and compression
- ā Initramfs generation with proper drivers
- ā Installation to MiniOS repository
- ā Bootloader configuration updates
- ā Symlink management for active kernels
- ā Cleanup of temporary files
šÆ Best Practices ā
Kernel Selection: ā
- Use kernels from official Debian/Ubuntu repositories when possible
- Test new kernels in non-production environments first
- Keep at least one known working kernel for recovery
Before Installing: ā
- Verify MiniOS directory is writable
- Ensure sufficient disk space (kernels can be 100-500MB)
- Update package lists for repository kernels
After Installation: ā
- Test the new kernel thoroughly
- Verify all hardware functions correctly
- Keep previous kernel as backup until new one is proven stable
Recovery Planning: ā
- Always maintain a working kernel backup
- Know how to boot from rescue media if needed
- Document which kernels work with your hardware configuration