Skip to content

Commit 1039860

Browse files
committed
feat: major enhancements to PECU v3.0 → v3.1 with bootloader detection, idempotent repos, and live verification
## Major Features Added ### Bootloader Detection & Configuration - Implemented robust bootloader detection system (detect_bootloader) - Enhanced support for systemd-boot, GRUB-UEFI, and GRUB-legacy - Auto-creation of /etc/kernel/cmdline if missing on systemd-boot systems - Improved error handling with proxmox-boot-tool and pve-efiboot-tool fallbacks - Added reinit+refresh workflow for systemd-boot configuration failures - Fixed cmdline parameter handling with word boundary checks (prevents duplicates) ### Idempotent Repository Management - NEW: add_repo_line() - idempotent repository configuration function - NEW: remove_pecu_repos() - clean removal of PECU-managed repositories - NEW: show_repo_change() - dry-run preview of repository changes - NEW: get_debian_codename() - automatic Debian version detection (Bullseye/Bookworm/Trixie) - NEW: preview_repo_changes() - interactive dry-run mode - NEW: show_repo_status() - comprehensive repository status display - Repository file moved from pve-install.list to pecu-repos.list with PECU-MANAGED header - All repository additions now check for duplicates before adding - Support for Proxmox VE 7.x, 8.x, and 9.x with correct Debian codenames ### Kernel Module Validation - NEW: ensure_module() - validates module existence before loading - NEW: add_module_persistent() - adds modules to config only if they exist and validates - Enhanced VFIO module configuration with validation checks - Prevents addition of invalid kernel modules to system configuration - Added debug logging for module validation ### Live Configuration Verification - NEW: verify_configuration_live() - comprehensive post-configuration validation - Verifies kernel parameters in /proc/cmdline (live system state) - Checks loaded kernel modules via lsmod - Validates configuration files existence and content - Provides detailed verification reports with pass/fail status - Integrated into complete_gpu_passthrough_setup workflow ## Improvements & Bug Fixes ### systemd-boot Support Enhancements - Fixed cmdline file creation when missing - Improved tool detection (proxmox-boot-tool vs pve-efiboot-tool) - Added auto-recovery with reinit workflow when refresh fails - Better error messages for ESP mount issues - Backup cmdline files before modifications with timestamps ### GRUB Configuration - Enhanced parameter addition logic to handle existing quotes properly - Improved duplicate parameter detection - Better sed regex for parameter insertion ### Configuration Management - All kernel parameter additions now use word boundary checks - Idempotent operations - running configuration multiple times is safe - Better backup file naming with timestamps - Enhanced rollback to include new configuration files (vfio_iommu_type1.conf) ### UI/UX Enhancements - Updated loading banner with enhanced ASCII art and layout - Added repository management options to configuration menu - New menu items: Preview Repository Changes, Show Repository Status - Enhanced backtitle in main menu with support URLs - Added Live Configuration Verification to hardware detection menu ### Code Quality - Improved error handling throughout - Better logging with context-specific messages - Fixed potential issues with parameter detection regex - More robust file existence checks - Enhanced cleanup in rollback function ## Metadata Updates - Version bumped from 3.0 to 3.1 - Build date updated to 2025-11-04 - Author field simplified to "Daniel Puente García" - Added official website URL: https://pecu.tools - Enhanced copyright notice in header ## Technical Details ### Repository Management Architecture - Centralized repository configuration in /etc/apt/sources.list.d/pecu-repos.list - PECU-MANAGED markers for safe identification and removal - Dry-run capability for previewing changes before applying - Proper Debian security repository format handling for different versions - Optional Proxmox no-subscription repository with user confirmation ### Bootloader Detection Logic 1. Check for /sys/firmware/efi (UEFI vs BIOS) 2. Detect systemd-boot tools (proxmox-boot-tool or pve-efiboot-tool) 3. Verify /etc/kernel/cmdline existence 4. Auto-create cmdline from /proc/cmdline if needed 5. Fallback to GRUB detection ### Verification System - Four-stage verification: kernel params, modules, config files, IOMMU - Visual status indicators (✓/✗/⚠) - Detailed action recommendations on failures - Integrated into automated setup workflow ## Breaking Changes None - all changes are backward compatible ## Migration Notes - Old pve-install.list repository file remains untouched - New configurations use pecu-repos.list - Users can safely run configure_sources_list multiple times - Rollback function updated to handle both old and new repository files ## Testing Recommendations 1. Test on fresh Proxmox VE 8.x installation 2. Verify systemd-boot configuration on UEFI systems 3. Confirm idempotent repository operations 4. Test live verification after configuration 5. Verify rollback removes all new configuration files This release significantly improves reliability, safety, and user experience for GPU passthrough configuration on Proxmox VE systems.
1 parent 5e516db commit 1039860

File tree

1 file changed

+859
-148
lines changed

1 file changed

+859
-148
lines changed

0 commit comments

Comments
 (0)