forked from coreos/bootupd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
efi.rs: support updating multiple EFIs in mirrored setups(RAID1)
The EFI System Partition is not mounted after booted, on systems configured with boot device mirroring, there are independent EFI partitions on each constituent disk, need to mount each disk and updates. But skip updating BIOS in this case. Xref to coreos#132
- Loading branch information
1 parent
848ce44
commit 624f424
Showing
5 changed files
with
161 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
variant: fcos | ||
version: 1.5.0 | ||
boot_device: | ||
mirror: | ||
devices: | ||
- /dev/vda | ||
- /dev/vdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../data/libtest.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
## kola: | ||
## # additionalDisks is only supported on qemu. | ||
## platforms: qemu | ||
## # Root reprovisioning requires at least 4GiB of memory. | ||
## minMemory: 4096 | ||
## # Linear RAID is setup on these disks. | ||
## additionalDisks: ["10G"] | ||
## # This test includes a lot of disk I/O and needs a higher | ||
## # timeout value than the default. | ||
## timeoutMin: 15 | ||
## description: Verify updating multiple EFIs with RAID 1 works. | ||
|
||
set -xeuo pipefail | ||
|
||
# shellcheck disable=SC1091 | ||
. "$KOLA_EXT_DATA/libtest.sh" | ||
|
||
srcdev=$(findmnt -nvr /sysroot -o SOURCE) | ||
[[ ${srcdev} == "/dev/md126" ]] | ||
|
||
blktype=$(lsblk -o TYPE "${srcdev}" --noheadings) | ||
[[ ${blktype} == raid1 ]] | ||
|
||
fstype=$(findmnt -nvr /sysroot -o FSTYPE) | ||
[[ ${fstype} == xfs ]] | ||
ok "source is XFS on RAID1 device" | ||
|
||
|
||
mount -o remount,rw /boot | ||
|
||
rm -f -v /boot/bootupd-state.json | ||
|
||
bootupctl adopt-and-update | grep "Adopted and updated: EFI" | ||
|
||
bootupctl status | grep "Component EFI" | ||
ok "bootupctl adopt-and-update supports multiple EFIs on RAID1" |