diff options
author | Irina Gómez <irinagomez@us.es> | 2019-04-25 11:22:44 +0200 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-04-25 11:22:44 +0200 |
commit | b0a7050136d336391db2f38718e3f34f4ab9a99f (patch) | |
tree | 15bbcac8ca792604897ff2dddcf9c5aa13ec4c71 /client/engine/Boot.lib | |
parent | 528ff4ca943d3f439d18d6d467c699329bece768 (diff) |
#802 #888 If UEFI active, always installs rEFInd and sets it as bootloader (NVRAM) second entry. New Nvram management functions: Add new entry, get and set de next boot entry.
Diffstat (limited to 'client/engine/Boot.lib')
-rwxr-xr-x | client/engine/Boot.lib | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib index 3e573acb..47a3ee33 100755 --- a/client/engine/Boot.lib +++ b/client/engine/Boot.lib @@ -2717,6 +2717,12 @@ else [ -d $REFINDDIR ] || ogRaiseError $OG_ERR_NOTFOUND "refind-install or $REFINDDIR" || return $? cp -r $REFINDDIR $EFIDIR fi +# Creamos entrada en NVRAM +ogNvramAddEntry refind /EFI/refind/grubx64.efi +# La ponemos en el segundo lugar del orden de arranque +NUMENTRY=$(efibootmgr |awk '{ if ($2=="refind") print substr($1,5,4)}') +NEWORDER="$(ogNvramGetOrder|awk -v NEW="$NUNENTRY" '{ gsub(",", " "); printf "%x %x %s\n", $1 ,NEW, substr($0, index($0,$2)) }')" +ogNvramSetOrder $NEWORDER # Para la configuración del ogLive ogMountCache &>/dev/null |