Bootloader switcher script added and consequential change to tab TOML file.
Type of Change
- [x] New feature
- [ ] Bug fix
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Hotfix
- [ ] Security patch
- [ ] UI/UX improvement
Description
The Bootloader Switcher script provides functionality to switch between GRUB and systemd-boot bootloaders, offering automatic detection of the current bootloader, creating backups of the configurations, and restoring them when needed.
Key Features:
- Detects current bootloader (GRUB or systemd-boot).
- Switch between GRUB and systemd-boot with backups of current configurations.
- Provides backup and restore options for both GRUB and systemd-boot.
- User-friendly interactive menu for selecting actions (switching or restoring).
- Handles bootloader installation for multiple distributions (Debian, Ubuntu, Arch, Fedora).
Consequential Change:
- The
tab_dataTOML file has been updated to accommodate this new functionality and ensure seamless integration with the system.
Testing
- Tested on Arch Linux for switching between GRUB and systemd-boot.
- Verified backup and restore processes by restoring from previously created backups.
- Ran script in interactive mode and tested all menu options (switching bootloaders, restoring backups).
Impact
This script simplifies managing bootloaders, reducing manual steps for installation, backup, and restoration. The impact includes better flexibility for users on multi-boot systems or those who want to switch between bootloaders easily.
Issue related to PR
- Resolves #309
- Resolves #256
Additional Information
No additional information at this time.
Checklist
- [x] My code adheres to the coding and style guidelines of the project.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [x] My changes generate no errors/warnings/merge conflicts.
@fam007e I think you should rewrite the script yourself. Without using LLMs.
You should use "%b\n" with every printf here. Draft this for now.
You have conflicts that need fixing.