mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-11-20 06:52:44 -05:00
add bootloader deployment script
This commit is contained in:
parent
85c5ccc613
commit
2d87e13eb0
1 changed files with 24 additions and 0 deletions
24
deploy-bootloader
Executable file
24
deploy-bootloader
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. shared.sh
|
||||||
|
. hosts.sh
|
||||||
|
. ssh.sh
|
||||||
|
|
||||||
|
for host in ${hosts_all[@]}; do
|
||||||
|
remote=root@$host
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo $host
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [[ ${hosts_uefi[$host]:-false} = true ]]; then
|
||||||
|
rsync boot/loader/loader.conf $remote:/boot/loader/loader.conf
|
||||||
|
rsync boot/loader/entries/arch-lts{,-fallback}.conf $remote:/boot/loader/entries/
|
||||||
|
ssh $remote "SYSTEMD_RELAX_ESP_CHECKS=1 bootctl install && systemctl enable systemd-boot-update.service"
|
||||||
|
else
|
||||||
|
rsync etc/default/grub $remote:/etc/default/grub
|
||||||
|
drive=$(ssh $remote bash -c '[[ -e /dev/sda ]] && echo sda || echo vda')
|
||||||
|
ssh $remote grub-install /dev/$drive
|
||||||
|
ssh $remote grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
fi
|
||||||
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue