From aa573c4ebccdc24ec9f3f27ed936437bfaa7ca8a Mon Sep 17 00:00:00 2001 From: "Mariano Z." Date: Wed, 4 Jun 2025 14:28:35 -0300 Subject: [PATCH] dev: automated commit - 2025-06-04 14:28:32 --- runs/limine.sh | 53 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/runs/limine.sh b/runs/limine.sh index 1758904..8732759 100755 --- a/runs/limine.sh +++ b/runs/limine.sh @@ -113,9 +113,28 @@ BOOT_ORDER="*, *fallback, Snapshots" ENABLE_SORT=no ENABLE_LIMINE_FALLBACK=no FIND_BOOTLOADERS=yes +ROOT_SNAPSHOTS_PATH="/@snapshots" EOF -print_status "Generating Limine configuration..." +print_status "Creating custom Limine configuration..." +cat >"$ESP_PATH/limine.conf" <<'EOF' +### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md +timeout: 1 +### Note: For "default_entry" to select a sub-entry within an OS menu, modify "/OS name" to "/+OS name" to keep its submenus visible. +default_entry: 2 +#interface_branding_color: 3 +interface_branding: +hash_mismatch_panic: no +term_palette: 1e1e2e;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;cdd6f4 +term_palette_bright: 585b70;f38ba8;a6e3a1;f9e2af;89b4fa;f5c2e7;94e2d5;cdd6f4 +term_background: 1e1e2e +term_foreground: cdd6f4 +term_background_bright: 585b70 +term_foreground_bright: cdd6f4 + +EOF + +print_status "Generating Limine boot entries..." limine-update print_success "Limine configuration created" @@ -137,9 +156,31 @@ else print_warning "Could not find Limine boot entry to set as default" fi -print_status "Keeping systemd-boot as fallback (recommended for first boot)" +print_status "Removing systemd-boot components..." -if [[ -f "$ESP_PATH/limine.conf" ]] || [[ -f "$ESP_PATH/limine.cfg" ]]; then +# Remove systemd-boot UEFI entries +SYSTEMD_ENTRIES=$(efibootmgr | grep -i "Linux Boot Manager\|systemd" | cut -c5-8 || true) +if [[ -n "$SYSTEMD_ENTRIES" ]]; then + for entry in $SYSTEMD_ENTRIES; do + print_status "Removing UEFI boot entry: Boot$entry" + efibootmgr -b "$entry" -B || print_warning "Failed to remove boot entry $entry" + done +fi + +# Remove systemd-boot files from ESP +if [[ -d "$ESP_PATH/EFI/systemd" ]]; then + print_status "Removing systemd-boot EFI files..." + rm -rf "$ESP_PATH/EFI/systemd" + print_success "systemd-boot EFI files removed" +fi + +if [[ -d "$ESP_PATH/loader" ]]; then + print_status "Removing systemd-boot configuration..." + rm -rf "$ESP_PATH/loader" + print_success "systemd-boot configuration removed" +fi + +if [[ -f "$ESP_PATH/limine.conf" ]]; then print_success "Limine configuration file exists" else print_error "Limine configuration file missing!" @@ -151,6 +192,9 @@ else print_error "Limine EFI bootloader missing!" fi +sudo pacman -S snap-pac +sudo systemctl enable --now limine-snapper-sync.service + echo print_success "TRANSITION COMPLETED SUCCESSFULLY!" echo @@ -160,7 +204,8 @@ echo " • Configuration file: $ESP_PATH/limine.conf" echo " • Kernel command line: /etc/kernel/cmdline" echo " • Backup created at: $BACKUP_DIR" echo " • Boot order updated" -echo " • systemd-boot kept as fallback" +echo " • systemd-boot completely removed" echo print_warning "IMPORTANT: Reboot to test the new Limine setup!" +print_warning "systemd-boot has been completely removed - ensure Limine works before removing backup!" print_success "Script completed. Please reboot when ready."