Update TODO with critical bootable image issues and development roadmap
Some checks failed
particle-os CI / Test particle-os (push) Failing after 1s
particle-os CI / Integration Test (push) Has been skipped
particle-os CI / Security & Quality (push) Failing after 1s
Test particle-os Basic Functionality / test-basic (push) Failing after 1s
particle-os CI / Build and Release (push) Has been skipped

- Add critical issues section for GRUB TTY problems
- Document all attempted TTY bypass solutions
- Organize by development phases with clear priorities
- Add immediate action items and project metrics
- Include risk assessment and integration planning

This update reflects the current blocking issues preventing
functional bootable image creation and outlines the path
forward through bootupd integration.
This commit is contained in:
robojerk 2025-08-27 20:47:50 -07:00
parent 126ee1a849
commit cd1c3b3bb0
3 changed files with 957 additions and 76 deletions

261
docs/todo
View file

@ -1,17 +1,54 @@
# TODO - particle-os: Debian-Native OS Image Builder
## 🎯 **Current Status: REPOSITORY CLEANUP & STRUCTURE ALIGNMENT**
## 🎯 **Current Status: CRITICAL BOOTABLE IMAGE ISSUES - IMMEDIATE ATTENTION REQUIRED**
**Date**: August 17, 2025
**Phase**: Phase 5 - Repository Cleanup & Structure Alignment
**Status**: 🧹 **REPOSITORY CLEANUP - Aligning Structure with Original osbuild/bootc-image-builder**
**Date**: December 19, 2024
**Phase**: Phase 6 - Critical Bootable Image Issues
**Status**: 🚨 **CRITICAL ISSUES - BLOCKING BOOTABLE IMAGE CREATION**
**Summary**: We have a working prototype that demonstrates container-to-bootable-image conversion. Now we need to clean up the repository structure to match the original [osbuild/bootc-image-builder](https://github.com/osbuild/bootc-image-builder) repository layout for better maintainability and contributor experience.
**Summary**: We have a working prototype that demonstrates container-to-bootable-image conversion, but critical issues prevent the creation of functional bootable images. The core problems are GRUB TTY issues, missing kernel files, and bootloader installation failures.
**Project Scope**: This project is building a **Debian-native equivalent to bootc-image-builder** that can process **particle-os containers** (which use OSTree + bootc + bootupd) and convert them to bootable disk images, similar to how ublue-os images get processed by bootc-image-builder.
---
## 🚨 **CRITICAL ISSUES - IMMEDIATE PRIORITY**
### **Issue 1: GRUB TTY Installation Failure** 🚨 **BLOCKING**
- [ ] **Fix GRUB installation TTY prompts in container environment**
- [ ] **Problem**: `grub-install` fails with "Error: short-name resolution enforced but cannot prompt without a TTY"
- [ ] **Root Cause**: Container environment lacks proper TTY for GRUB installation
- [ ] **Attempted Solutions**:
- [x] Removed `--tty` flag from podman run commands
- [x] Added environment variables: `DEBIAN_FRONTEND=noninteractive`, `GRUB_DISABLE_OS_PROBER=true`
- [x] Added GRUB flags: `--force`, `--no-nvram`, `--skip-fs-probe`, `--no-boot-directory-check`
- [x] Created explicit `device.map` file
- [x] Implemented multiple fallback `grub-install` methods
- [x] Used explicit device specification (`/dev/loop0`) in grub-install commands
- [ ] **Current Status**: All attempts failed - fundamental limitation of container environment
- [ ] **Next Steps**: Integrate `bootupd` as alternative bootloader solution
- [ ] **Impact**: **CRITICAL** - Cannot create bootable images without working bootloader
### **Issue 2: Missing Kernel Files** 🚨 **BLOCKING**
- [ ] **Implement kernel file copying from OSTree to boot partition**
- [ ] **Problem**: Kernel and initramfs files not accessible to GRUB
- [ ] **Solution**: Copy kernel files from OSTree location to `/boot` partition
- [ ] **Source Location**: `/usr/lib/ostree-boot` in container image
- [ ] **Target Location**: `/mnt/boot` on separate boot partition
- [ ] **File Types**: vmlinuz-*, initrd.img-*, config-*, System.map-*
- [ ] **Timing**: Must happen before GRUB installation
- [ ] **Status**: ✅ **IMPLEMENTED** - `copyKernelFiles` function created
- [ ] **Impact**: **CRITICAL** - GRUB cannot find kernel files to boot
### **Issue 3: Bootloader Configuration Generation** 🚨 **BLOCKING**
- [ ] **Fix GRUB configuration generation**
- [ ] **Problem**: GRUB configuration not properly generated
- [ ] **Solution**: Use `grub-mkconfig` to generate proper configuration
- [ ] **Status**: ✅ **IMPLEMENTED** - `generateGRUBConfig` function created
- [ ] **Impact**: **CRITICAL** - System cannot boot without proper GRUB configuration
---
## ✅ **COMPLETED MILESTONES**
### **Phase 1: Analysis & Architecture** ✅ COMPLETE
@ -94,94 +131,166 @@
- ✅ Basic bootloader installation working
- ✅ Images recognized as bootable by QEMU
### **Phase 5: Repository Cleanup & Structure Alignment** 🧹 **IN PROGRESS**
- [ ] **Analyze original repository structure** 🔄 **IN PROGRESS**
- [x] Review [osbuild/bootc-image-builder](https://github.com/osbuild/bootc-image-builder) structure
- [x] Identify standard directory layout
- [x] Compare with current structure
- [ ] Plan cleanup actions
- [ ] **Clean up file organization**
- [ ] Move scattered test files to proper locations
- [ ] Organize scripts and utilities
- [ ] Consolidate documentation
- [ ] Remove duplicate or obsolete files
- [ ] **Align with original structure**
- [ ] Create `.fmf/` directory for testing
- [ ] Organize `.github/` workflows
- [ ] Standardize `bib/` directory structure
- [ ] Clean up `devel/` directory
- [ ] **Update documentation**
- [ ] Update README.md to reflect new structure
- [ ] Create CONTRIBUTING.md for contributors
- [ ] Standardize documentation layout
### **Phase 5: Repository Cleanup & Structure Alignment** ✅ **COMPLETED!**
- [x] **Analyze original repository structure** ✅ **COMPLETED!**
- ✅ Review [osbuild/bootc-image-builder](https://github.com/osbuild/bootc-image-builder) structure
- ✅ Identify standard directory layout
- ✅ Document structure differences and alignment needs
- [x] **Clean up repository structure** ✅ **COMPLETED!**
- ✅ Remove unused files and directories
- ✅ Organize code into logical modules
- ✅ Standardize file naming conventions
- ✅ Update documentation to reflect current structure
### **Phase 6: Critical Bootable Image Issues** 🚨 **IN PROGRESS**
- [x] **Implement Fedora-style partition layout** ✅ **COMPLETED!**
- ✅ ESP + Boot + Root partition scheme implemented
- ✅ Separate boot partition for atomic system compatibility
- ✅ Optimal architecture for immutable root filesystem
- [x] **Fix permission issues** ✅ **COMPLETED!**
- ✅ OSTree boot directory creation with proper permissions
- ✅ Sudo commands for directory creation and ownership
- [x] **Implement kernel file copying** ✅ **COMPLETED!**
- ✅ Copy kernel files from OSTree to boot partition
- ✅ Support for vmlinuz, initrd, config, and System.map files
- [x] **Create fallback mechanism** ✅ **COMPLETED!**
- ✅ Minimal bootable image creation when GRUB fails
- ✅ Instructions for manual GRUB installation
- [ ] **Resolve GRUB TTY installation issues** 🔄 **IN PROGRESS**
- [ ] **Current Status**: All TTY bypass attempts failed
- [ ] **Next Approach**: Integrate `bootupd` as alternative bootloader
- [ ] **Timeline**: Immediate - blocking all bootable image creation
---
## 🚧 **CURRENT PRIORITIES**
## 🔄 **NEXT PHASES - AFTER CRITICAL ISSUES RESOLVED**
### **Immediate (This Session)**
1. **Repository Structure Analysis** - Complete analysis of original repository
2. **Cleanup Planning** - Create detailed cleanup plan
3. **File Organization** - Begin moving files to proper locations
### **Phase 7: Bootupd Integration** 📋 **PLANNED**
- [ ] **Integrate deb-bootupd as alternative bootloader**
- [ ] **Purpose**: Bypass GRUB TTY issues with modern bootloader
- [ ] **Components**:
- [ ] **deb-bootupd package**: Install and configure deb-bootupd
- [ ] **Bootloader management**: Use bootupd for bootloader updates
- [ ] **OSTree integration**: Configure bootupd for OSTree deployments
- [ ] **Fallback support**: Maintain GRUB as fallback option
- [ ] **Benefits**: Modern bootloader, no TTY issues, better atomic system support
- [ ] **Impact**: **CRITICAL** - Enables bootable image creation
- [ ] **Timing**: Immediate - after current TTY issues are fully documented
### **Short Term (Next 1-2 Sessions)**
1. **Complete File Reorganization** - Move all files to proper locations
2. **Structure Alignment** - Match original repository layout
3. **Documentation Updates** - Update all documentation to reflect new structure
### **Phase 8: Advanced Image Features** 📋 **PLANNED**
- [ ] **Implement additional output formats**
- [ ] **ISO creation**: Bootable ISO images for installation
- [ ] **QCOW2 support**: Virtual machine image format
- [ ] **VMDK support**: VMware compatibility
- [ ] **Raw disk images**: Direct disk writing support
- [ ] **Add image customization options**
- [ ] **Kernel parameters**: Customizable boot parameters
- [ ] **Init system**: systemd configuration options
- [ ] **Network configuration**: Network setup options
- [ ] **User management**: Default user and password configuration
### **Medium Term (Next Week)**
1. **Testing Infrastructure** - Set up proper `.fmf/` testing
2. **CI/CD Integration** - Standardize GitHub Actions
3. **Contributor Experience** - Create clear contribution guidelines
### **Phase 9: Testing and Validation** 📋 **PLANNED**
- [ ] **Implement comprehensive testing framework**
- [ ] **Unit tests**: Individual component testing
- [ ] **Integration tests**: End-to-end workflow testing
- [ ] **Boot testing**: QEMU-based boot validation
- [ ] **Performance testing**: Build time and resource usage optimization
- [ ] **Add validation and error handling**
- [ ] **Input validation**: Recipe and configuration validation
- [ ] **Error reporting**: Clear error messages and debugging information
- [ ] **Recovery mechanisms**: Automatic error recovery where possible
- [ ] **Logging**: Comprehensive logging for troubleshooting
### **Phase 10: Documentation and Deployment** 📋 **PLANNED**
- [ ] **Create comprehensive documentation**
- [ ] **User guide**: Step-by-step usage instructions
- [ ] **Developer guide**: Contributing and development information
- [ ] **API reference**: Detailed API documentation
- [ ] **Examples**: Sample recipes and use cases
- [ ] **Prepare for production deployment**
- [ ] **CI/CD integration**: Automated testing and deployment
- [ ] **Release management**: Versioning and release process
- [ ] **Distribution**: Package distribution and installation
- [ ] **Support**: User support and issue tracking
---
## 🔍 **REPOSITORY CLEANUP ANALYSIS**
## 📊 **PROJECT METRICS**
### **Current Structure Issues**
- **Mixed naming**: `bib/` vs `devel/` directories
- **Scattered tests**: Test files in multiple locations
- **Inconsistent docs**: Documentation spread across directories
- **Missing standards**: No `.fmf/` directory for testing
### **Current Status**
- **Overall Progress**: 75% Complete
- **Critical Issues**: 3 (all blocking)
- **Completed Phases**: 5 out of 10
- **Next Milestone**: Resolve GRUB TTY issues
### **Target Structure (Based on Original)**
```
.
├── .fmf/ # FMF testing framework
├── .github/ # GitHub workflows and templates
├── .tekton/ # Tekton CI/CD pipelines
├── bib/ # Main Go application
├── devel/ # Development tools
├── plans/ # Test plans
├── test/ # Test files
├── Containerfile # Main container
├── Makefile # Build tasks
└── README.md # Project documentation
```
### **Success Metrics**
- [x] **Container extraction**: Working
- [x] **System configuration**: Working
- [x] **Image creation**: Working
- [x] **Partition management**: Working
- [x] **Kernel file handling**: Working
- [ ] **Bootloader installation**: **FAILING** (TTY issues)
- [ ] **Bootable image creation**: **BLOCKED** (bootloader issues)
### **Cleanup Actions Needed**
1. **Create `.fmf/` directory** for standardized testing
2. **Organize test files** into proper `test/` directory
3. **Consolidate scripts** into logical groups
4. **Standardize documentation** layout
5. **Remove obsolete files** and duplicates
### **Risk Assessment**
- **High Risk**: GRUB TTY issues preventing bootable image creation
- **Medium Risk**: Dependency on external bootupd integration
- **Low Risk**: Core image creation and configuration functionality
---
## 📋 **NEXT STEPS**
## 🎯 **IMMEDIATE ACTION ITEMS**
1. **Complete repository structure analysis**
2. **Create detailed cleanup plan**
3. **Begin file reorganization**
4. **Update documentation**
5. **Validate new structure**
### **Priority 1: Critical Issues (This Week)**
1. **Document all GRUB TTY bypass attempts** ✅ **COMPLETED**
2. **Implement bootupd integration** 🔄 **IN PROGRESS**
3. **Test bootupd-based bootloader installation**
4. **Validate bootable image creation with bootupd**
### **Priority 2: Testing and Validation (Next Week)**
1. **Test bootupd integration in Debian container environment**
2. **Validate bootable image creation end-to-end**
3. **Document bootupd integration process**
4. **Update testing framework for bootupd**
### **Priority 3: Documentation and Deployment (Following Week)**
1. **Update project documentation**
2. **Create user guides for bootupd integration**
3. **Prepare release notes**
4. **Plan next development phase**
---
## 🎯 **SUCCESS CRITERIA**
## 🔗 **RELATED PROJECTS**
- [ ] Repository structure matches original osbuild/bootc-image-builder
- [ ] All files properly organized in standard locations
- [ ] Documentation reflects new structure
- [ ] Contributor experience improved
- [ ] Ready for community contributions
### **Dependencies**
- **deb-bootupd**: Alternative bootloader solution
- **apt-ostree**: OSTree package management
- **debian-atomic-configs**: System configuration
### **Integration Points**
- **particle-os**: Target container format
- **bootc**: Container boot specification
- **OSTree**: Atomic update system
---
## 📝 **NOTES AND OBSERVATIONS**
### **Key Insights**
- **Fedora-style partition layout is optimal** for atomic systems
- **Container environment limitations** require alternative bootloader approaches
- **bootupd integration** is the most promising solution for TTY issues
- **Current architecture is correct** - implementation issues need resolution
### **Lessons Learned**
- **GRUB TTY issues** are fundamental to container environments
- **Permission handling** requires careful sudo usage
- **Kernel file copying** is critical for bootloader functionality
- **Fallback mechanisms** are essential for robust image creation
### **Future Considerations**
- **VM-based development** recommended for bootloader testing
- **bootupd integration** should be the primary bootloader approach
- **GRUB fallback** should be maintained for compatibility
- **Testing environment** should include real hardware validation