Last active
January 8, 2022 14:00
-
-
Save sierra-tango-echo/df66f2386825672cfb471efeed3d8023 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
rpm -ivh http://10.10.0.1/deployment/files/ilorest-3.3.0-78.x86_64.rpm | |
curl http://10.10.0.1/deployment/files/hpbios.json > /tmp/hpbios.json | |
curl http://10.10.0.1/deployment/files/apollo_BIOS_settings.txt > /tmp/apollo_BIOS_settings.txt | |
curl http://10.10.0.1/deployment/files/ilorest_setbios_to_knowngood.sh > /tmp/ilorest_setbios_to_knowngood.sh | |
ilorest login | |
ilorest serverclone load --auto -f /tmp/hpbios.json | |
ilorest commit | |
bash /tmp/ilorest_setbios_to_knowngood.sh /tmp/apollo_BIOS_settings.txt | |
one=`efibootmgr | grep "25Gb SFP28 OCP 3.0 Ethernet (PXE IPv4)" | awk '{ print $1 }' | sed -e 's/^Boot//g' | sed -e 's/\*$//g'` | |
two=`efibootmgr | grep "Intel(R) I350 Gigabit Network Connection (PXE IPv4)" | awk '{ print $1 }' | sed -e 's/^Boot//g' | sed -e 's/\*$//g'` | |
three=`efibootmgr | grep "CentOS" | awk '{ print $1 }' | sed -e 's/^Boot//g' | sed -e 's/\*$//g'` | |
efibootmgr | grep ^Boot0 | while read n; do a=`echo $n | awk '{ print $1 }' | sed -e 's/^Boot//g' | sed -e 's/\*$//g'`; efibootmgr -A -b $a ; done | |
efibootmgr -b $one -a | |
efibootmgr -b $two -a | |
efibootmgr -b $three -a | |
efibootmgr --bootorder $three,$one,$two | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment