Giter Club home page Giter Club logo

grub-uefi-settings-entry's Introduction

Grub UEFI Settings Entry Adder

The following repository adds a grub bootloader entry to boot into your UEFI/BIOS firmware settings

Credit

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.

Installation

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.

Cloning the repo

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

Method 1 - Make


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

Method 2 - Install scripts


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/

Method 3 - Manual installation


  1. 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
  1. Grant execution rights
$ chmod +x /etc/grub.d/50_uefi-firmware
  1. Update grub. This command may vary across distribution
Debian based systems
$ update-grub
Most systems
$ grub-mkconfig -o /boot/grub/grub.cfg
or
$ grub2-mkconfig -o /boot/grub/grub.cfg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.