|
|
@@ -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..."
|
|
|
+
|
|
|
+# 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 [[ -f "$ESP_PATH/limine.conf" ]] || [[ -f "$ESP_PATH/limine.cfg" ]]; then
|
|
|
+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."
|