#70 Updated based on: https://fedoraproject.org/wiki/Changes/UnifyGrubConfig#Unify_the_GRUB_configuration_files_location_across_all_supported_architectures
Opened 6 months ago by grumpey. Modified 6 months ago
fedora-docs/ grumpey/system-administrators-guide master  into  master

@@ -10,7 +10,7 @@ 

  [[sec-Introduction_to_GRUB_2]]

  == Introduction to GRUB 2

  

- GRUB 2 reads its configuration from the `/boot/grub2/grub.cfg` file on traditional BIOS-based machines and from the `/boot/efi/EFI/fedora/grub.cfg` file on UEFI machines. This file contains menu information.

+ GRUB 2 reads its configuration from the `/boot/grub2/grub.cfg` file. This file contains menu information, addtional details can be found here: http://fedoraproject.org/wiki/Changes/UnifyGrubConfig#Unify_the_GRUB_configuration_files_location_across_all_supported_architectures[Unify the GRUB configuration files location across all supported architectures].

  

  The GRUB 2 configuration file, `grub.cfg`, is generated during installation, or by invoking the [application]*/usr/sbin/grub2-mkconfig* utility, and is automatically updated by [command]#grubby# each time a new kernel is installed. When regenerated manually using [application]*grub2-mkconfig*, the file is generated according to the template files located in `/etc/grub.d/`, and custom settings in the `/etc/default/grub` file. Edits of `grub.cfg` will be lost any time [application]*grub2-mkconfig* is used to regenerate the file, so care must be taken to reflect any manual changes in `/etc/default/grub` as well.

  
@@ -233,7 +233,11 @@ 

  [IMPORTANT]

  ====

  

- With the [option]`GRUB_TIMEOUT` key set to `0` in the `/etc/default/grub` file, GRUB 2 does not display the list of bootable kernels when the system starts up. In order to display this list when booting, press and hold any alphanumeric key when the BIOS information is displayed; GRUB 2 will present you with the GRUB menu.

+ With the [option]`GRUB_TIMEOUT` key set to `0` in the `/etc/default/grub` file, GRUB 2 does not display the list of bootable kernels when the system starts up. In order to display this list when booting:

+ * Press and hold the Shift key when the BIOS information is displayed

+ * Press the Esc or F8 key while grub loads or simply press the key repeatedly after power on until you are in the menu

+ 

+ GRUB 2 will present you with the GRUB menu.

  

  ====

  
@@ -277,20 +281,13 @@ 

  

  Changes to `/etc/default/grub` require rebuilding the `grub.cfg` file as follows:

  

- * On BIOS-based machines, issue the following command as `root`:

+ * Issue the following command as `root`:

  

  [subs="attributes"]

  ----

  ~]#{nbsp}grub2-mkconfig -o /boot/grub2/grub.cfg

  ----

  

- * On UEFI-based machines, issue the following command as `root`:

- 

- [subs="attributes"]

- ----

- ~]#{nbsp}grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

- ----

- 

  [[sec-Editing_a_Menu_Entry]]

  === Editing a Menu Entry

  
@@ -304,20 +301,13 @@ 

  

  Changes to `/etc/default/grub` require rebuilding the `grub.cfg` file as follows:

  

- * On BIOS-based machines, issue the following command as `root`:

+ * Issue the following command as `root`:

  

  [subs="attributes"]

  ----

  ~]#{nbsp}grub2-mkconfig -o /boot/grub2/grub.cfg

  ----

  

- * On UEFI-based machines, issue the following command as `root`:

- 

- [subs="attributes"]

- ----

- ~]#{nbsp}grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

- ----

- 

  [[sec-Adding_a_new_Entry]]

  === Adding a new Entry

  
@@ -421,20 +411,13 @@ 

  

  . Rebuild the `grub.cfg` file by running the [command]#grub2-mkconfig -o# command as follows:

  

- ** On BIOS-based machines, issue the following command as `root`:

+ ** Issue the following command as `root`:

  

  [subs="attributes"]

  ----

  ~]#{nbsp}grub2-mkconfig -o /boot/grub2/grub.cfg

  ----

  

- ** On UEFI-based machines, issue the following command as `root`:

- 

- [subs="attributes"]

- ----

- ~]#{nbsp}grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

- ----

- 

  [[sec-GRUB_2_Password_Protection]]

  == GRUB 2 Password Protection

  
@@ -508,20 +491,13 @@ 

  

  Rebuild the `grub.cfg` file by running the [command]#grub2-mkconfig -o# command as follows:

  

- * On BIOS-based machines, issue the following command as `root`:

+ * Issue the following command as `root`:

  

  [subs="attributes"]

  ----

  ~]#{nbsp}grub2-mkconfig -o /boot/grub2/grub.cfg

  ----

  

- * On UEFI-based machines, issue the following command as `root`:

- 

- [subs="attributes"]

- ----

- ~]#{nbsp}grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

- ----

- 

  [[sec-Password_Encryption]]

  === Password Encryption

  
@@ -602,20 +578,13 @@ 

  

  . Rebuild the `grub.cfg` file by running the [command]#grub2-mkconfig -o# command as follows:

  

- ** On BIOS-based machines, issue the following command as `root`:

+ ** Issue the following command as `root`:

  

  [subs="attributes"]

  ----

  ~]#{nbsp}grub2-mkconfig -o /boot/grub2/grub.cfg

  ----

  

- ** On UEFI-based machines, issue the following command as `root`:

- 

- [subs="attributes"]

- ----

- ~]#{nbsp}grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

- ----

- 

  . Now follow the procedure in xref:#sec-Reinstalling_GRUB_2[Reinstalling GRUB 2] to restore GRUB2 on the `/boot/` partition.

  

  [[sec-GRUB_2_over_a_Serial_Console]]
@@ -656,20 +625,13 @@ 

  

  Rebuild the `grub.cfg` file by running the [command]#grub2-mkconfig -o# command as follows:

  

- * On BIOS-based machines, issue the following command as `root`:

+ * Issue the following command as `root`:

  

  [subs="attributes"]

  ----

  ~]#{nbsp}grub2-mkconfig -o /boot/grub2/grub.cfg

  ----

  

- * On UEFI-based machines, issue the following command as `root`:

- 

- [subs="attributes"]

- ----

- ~]#{nbsp}grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

- ----

- 

  [NOTE]

  ====

  

Removed UEFI and BIOS references and pointed to /boot/grub2/grub.cfg
Updated sequence to get into grub menu, resolves https://pagure.io/fedora-docs/system-administrators-guide/issue/59