meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:grub:uefi [2025/03/24 10:11] – created niziak | linux:grub:uefi [2025/03/24 10:28] (current) – niziak | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== UEFI multi disc ===== | ===== UEFI multi disc ===== | ||
| - | |||
| - | Probably the best method is to use md raid, where content of disc is really mirrored (the same MBR, EFI partitions content). | ||
| - | But try to do it without mdadm. | ||
| How to handle redundant boot from multiple discs ? | How to handle redundant boot from multiple discs ? | ||
| Line 24: | Line 21: | ||
| Add new partitions to fstab: | Add new partitions to fstab: | ||
| <file ini / | <file ini / | ||
| - | UUID=D12D-CBBD | + | UUID=xxxx-xxxx |
| - | UUID=D150-1EE7 | + | UUID=D12D-CBBD |
| + | UUID=D150-1EE7 | ||
| </ | </ | ||
| + | <file bash grub_update.sh> | ||
| + | #!/bin/bash -eu | ||
| + | |||
| + | DEVICES=( \ | ||
| + | "/ | ||
| + | "/ | ||
| + | "/ | ||
| + | ) | ||
| + | |||
| + | for DEVLINE in " | ||
| + | |||
| + | read -r DEV BOOTDIR <<< | ||
| + | grub-install --target=x86_64-efi --efi-directory=/ | ||
| + | |||
| + | done | ||
| + | </ | ||
| + | |||
| + | According to [[https:// | ||
| + | |||
| + | <file bash / | ||
| + | #!/bin/bash | ||
| + | |||
| + | # https:// | ||
| + | set -e | ||
| + | |||
| + | # $1 - dest efi mount point | ||
| + | copy_efi_to() { | ||
| + | if mountpoint --quiet --nofollow /boot/efi; then | ||
| + | mount " | ||
| + | rsync --times --recursive --delete /boot/efi/ " | ||
| + | # Being FAT it is even better when not mounted, won't be damaged in case of computer crash or power outage. | ||
| + | # Ref: https:// | ||
| + | umount " | ||
| + | fi | ||
| + | } | ||
| + | |||
| + | copy_efi_to /boot/efi0 | ||
| + | copy_efi_to /boot/efi1 | ||
| + | exit 0 | ||
| + | |||
| + | </ | ||