feat(bootloader): implement Limine as exclusive bootloader with superior btrfs support
- commit
- de2851021d3f5147919a723e544bc07dd26715ad
- author
- bnema · · 2025-10-19 07:35 UTC
- parent
- 59830f2
- signature
- unsigned
6 files · +112 -104
M README.md +17 -17
| @@ -7,6 +7,7 @@ | |||
| 7 | 7 | ✅ **Phase 0: Core Infrastructure - COMPLETE** | |
| 8 | 8 | ✅ **Phase 1: Barebone Installer - Basic - COMPLETE** | |
| 9 | 9 | ✅ **Phase 2: Add btrfs + LUKS Encryption - COMPLETE** | |
| 10 | + | ✅ **Phase 3: Limine Bootloader - COMPLETE** | |
| 10 | 11 | ||
| 11 | 12 | ### Completed | |
| 12 | 13 | - ✅ Project structure created | |
| @@ -15,12 +16,12 @@ | |||
| 15 | 16 | - ✅ Barebone package list (~15 packages) | |
| 16 | 17 | - ✅ Logo designed | |
| 17 | 18 | - ✅ System guards (vanilla Arch, UEFI, x86_64, Secure Boot checks) | |
| 18 | - | - ✅ Bootloader selection (systemd-boot or limine) | |
| 19 | + | - ✅ Limine bootloader (exclusive - superior btrfs support) | |
| 19 | 20 | - ✅ Auto-partitioning (GPT, EFI + root) | |
| 20 | 21 | - ✅ Base system installation (pacstrap + fstab) | |
| 21 | 22 | - ✅ System configuration (timezone, locale, hostname, user creation) | |
| 22 | 23 | - ✅ Network configuration (systemd-networkd + iwd) | |
| 23 | - | - ✅ Bootloader installation (systemd-boot with boot entries) | |
| 24 | + | - ✅ Limine bootloader installation with UEFI boot entries | |
| 24 | 25 | - ✅ btrfs filesystem with subvolumes (@ for root, @home for home) | |
| 25 | 26 | - ✅ LUKS encryption with Argon2id (optional, 2000ms iteration) | |
| 26 | 27 | - ✅ Encrypted boot support (mkinitcpio hooks) | |
| @@ -127,15 +128,14 @@ sudo ./install.sh | |||
| 127 | 128 | ||
| 128 | 129 | **What the installer does:** | |
| 129 | 130 | 1. Validates system (vanilla Arch ISO, UEFI, x86_64) | |
| 130 | - | 2. Asks for bootloader preference (systemd-boot or limine) | |
| 131 | - | 3. Asks for encryption preference (optional LUKS with Argon2id) | |
| 132 | - | 4. Selects installation disk (auto-partitions with GPT) | |
| 133 | - | 5. Formats partitions (FAT32 EFI + btrfs root with optional LUKS) | |
| 134 | - | 6. Creates btrfs subvolumes (@ for root, @home for home) | |
| 135 | - | 7. Installs ~15 base packages with pacstrap (+ cryptsetup if encrypted) | |
| 136 | - | 8. Configures system (timezone, locale, hostname, user) | |
| 137 | - | 9. Installs systemd-boot bootloader (with encryption support if enabled) | |
| 138 | - | 10. Creates bootable minimal Arch system | |
| 131 | + | 2. Asks for encryption preference (optional LUKS with Argon2id) | |
| 132 | + | 3. Selects installation disk (auto-partitions with GPT) | |
| 133 | + | 4. Formats partitions (FAT32 EFI + btrfs root with optional LUKS) | |
| 134 | + | 5. Creates btrfs subvolumes (@ for root, @home for home) | |
| 135 | + | 6. Installs ~15 base packages with pacstrap (+ cryptsetup if encrypted) | |
| 136 | + | 7. Configures system (timezone, locale, hostname, user) | |
| 137 | + | 8. Installs Limine bootloader (with encryption support if enabled) | |
| 138 | + | 9. Creates bootable minimal Arch system with btrfs | |
| 139 | 139 | ||
| 140 | 140 | ## Environment Variables | |
| 141 | 141 | ||
| @@ -145,12 +145,12 @@ sudo ./install.sh | |||
| 145 | 145 | ||
| 146 | 146 | ## Next Steps | |
| 147 | 147 | ||
| 148 | - | **Phase 3: Add Limine Bootloader Option** (Week 3) | |
| 149 | - | - [ ] Support Limine as alternative to systemd-boot | |
| 150 | - | - [ ] Create install/boot/limine.sh script | |
| 151 | - | - [ ] Configure limine.conf for UEFI | |
| 152 | - | - [ ] Add encryption support for Limine | |
| 153 | - | - [ ] Test both bootloaders with encryption | |
| 148 | + | **Phase 4: Kernel Selection + Microcode** (Week 3) | |
| 149 | + | - [ ] Let user choose kernel (linux, linux-lts, linux-zen) | |
| 150 | + | - [ ] Auto-detect CPU (Intel/AMD) | |
| 151 | + | - [ ] Auto-install appropriate microcode (intel-ucode/amd-ucode) | |
| 152 | + | - [ ] For AMD: Add pstate and governor selection | |
| 153 | + | - [ ] Test all kernels boot successfully | |
| 154 | 154 | ||
| 155 | 155 | ## Reference | |
| 156 | 156 | ||
| @@ -7,6 +7,7 @@ | |||||
| 7 | ✅ **Phase 0: Core Infrastructure - COMPLETE** | 7 | ✅ **Phase 0: Core Infrastructure - COMPLETE** | ||
| 8 | ✅ **Phase 1: Barebone Installer - Basic - COMPLETE** | 8 | ✅ **Phase 1: Barebone Installer - Basic - COMPLETE** | ||
| 9 | ✅ **Phase 2: Add btrfs + LUKS Encryption - COMPLETE** | 9 | ✅ **Phase 2: Add btrfs + LUKS Encryption - COMPLETE** | ||
| 10 | + | ✅ **Phase 3: Limine Bootloader - COMPLETE** | |||
| 10 | 11 | ||||
| 11 | ### Completed | 12 | ### Completed | ||
| 12 | - ✅ Project structure created | 13 | - ✅ Project structure created | ||
| @@ -15,12 +16,12 @@ | |||||
| 15 | - ✅ Barebone package list (~15 packages) | 16 | - ✅ Barebone package list (~15 packages) | ||
| 16 | - ✅ Logo designed | 17 | - ✅ Logo designed | ||
| 17 | - ✅ System guards (vanilla Arch, UEFI, x86_64, Secure Boot checks) | 18 | - ✅ System guards (vanilla Arch, UEFI, x86_64, Secure Boot checks) | ||
| 18 | - | - ✅ Bootloader selection (systemd-boot or limine) | 19 | + | - ✅ Limine bootloader (exclusive - superior btrfs support) |
| 19 | - ✅ Auto-partitioning (GPT, EFI + root) | 20 | - ✅ Auto-partitioning (GPT, EFI + root) | ||
| 20 | - ✅ Base system installation (pacstrap + fstab) | 21 | - ✅ Base system installation (pacstrap + fstab) | ||
| 21 | - ✅ System configuration (timezone, locale, hostname, user creation) | 22 | - ✅ System configuration (timezone, locale, hostname, user creation) | ||
| 22 | - ✅ Network configuration (systemd-networkd + iwd) | 23 | - ✅ Network configuration (systemd-networkd + iwd) | ||
| 23 | - | - ✅ Bootloader installation (systemd-boot with boot entries) | 24 | + | - ✅ Limine bootloader installation with UEFI boot entries |
| 24 | - ✅ btrfs filesystem with subvolumes (@ for root, @home for home) | 25 | - ✅ btrfs filesystem with subvolumes (@ for root, @home for home) | ||
| 25 | - ✅ LUKS encryption with Argon2id (optional, 2000ms iteration) | 26 | - ✅ LUKS encryption with Argon2id (optional, 2000ms iteration) | ||
| 26 | - ✅ Encrypted boot support (mkinitcpio hooks) | 27 | - ✅ Encrypted boot support (mkinitcpio hooks) | ||
| @@ -127,15 +128,14 @@ sudo ./install.sh | |||||
| 127 | 128 | ||||
| 128 | **What the installer does:** | 129 | **What the installer does:** | ||
| 129 | 1. Validates system (vanilla Arch ISO, UEFI, x86_64) | 130 | 1. Validates system (vanilla Arch ISO, UEFI, x86_64) | ||
| 130 | - | 2. Asks for bootloader preference (systemd-boot or limine) | 131 | + | 2. Asks for encryption preference (optional LUKS with Argon2id) |
| 131 | - | 3. Asks for encryption preference (optional LUKS with Argon2id) | 132 | + | 3. Selects installation disk (auto-partitions with GPT) |
| 132 | - | 4. Selects installation disk (auto-partitions with GPT) | 133 | + | 4. Formats partitions (FAT32 EFI + btrfs root with optional LUKS) |
| 133 | - | 5. Formats partitions (FAT32 EFI + btrfs root with optional LUKS) | 134 | + | 5. Creates btrfs subvolumes (@ for root, @home for home) |
| 134 | - | 6. Creates btrfs subvolumes (@ for root, @home for home) | 135 | + | 6. Installs ~15 base packages with pacstrap (+ cryptsetup if encrypted) |
| 135 | - | 7. Installs ~15 base packages with pacstrap (+ cryptsetup if encrypted) | 136 | + | 7. Configures system (timezone, locale, hostname, user) |
| 136 | - | 8. Configures system (timezone, locale, hostname, user) | 137 | + | 8. Installs Limine bootloader (with encryption support if enabled) |
| 137 | - | 9. Installs systemd-boot bootloader (with encryption support if enabled) | 138 | + | 9. Creates bootable minimal Arch system with btrfs |
| 138 | - | 10. Creates bootable minimal Arch system | |||
| 139 | 139 | ||||
| 140 | ## Environment Variables | 140 | ## Environment Variables | ||
| 141 | 141 | ||||
| @@ -145,12 +145,12 @@ sudo ./install.sh | |||||
| 145 | 145 | ||||
| 146 | ## Next Steps | 146 | ## Next Steps | ||
| 147 | 147 | ||||
| 148 | - | **Phase 3: Add Limine Bootloader Option** (Week 3) | 148 | + | **Phase 4: Kernel Selection + Microcode** (Week 3) |
| 149 | - | - [ ] Support Limine as alternative to systemd-boot | 149 | + | - [ ] Let user choose kernel (linux, linux-lts, linux-zen) |
| 150 | - | - [ ] Create install/boot/limine.sh script | 150 | + | - [ ] Auto-detect CPU (Intel/AMD) |
| 151 | - | - [ ] Configure limine.conf for UEFI | 151 | + | - [ ] Auto-install appropriate microcode (intel-ucode/amd-ucode) |
| 152 | - | - [ ] Add encryption support for Limine | 152 | + | - [ ] For AMD: Add pstate and governor selection |
| 153 | - | - [ ] Test both bootloaders with encryption | 153 | + | - [ ] Test all kernels boot successfully |
| 154 | 154 | ||||
| 155 | ## Reference | 155 | ## Reference | ||
| 156 | 156 | ||||
M install/boot/all.sh +2 -8
| @@ -1,11 +1,5 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | # Bootloader phase orchestrator | |
| 3 | - | # Phase 1: systemd-boot only (Limine support comes in Phase 3) | |
| 3 | + | # archup uses Limine exclusively for its superior btrfs and snapshot support | |
| 4 | 4 | ||
| 5 | - | if [ "$ARCHUP_BOOTLOADER" = "systemd-boot" ]; then | |
| 6 | - | run_logged "$ARCHUP_INSTALL/boot/systemd-boot.sh" | |
| 7 | - | else | |
| 8 | - | # For Phase 1, we only support systemd-boot | |
| 9 | - | gum style --foreground 3 --padding "1 0 1 $PADDING_LEFT" "Note: Limine support coming in Phase 3. Installing systemd-boot..." | |
| 10 | - | run_logged "$ARCHUP_INSTALL/boot/systemd-boot.sh" | |
| 11 | - | fi | |
| 5 | + | run_logged "$ARCHUP_INSTALL/boot/limine.sh" | |
| @@ -1,11 +1,5 @@ | |||||
| 1 | #!/bin/bash | 1 | #!/bin/bash | ||
| 2 | # Bootloader phase orchestrator | 2 | # Bootloader phase orchestrator | ||
| 3 | - | # Phase 1: systemd-boot only (Limine support comes in Phase 3) | 3 | + | # archup uses Limine exclusively for its superior btrfs and snapshot support |
| 4 | 4 | ||||
| 5 | - | if [ "$ARCHUP_BOOTLOADER" = "systemd-boot" ]; then | 5 | + | run_logged "$ARCHUP_INSTALL/boot/limine.sh" |
| 6 | - | run_logged "$ARCHUP_INSTALL/boot/systemd-boot.sh" | |||
| 7 | - | else | |||
| 8 | - | # For Phase 1, we only support systemd-boot | |||
| 9 | - | gum style --foreground 3 --padding "1 0 1 $PADDING_LEFT" "Note: Limine support coming in Phase 3. Installing systemd-boot..." | |||
| 10 | - | run_logged "$ARCHUP_INSTALL/boot/systemd-boot.sh" | |||
| 11 | - | fi | |||
A install/boot/limine.sh +85 -0
| @@ -0,0 +1,85 @@ | |||
| 1 | + | #!/bin/bash | |
| 2 | + | # Install and configure Limine bootloader | |
| 3 | + | ||
| 4 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Installing Limine bootloader..." | |
| 5 | + | ||
| 6 | + | # Determine root device UUID and prepare kernel parameters | |
| 7 | + | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |
| 8 | + | # For encrypted setups, we need the root partition UUID (before LUKS) | |
| 9 | + | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |
| 10 | + | ||
| 11 | + | # Update mkinitcpio.conf to add encrypt hook | |
| 12 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring initramfs for encryption..." | |
| 13 | + | ||
| 14 | + | # Add encrypt hook before filesystems hook | |
| 15 | + | sed -i 's/^HOOKS=.*/HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)/' /mnt/etc/mkinitcpio.conf | |
| 16 | + | ||
| 17 | + | # Regenerate initramfs | |
| 18 | + | arch-chroot /mnt mkinitcpio -P | |
| 19 | + | ||
| 20 | + | echo "Updated mkinitcpio.conf with encrypt hook" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 21 | + | ||
| 22 | + | # Kernel parameters for encrypted boot | |
| 23 | + | KERNEL_PARAMS="cryptdevice=UUID=$ROOT_UUID:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=@ rw" | |
| 24 | + | else | |
| 25 | + | # For non-encrypted setups, use the root partition UUID directly | |
| 26 | + | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |
| 27 | + | KERNEL_PARAMS="root=UUID=$ROOT_UUID rootflags=subvol=@ rw" | |
| 28 | + | fi | |
| 29 | + | ||
| 30 | + | # Install Limine to the disk (UEFI) | |
| 31 | + | arch-chroot /mnt limine bios-install "$ARCHUP_DISK" | |
| 32 | + | ||
| 33 | + | # Create Limine configuration directory | |
| 34 | + | mkdir -p /mnt/boot/EFI/BOOT | |
| 35 | + | ||
| 36 | + | # Create Limine configuration with proper syntax | |
| 37 | + | cat > /mnt/boot/EFI/BOOT/limine.conf <<EOF | |
| 38 | + | # archup - Limine bootloader configuration | |
| 39 | + | # Docs: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md | |
| 40 | + | ||
| 41 | + | timeout: 5 | |
| 42 | + | default_entry: 0 | |
| 43 | + | interface_branding: archup | |
| 44 | + | interface_branding_colour: 6 | |
| 45 | + | graphics: yes | |
| 46 | + | quiet: yes | |
| 47 | + | ||
| 48 | + | # Arch Linux | |
| 49 | + | :Arch Linux | |
| 50 | + | protocol: linux | |
| 51 | + | kernel_path: boot():/vmlinuz-linux | |
| 52 | + | module_path: boot():/initramfs-linux.img | |
| 53 | + | cmdline: $KERNEL_PARAMS | |
| 54 | + | ||
| 55 | + | # Arch Linux (fallback) | |
| 56 | + | :Arch Linux (fallback) | |
| 57 | + | protocol: linux | |
| 58 | + | kernel_path: boot():/vmlinuz-linux | |
| 59 | + | module_path: boot():/initramfs-linux-fallback.img | |
| 60 | + | cmdline: $KERNEL_PARAMS | |
| 61 | + | EOF | |
| 62 | + | ||
| 63 | + | # Copy Limine EFI bootloader | |
| 64 | + | cp /mnt/usr/share/limine/BOOTX64.EFI /mnt/boot/EFI/BOOT/ | |
| 65 | + | ||
| 66 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Creating UEFI boot entry..." | |
| 67 | + | ||
| 68 | + | # Detect EFI partition number (usually 1) | |
| 69 | + | EFI_PART_NUM=$(echo "$ARCHUP_EFI_PART" | grep -o '[0-9]*$' | sed 's/^p//') | |
| 70 | + | ||
| 71 | + | # Add UEFI boot entry using efibootmgr | |
| 72 | + | # Limine doesn't automatically create NVRAM entry, we need to do it manually | |
| 73 | + | arch-chroot /mnt efibootmgr --create \ | |
| 74 | + | --disk "$ARCHUP_DISK" \ | |
| 75 | + | --part "$EFI_PART_NUM" \ | |
| 76 | + | --label "archup" \ | |
| 77 | + | --loader "\\EFI\\BOOT\\BOOTX64.EFI" | |
| 78 | + | ||
| 79 | + | gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "✓ Limine installed and configured" | |
| 80 | + | ||
| 81 | + | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |
| 82 | + | echo "Installed Limine with encrypted root (UUID: $ROOT_UUID)" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 83 | + | else | |
| 84 | + | echo "Installed Limine with root UUID: $ROOT_UUID" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 85 | + | fi | |
| @@ -0,0 +1,85 @@ | |||||
| 1 | + | #!/bin/bash | |||
| 2 | + | # Install and configure Limine bootloader | |||
| 3 | + | ||||
| 4 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Installing Limine bootloader..." | |||
| 5 | + | ||||
| 6 | + | # Determine root device UUID and prepare kernel parameters | |||
| 7 | + | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |||
| 8 | + | # For encrypted setups, we need the root partition UUID (before LUKS) | |||
| 9 | + | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |||
| 10 | + | ||||
| 11 | + | # Update mkinitcpio.conf to add encrypt hook | |||
| 12 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring initramfs for encryption..." | |||
| 13 | + | ||||
| 14 | + | # Add encrypt hook before filesystems hook | |||
| 15 | + | sed -i 's/^HOOKS=.*/HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)/' /mnt/etc/mkinitcpio.conf | |||
| 16 | + | ||||
| 17 | + | # Regenerate initramfs | |||
| 18 | + | arch-chroot /mnt mkinitcpio -P | |||
| 19 | + | ||||
| 20 | + | echo "Updated mkinitcpio.conf with encrypt hook" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |||
| 21 | + | ||||
| 22 | + | # Kernel parameters for encrypted boot | |||
| 23 | + | KERNEL_PARAMS="cryptdevice=UUID=$ROOT_UUID:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=@ rw" | |||
| 24 | + | else | |||
| 25 | + | # For non-encrypted setups, use the root partition UUID directly | |||
| 26 | + | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |||
| 27 | + | KERNEL_PARAMS="root=UUID=$ROOT_UUID rootflags=subvol=@ rw" | |||
| 28 | + | fi | |||
| 29 | + | ||||
| 30 | + | # Install Limine to the disk (UEFI) | |||
| 31 | + | arch-chroot /mnt limine bios-install "$ARCHUP_DISK" | |||
| 32 | + | ||||
| 33 | + | # Create Limine configuration directory | |||
| 34 | + | mkdir -p /mnt/boot/EFI/BOOT | |||
| 35 | + | ||||
| 36 | + | # Create Limine configuration with proper syntax | |||
| 37 | + | cat > /mnt/boot/EFI/BOOT/limine.conf <<EOF | |||
| 38 | + | # archup - Limine bootloader configuration | |||
| 39 | + | # Docs: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md | |||
| 40 | + | ||||
| 41 | + | timeout: 5 | |||
| 42 | + | default_entry: 0 | |||
| 43 | + | interface_branding: archup | |||
| 44 | + | interface_branding_colour: 6 | |||
| 45 | + | graphics: yes | |||
| 46 | + | quiet: yes | |||
| 47 | + | ||||
| 48 | + | # Arch Linux | |||
| 49 | + | :Arch Linux | |||
| 50 | + | protocol: linux | |||
| 51 | + | kernel_path: boot():/vmlinuz-linux | |||
| 52 | + | module_path: boot():/initramfs-linux.img | |||
| 53 | + | cmdline: $KERNEL_PARAMS | |||
| 54 | + | ||||
| 55 | + | # Arch Linux (fallback) | |||
| 56 | + | :Arch Linux (fallback) | |||
| 57 | + | protocol: linux | |||
| 58 | + | kernel_path: boot():/vmlinuz-linux | |||
| 59 | + | module_path: boot():/initramfs-linux-fallback.img | |||
| 60 | + | cmdline: $KERNEL_PARAMS | |||
| 61 | + | EOF | |||
| 62 | + | ||||
| 63 | + | # Copy Limine EFI bootloader | |||
| 64 | + | cp /mnt/usr/share/limine/BOOTX64.EFI /mnt/boot/EFI/BOOT/ | |||
| 65 | + | ||||
| 66 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Creating UEFI boot entry..." | |||
| 67 | + | ||||
| 68 | + | # Detect EFI partition number (usually 1) | |||
| 69 | + | EFI_PART_NUM=$(echo "$ARCHUP_EFI_PART" | grep -o '[0-9]*$' | sed 's/^p//') | |||
| 70 | + | ||||
| 71 | + | # Add UEFI boot entry using efibootmgr | |||
| 72 | + | # Limine doesn't automatically create NVRAM entry, we need to do it manually | |||
| 73 | + | arch-chroot /mnt efibootmgr --create \ | |||
| 74 | + | --disk "$ARCHUP_DISK" \ | |||
| 75 | + | --part "$EFI_PART_NUM" \ | |||
| 76 | + | --label "archup" \ | |||
| 77 | + | --loader "\\EFI\\BOOT\\BOOTX64.EFI" | |||
| 78 | + | ||||
| 79 | + | gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "✓ Limine installed and configured" | |||
| 80 | + | ||||
| 81 | + | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |||
| 82 | + | echo "Installed Limine with encrypted root (UUID: $ROOT_UUID)" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |||
| 83 | + | else | |||
| 84 | + | echo "Installed Limine with root UUID: $ROOT_UUID" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |||
| 85 | + | fi | |||
D install/boot/systemd-boot.sh +0 -63
| @@ -1,63 +0,0 @@ | |||
| 1 | - | #!/bin/bash | |
| 2 | - | # Install and configure systemd-boot | |
| 3 | - | ||
| 4 | - | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Installing systemd-boot..." | |
| 5 | - | ||
| 6 | - | # Install systemd-boot | |
| 7 | - | arch-chroot /mnt bootctl install | |
| 8 | - | ||
| 9 | - | # Determine root device UUID | |
| 10 | - | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |
| 11 | - | # For encrypted setups, we need the root partition UUID (before LUKS) | |
| 12 | - | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |
| 13 | - | ||
| 14 | - | # Update mkinitcpio.conf to add encrypt hook | |
| 15 | - | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring initramfs for encryption..." | |
| 16 | - | ||
| 17 | - | # Add encrypt hook before filesystems hook | |
| 18 | - | sed -i 's/^HOOKS=.*/HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)/' /mnt/etc/mkinitcpio.conf | |
| 19 | - | ||
| 20 | - | # Regenerate initramfs | |
| 21 | - | arch-chroot /mnt mkinitcpio -P | |
| 22 | - | ||
| 23 | - | echo "Updated mkinitcpio.conf with encrypt hook" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 24 | - | ||
| 25 | - | # Kernel parameters for encrypted boot | |
| 26 | - | KERNEL_PARAMS="cryptdevice=UUID=$ROOT_UUID:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=@ rw" | |
| 27 | - | else | |
| 28 | - | # For non-encrypted setups, use the root partition UUID directly | |
| 29 | - | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |
| 30 | - | KERNEL_PARAMS="root=UUID=$ROOT_UUID rootflags=subvol=@ rw" | |
| 31 | - | fi | |
| 32 | - | ||
| 33 | - | # Create loader configuration | |
| 34 | - | cat > /mnt/boot/loader/loader.conf <<EOF | |
| 35 | - | default arch.conf | |
| 36 | - | timeout 3 | |
| 37 | - | console-mode max | |
| 38 | - | editor no | |
| 39 | - | EOF | |
| 40 | - | ||
| 41 | - | # Create boot entry | |
| 42 | - | cat > /mnt/boot/loader/entries/arch.conf <<EOF | |
| 43 | - | title Arch Linux | |
| 44 | - | linux /vmlinuz-linux | |
| 45 | - | initrd /initramfs-linux.img | |
| 46 | - | options $KERNEL_PARAMS | |
| 47 | - | EOF | |
| 48 | - | ||
| 49 | - | # Create fallback boot entry | |
| 50 | - | cat > /mnt/boot/loader/entries/arch-fallback.conf <<EOF | |
| 51 | - | title Arch Linux (fallback) | |
| 52 | - | linux /vmlinuz-linux | |
| 53 | - | initrd /initramfs-linux-fallback.img | |
| 54 | - | options $KERNEL_PARAMS | |
| 55 | - | EOF | |
| 56 | - | ||
| 57 | - | gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "✓ systemd-boot installed and configured" | |
| 58 | - | ||
| 59 | - | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |
| 60 | - | echo "Installed systemd-boot with encrypted root (UUID: $ROOT_UUID)" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 61 | - | else | |
| 62 | - | echo "Installed systemd-boot with root UUID: $ROOT_UUID" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 63 | - | fi | |
| @@ -1,63 +0,0 @@ | |||||
| 1 | - | #!/bin/bash | |||
| 2 | - | # Install and configure systemd-boot | |||
| 3 | - | ||||
| 4 | - | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Installing systemd-boot..." | |||
| 5 | - | ||||
| 6 | - | # Install systemd-boot | |||
| 7 | - | arch-chroot /mnt bootctl install | |||
| 8 | - | ||||
| 9 | - | # Determine root device UUID | |||
| 10 | - | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |||
| 11 | - | # For encrypted setups, we need the root partition UUID (before LUKS) | |||
| 12 | - | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |||
| 13 | - | ||||
| 14 | - | # Update mkinitcpio.conf to add encrypt hook | |||
| 15 | - | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring initramfs for encryption..." | |||
| 16 | - | ||||
| 17 | - | # Add encrypt hook before filesystems hook | |||
| 18 | - | sed -i 's/^HOOKS=.*/HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)/' /mnt/etc/mkinitcpio.conf | |||
| 19 | - | ||||
| 20 | - | # Regenerate initramfs | |||
| 21 | - | arch-chroot /mnt mkinitcpio -P | |||
| 22 | - | ||||
| 23 | - | echo "Updated mkinitcpio.conf with encrypt hook" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |||
| 24 | - | ||||
| 25 | - | # Kernel parameters for encrypted boot | |||
| 26 | - | KERNEL_PARAMS="cryptdevice=UUID=$ROOT_UUID:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=@ rw" | |||
| 27 | - | else | |||
| 28 | - | # For non-encrypted setups, use the root partition UUID directly | |||
| 29 | - | ROOT_UUID=$(blkid -s UUID -o value "$ARCHUP_ROOT_PART") | |||
| 30 | - | KERNEL_PARAMS="root=UUID=$ROOT_UUID rootflags=subvol=@ rw" | |||
| 31 | - | fi | |||
| 32 | - | ||||
| 33 | - | # Create loader configuration | |||
| 34 | - | cat > /mnt/boot/loader/loader.conf <<EOF | |||
| 35 | - | default arch.conf | |||
| 36 | - | timeout 3 | |||
| 37 | - | console-mode max | |||
| 38 | - | editor no | |||
| 39 | - | EOF | |||
| 40 | - | ||||
| 41 | - | # Create boot entry | |||
| 42 | - | cat > /mnt/boot/loader/entries/arch.conf <<EOF | |||
| 43 | - | title Arch Linux | |||
| 44 | - | linux /vmlinuz-linux | |||
| 45 | - | initrd /initramfs-linux.img | |||
| 46 | - | options $KERNEL_PARAMS | |||
| 47 | - | EOF | |||
| 48 | - | ||||
| 49 | - | # Create fallback boot entry | |||
| 50 | - | cat > /mnt/boot/loader/entries/arch-fallback.conf <<EOF | |||
| 51 | - | title Arch Linux (fallback) | |||
| 52 | - | linux /vmlinuz-linux | |||
| 53 | - | initrd /initramfs-linux-fallback.img | |||
| 54 | - | options $KERNEL_PARAMS | |||
| 55 | - | EOF | |||
| 56 | - | ||||
| 57 | - | gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "✓ systemd-boot installed and configured" | |||
| 58 | - | ||||
| 59 | - | if [ "$ARCHUP_ENCRYPTION" = "enabled" ]; then | |||
| 60 | - | echo "Installed systemd-boot with encrypted root (UUID: $ROOT_UUID)" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |||
| 61 | - | else | |||
| 62 | - | echo "Installed systemd-boot with root UUID: $ROOT_UUID" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |||
| 63 | - | fi | |||
M install/preflight/begin.sh +5 -13
| @@ -13,20 +13,12 @@ if ! gum confirm "Ready to begin installation?" --padding "0 0 1 $PADDING_LEFT"; | |||
| 13 | 13 | exit 0 | |
| 14 | 14 | fi | |
| 15 | 15 | ||
| 16 | - | # Ask for bootloader preference (Phase 1 requirement) | |
| 17 | - | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Bootloader Selection" | |
| 18 | - | gum style --padding "0 0 0 $PADDING_LEFT" "archup supports modern bootloaders for UEFI systems:" | |
| 19 | - | echo | |
| 20 | - | ||
| 21 | - | ARCHUP_BOOTLOADER=$(gum choose \ | |
| 22 | - | "systemd-boot" \ | |
| 23 | - | "limine" \ | |
| 24 | - | --header "Select bootloader:" \ | |
| 25 | - | --height 4 \ | |
| 26 | - | --padding "0 0 0 $PADDING_LEFT") | |
| 16 | + | # archup uses Limine bootloader exclusively | |
| 17 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Bootloader: Limine" | |
| 18 | + | gum style --padding "0 0 1 $PADDING_LEFT" "archup uses Limine for superior btrfs and snapshot support" | |
| 27 | 19 | ||
| 28 | - | export ARCHUP_BOOTLOADER | |
| 29 | - | echo "Selected bootloader: $ARCHUP_BOOTLOADER" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 20 | + | export ARCHUP_BOOTLOADER="limine" | |
| 21 | + | echo "Bootloader: limine" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | |
| 30 | 22 | ||
| 31 | 23 | # Ask for encryption preference (Phase 2) | |
| 32 | 24 | echo | |
| @@ -13,20 +13,12 @@ if ! gum confirm "Ready to begin installation?" --padding "0 0 1 $PADDING_LEFT"; | |||||
| 13 | exit 0 | 13 | exit 0 | ||
| 14 | fi | 14 | fi | ||
| 15 | 15 | ||||
| 16 | - | # Ask for bootloader preference (Phase 1 requirement) | 16 | + | # archup uses Limine bootloader exclusively |
| 17 | - | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Bootloader Selection" | 17 | + | gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Bootloader: Limine" |
| 18 | - | gum style --padding "0 0 0 $PADDING_LEFT" "archup supports modern bootloaders for UEFI systems:" | 18 | + | gum style --padding "0 0 1 $PADDING_LEFT" "archup uses Limine for superior btrfs and snapshot support" |
| 19 | - | echo | |||
| 20 | - | ||||
| 21 | - | ARCHUP_BOOTLOADER=$(gum choose \ | |||
| 22 | - | "systemd-boot" \ | |||
| 23 | - | "limine" \ | |||
| 24 | - | --header "Select bootloader:" \ | |||
| 25 | - | --height 4 \ | |||
| 26 | - | --padding "0 0 0 $PADDING_LEFT") | |||
| 27 | 19 | ||||
| 28 | - | export ARCHUP_BOOTLOADER | 20 | + | export ARCHUP_BOOTLOADER="limine" |
| 29 | - | echo "Selected bootloader: $ARCHUP_BOOTLOADER" | tee -a "$ARCHUP_INSTALL_LOG_FILE" | 21 | + | echo "Bootloader: limine" | tee -a "$ARCHUP_INSTALL_LOG_FILE" |
| 30 | 22 | ||||
| 31 | # Ask for encryption preference (Phase 2) | 23 | # Ask for encryption preference (Phase 2) | ||
| 32 | echo | 24 | echo | ||
M install/presets/barebone.packages +3 -3
| @@ -11,9 +11,9 @@ btrfs-progs | |||
| 11 | 11 | # intel-ucode | |
| 12 | 12 | # amd-ucode | |
| 13 | 13 | ||
| 14 | - | # Boot (one will be selected based on user choice) | |
| 15 | - | # limine | |
| 16 | - | # systemd-boot | |
| 14 | + | # Bootloader | |
| 15 | + | limine | |
| 16 | + | efibootmgr | |
| 17 | 17 | ||
| 18 | 18 | # Networking | |
| 19 | 19 | iwd | |
| @@ -11,9 +11,9 @@ btrfs-progs | |||||
| 11 | # intel-ucode | 11 | # intel-ucode | ||
| 12 | # amd-ucode | 12 | # amd-ucode | ||
| 13 | 13 | ||||
| 14 | - | # Boot (one will be selected based on user choice) | 14 | + | # Bootloader |
| 15 | - | # limine | 15 | + | limine |
| 16 | - | # systemd-boot | 16 | + | efibootmgr |
| 17 | 17 | ||||
| 18 | # Networking | 18 | # Networking | ||
| 19 | iwd | 19 | iwd | ||