The following repository adds a grub bootloader entry to boot into your UEFI/BIOS firmware settings
The underlying grub entry script (uefi-firmware
) is a trimmed down version of this script distributed by jsherz.com. The conditions have been removed as they no longer apply to recent linux versions. It shall be noted that I have NOT replaced the conditions, but rather removed them, hence I should remind you that the grub entry may not function on every device, depending on its linux setup, version and the hardware.
In addition to the script itself, I have added a makefile which acts as installer and uninstaller. If, for various reasons, the GNU make tool is not present or fails to function, alternatively the installation and uninstallation bash scripts may be used. Finally, if the provided installation methods failed or the user is sceptical permitting the script su/sudo rights, a step by step manual installation may be done.
To locally obtain a copy of this repository, execute the following command :
git clone https://github.com/CTXz/grub_uefi_settings_entry.git
As a result, a local copy of the repository will be located under the current directory
To install and add the entry to your grub bootloader, execute the following command with su rights inside the repository
$ make install
To revert all changes and remove the entry from your grub bootloader, execute the following command with su rights inside the repository
$ make uninstall
To install and add the entry to your grub bootloader, execute the following command with su rights inside the repository
$ sh install.sh [PRIORITY] [MKCONFIG] [MKCONFIG_OUT] [CUSTOM_ENTRY_DIR]
To revert all changes and remove the entry from your grub bootloader, execute the following command with su rights inside the repository
$ sh uninstall.sh [MKCONFIG] [MKCONFIG_OUT] [CUSTOM_ENTRY_DIR]
Args:
Name | Description | Default value |
---|---|---|
PRIORITY |
Defines the entries read priority, which is prefixed ot the script (ex. 50_uefi-firmware ). The smaller the number the higher the priority. |
50 |
MKCONFIG |
Defines the grub-mkconfig tool/executable. Depending on the distribution, this may differ. Ex. Debian based systems use the update-grub script, arch uses the standart grub-mkconfig where most distros however use grub2-mkconfig | Detected |
MKCONFIG_OUT |
Defines output paramter path (-o ) of the MKCONFIG tool. |
/boot/grub/grub.cfg |
CUSTOM_ENTRY_DIR |
Defines grub directory for custom menu entries | /etc/grub.d/ |
- Copy the entry script with a assigned priority (say
50
) into the grub custom entry directory, which by default, is located under/etc/grub.d/
$ cp uefi-firmware /etc/grub.d/50_uefi-firmware
- Grant execution rights
$ chmod +x /etc/grub.d/50_uefi-firmware
- Update grub. This command may vary across distribution
$ update-grub
$ grub-mkconfig -o /boot/grub/grub.cfg
or
$ grub2-mkconfig -o /boot/grub/grub.cfg