2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-07-31 18:19:40 +00:00

fix(getinstdisk): use an Intel RSTe/VROC software RAID when no other disk is found

On a node whose OS disk is an Intel RSTe/VROC software RAID (/dev/md/Volume0_0
or /dev/md/Volume0), disk auto-detection finds nothing and getinstdisk falls
back to the hard-coded /dev/sda. Prefer the VROC volume over that default.

Only fires when no install disk was otherwise selected and the VROC device
actually exists, so it cannot mis-select over a real disk and has no effect on
non-VROC systems. The original commit hooked into a lenovobuild-specific M.2
detection block absent from master; adapted to master's fallback point.

Not lab-validated (no VROC hardware available).

Recovered from the unmerged lenovobuild branch (c6c70e5).
This commit is contained in:
Vinícius Ferrão
2026-07-23 19:17:49 -03:00
parent cf44f51463
commit 009dac9834
@@ -234,6 +234,14 @@ if [ -z "$install_disk" ]; then
fi
rm -rf $tmpdir;
# Auto-sense an Intel RSTe/VROC software RAID and use it if no other install
# disk was found, before falling back to the hard-coded default below.
if [ -z "$install_disk" ] && [ -b /dev/md/Volume0_0 ]; then
install_disk="/dev/md/Volume0_0"
elif [ -z "$install_disk" ] && [ -b /dev/md/Volume0 ]; then
install_disk="/dev/md/Volume0"
fi
# Cannot find proper disk for OS install, select the default one "/dev/sda"
if [ -z "$install_disk" ]; then
install_disk="/dev/sda"