Stretch: Manage grub-efi installation
This commit is contained in:
parent
0d52b1b7a1
commit
4fad767821
Binary file not shown.
|
@ -83,6 +83,26 @@ aptitude -y purge '~c'
|
|||
|
||||
## }}}
|
||||
|
||||
# Grub {{{
|
||||
|
||||
## If EFI directory is present
|
||||
EFI_PATH="/boot/efi"
|
||||
if [ -d "${EFI_PATH}" ]; then
|
||||
## Install grub-efi
|
||||
aptitude install -y grub-efi-amd64
|
||||
## Get grub device (keep only some patterns, eg. /dev/sda, /dev/vda, /dev/nvme0n1,…)
|
||||
GRUB_DEVICE=$(sed -n "s;^\(/dev/[a-z]\{3\}\|/dev/nvme[a-z0-9]\{3\}\)\(p[0-9]\|[0-9]\) ${EFI_PATH} .*;\1;p" /etc/mtab)
|
||||
grub-install --target=x86_64-efi "${GRUB_DEVICE}" 2>/dev/null
|
||||
if [ -d "${EFI_PATH}"/EFI ]; then
|
||||
## Copy efi entries to a boot directory
|
||||
mkdir -p -- "${EFI_PATH}"/EFI/boot
|
||||
find "${EFI_PATH}"/EFI/grub -type f -iname "grubx64.efi" -exec cp {} "${EFI_PATH}"/EFI/boot/bootx64.efi \; -quit 2>/dev/null
|
||||
find "${EFI_PATH}"/EFI/debian -type f -iname "grubx64.efi" -exec cp {} "${EFI_PATH}"/EFI/boot/bootx64.efi \; -quit
|
||||
fi
|
||||
fi
|
||||
|
||||
### }}}
|
||||
|
||||
### Rsyslog {{{
|
||||
|
||||
# Install new Rsyslog configuration
|
||||
|
@ -95,7 +115,6 @@ cp -- "${RSYSLOGD_INCLUDE_SRC}"* "${RSYSLOGD_INCLUDE_PATH}"
|
|||
systemctl restart rsyslog
|
||||
|
||||
### }}}
|
||||
|
||||
### Logrotate {{{
|
||||
|
||||
# Install new Logrotate configuration
|
||||
|
|
Loading…
Reference in New Issue