No description
Find a file
2024-12-09 00:30:30 +05:30
LICENSE Initial commit 2024-12-09 00:25:54 +05:30
raid_bootloader_install.sh Add raid_bootloader_install.sh 2024-12-09 00:26:37 +05:30
README.md Update README.md 2024-12-09 00:30:30 +05:30

RAID Bootloader Installation Script

A robust bash script for implementing RAID1 configuration for EFI boot partitions with multiple bootloader support. Designed for enterprise environments and high-availability systems, particularly optimized for Proxmox deployments.

Features

  • Multiple bootloader support (GRUB, systemd-boot, rEFInd, Limine, LILO)
  • Automatic RAID1 array configuration
  • EFI partition backup and restoration
  • Comprehensive error handling and logging
  • Support for both standard drives and NVMe devices
  • Automated bootloader installation across all specified partitions

Prerequisites

  • Linux-based system (tested on Debian/Ubuntu)
  • Root access
  • mdadm package installed
  • Supported bootloaders installed (as needed)
  • Multiple drives with EFI partitions

Installation

  1. Download the script:
wget https://git.hhf.technology/hhf/raid-bootloader-installer-proxmox/raw/branch/main/raid_bootloader_install.sh
  1. Make the script executable:
chmod +x raid_bootloader_install.sh

Configuration

Edit the script to specify your EFI partitions:

EFI_PARTITIONS=(
    "/dev/sdd2"
    "/dev/sdb2"
    "/dev/nvme2n1p2"
    "/dev/sdc2"
    "/dev/nvme1n1p2"
    "/dev/sda2"
)

Usage

Run the script as root:

sudo ./raid_bootloader_install.sh

Logging

The script logs all operations to:

  • Console output
  • /var/log/raid_bootloader_install.log

Safety Features

  • Automated backup of EFI contents before operations
  • Comprehensive error checking
  • Safe mount/unmount operations
  • Verification of root privileges

Support

For bugs, feature requests, or support, please create an post in the forum comments.

License

MIT License - See LICENSE file for details

Disclaimer

This script modifies boot configurations and RAID arrays. Always backup your data before use. Test in a non-production environment first.