Fixed Bootloading w/ Grub.
This commit is contained in:
parent
b02b632030
commit
8ba1b0b06a
12 changed files with 89 additions and 126 deletions
|
@ -1,49 +1,36 @@
|
|||
:md: ./modules
|
||||
[id='bootloading-with-grub2']
|
||||
= Bootloading with GRUB2
|
||||
|
||||
|
||||
= Bootloading with *GRUB2*
|
||||
[[bootloading-with-grub2]]
|
||||
|
||||
*GRUB2* is the latest version of *GNU GRUB*, the _GRand Unified Bootloader_.
|
||||
A bootloader is the first software program that runs when a computer
|
||||
starts. It is responsible for loading and transferring control to the
|
||||
operating system kernel. In Fedora, the kernel is Linux. The kernel then initializes
|
||||
the rest of the operating system.
|
||||
*GRUB2* is the latest version of *GNU GRUB*, the _GRand Unified Bootloader_. A bootloader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel. In Fedora, the kernel is Linux. The kernel then initializes the rest of the operating system.
|
||||
|
||||
*GRUB2* is the follower of the previous version *GRUB* (version 0.9x). The original version is available under the name *GRUB Legacy*.
|
||||
|
||||
Since Fedora 16, *GRUB2* has been the default bootloader on x86 BIOS
|
||||
systems. For upgrades of BIOS systems, the default is also to install
|
||||
*GRUB2*, but you can opt to skip bootloader configuration entirely.
|
||||
Since Fedora 16, *GRUB2* has been the default bootloader on x86 BIOS systems. For upgrades of BIOS systems, the default is also to install *GRUB2*, but you can opt to skip bootloader configuration entirely.
|
||||
|
||||
include::{md}/proc_installing-grub2-on-bios-system.adoc[leveloffset=+1]
|
||||
include::modules/proc_installing-grub2-on-bios-system.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_installing-grub2-on-efi-system.adoc[leveloffset=+1]
|
||||
include::modules/proc_installing-grub2-on-efi-system.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_adding-other-operating-systems-grub2.adoc[leveloffset=+1]
|
||||
include::modules/proc_adding-other-operating-systems-grub2.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_setting-default-entry-for-grub2.adoc[leveloffset=+1]
|
||||
include::modules/proc_setting-default-entry-for-grub2.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_restoring-bootloader-using-live-disk.adoc[leveloffset=+1]
|
||||
include::modules/proc_restoring-bootloader-using-live-disk.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_using-grub2-prompt.adoc[leveloffset=+1]
|
||||
include::modules/proc_using-grub2-prompt.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_booting-with-configfile-on-different-partition.adoc[leveloffset=+1]
|
||||
include::modules/proc_booting-with-configfile-on-different-partition.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_setting-password-for-interactive-edit-mode.adoc[leveloffset=+1]
|
||||
include::modules/proc_setting-password-for-interactive-edit-mode.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_solving-absent-floppy.adoc[leveloffset=+1]
|
||||
include::modules/proc_solving-absent-floppy.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_using-old-graphics-modes.adoc[leveloffset=+1]
|
||||
include::modules/proc_using-old-graphics-modes.adoc[leveloffset=+1]
|
||||
|
||||
include::{md}/proc_enabling-serial-console-grub.adoc[leveloffset=+1]
|
||||
include::modules/proc_enabling-serial-console-grub.adoc[leveloffset=+1]
|
||||
|
||||
[[further-reading]]
|
||||
== Further Reading
|
||||
|
||||
[discrete]
|
||||
== Additional resources
|
||||
|
||||
* http://www.gnu.org/software/grub/manual/grub.html
|
||||
|
||||
See a typo, something missing or out of date, or anything else which can be
|
||||
improved? Edit this document at https://pagure.io/fedora-docs/quick-docs.
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
= Adding other operating systems to the *GRUB2* menu
|
||||
[[adding-other-operating-systems-grub2]]
|
||||
= Adding other operating systems to the GRUB2 menu
|
||||
|
||||
Normally, *GRUB2* is preset to boot multiple operating systems during the Fedora installation process. If you can, it is advisable to install non-Linux operating systems first. Then, during the installation process, all those operating systems and their locations will be discovered and properly set.
|
||||
|
||||
|
@ -15,17 +15,17 @@ Adding other records into the *GRUB2* menu only means to run `grub2-mkconfig` co
|
|||
. Recreate the *GRUB2* configuration file.
|
||||
+
|
||||
----
|
||||
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
# grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
----
|
||||
|
||||
. Install *GRUB2* into the MBR of your primary hard disk.
|
||||
+
|
||||
----
|
||||
$ sudo grub2-install /dev/sda
|
||||
# grub2-install /dev/sda
|
||||
----
|
||||
|
||||
|
||||
.More information
|
||||
|
||||
* The `grub2-mkconfig` command will add entries for all operating systems it can find.
|
||||
* When problems appear, see the link:http://www.gnu.org/software/grub/manual/grub.html#Multi_002dboot-manual-config[GRUB manual] to solve issues with booting secondary operating systems.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
= Booting the system using a configuration file on a different partition.
|
||||
[[booting-with-configfile-on-different-partition]]
|
||||
= Booting the system using a configuration file on a different partition.
|
||||
|
||||
If you end up in *GRUB2* boot prompt, it is also possible to boot using a _configfile_ that's located on another
|
||||
partition, as is often the case with multi-boot systems containing Ubuntu and Fedora. To boot the system using a configuration files on a different partition:
|
||||
|
@ -27,6 +27,6 @@ configfile /grub2/grub.cfg
|
|||
----
|
||||
|
||||
.More information
|
||||
* The *hd0,msdos1* line shows the pertinent _boot_ partition, which holds the
|
||||
`grub.cfg` file. The setting may be different on your system. See also xref:using-grub2-prompt[Using the GRUB2 boot prompt] for more information.
|
||||
|
||||
* The *hd0,msdos1* line shows the pertinent _boot_ partition, which holds the `grub.cfg` file. The setting may be different on your system. See also xref:using-grub2-prompt[Using the GRUB2 boot prompt] for more information.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
= Enabling Serial Console in GRUB2
|
||||
[[enabling-serial-console-grub]]
|
||||
= Enabling Serial Console in GRUB2
|
||||
|
||||
To enable Serial console in grub:
|
||||
|
||||
|
@ -16,4 +16,3 @@ GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=
|
|||
----
|
||||
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader into the MBR, as described in xref:adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
= Installing GRUB2 on a BIOS system
|
||||
[[installing-grub-2-on-a-bios-system]]
|
||||
= Installing GRUB2 on a BIOS system
|
||||
|
||||
Normally, *GRUB2* will be installed and set up by the installer, *Anaconda*, during the installation process. You will probably never have to deal with manual installation of *GRUB2*. However, in certain situations , you will want to install *GRUB2* manually, especially if you need to repair the existing *GRUB2* installation or you want to change its configuration.
|
||||
|
||||
This procedure shows the steps to install *GRUB2* on your _Master Boot Record_ (MBR) of your primary hard disk.
|
||||
|
||||
Before you start:
|
||||
|
||||
|
||||
.Before you start
|
||||
|
||||
* Make sure you have the the *GRUB2* packages and the `os-prober` package installed in your system:
|
||||
* Make sure you have the the *GRUB2* packages and the _os-prober_ package installed in your system:
|
||||
+
|
||||
----
|
||||
$ dnf list installed | grep grub
|
||||
|
@ -23,7 +20,7 @@ $ dnf list installed | grep grub
|
|||
. Create a configuration file for *GRUB2*.
|
||||
+
|
||||
----
|
||||
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
# grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
----
|
||||
|
||||
. List block devices available on the system.
|
||||
|
@ -37,18 +34,15 @@ $ lsblk
|
|||
. Install *GRUB2* in the MBR of the primary hard disk.
|
||||
+
|
||||
----
|
||||
$ sudo grub2-install /dev/sda
|
||||
# grub2-install /dev/sda
|
||||
----
|
||||
|
||||
. Reboot your computer to boot with the newly installed bootloader.
|
||||
|
||||
.More information
|
||||
|
||||
* The `grub2-mkconfig` command creates a new configuration based on the currently
|
||||
running system. It collects information from the `/boot` partition (or directory), from the `/etc/default/grub` file, and the customizable scripts in `/etc/grub.d/`.
|
||||
* The configuration format is changing with time, and a new configuration
|
||||
file can become slightly incompatible with the older versions of the bootloader. Always run `grub2-install` before you create the configuration file with `grub2-mkconfig`.
|
||||
* In Fedora, it is generally safe to edit `/boot/grub2/grub.cfg` manually. *Grubby* in Fedora patches the configuration when a kernel update is performed and will try to not make any other changes than what is necessary. Manual changes can be overwritten with `grub2-mkconfig` when the system gets upgraded with
|
||||
*Anaconda*. Customizations placed in `/etc/grub.d/40_custom` or
|
||||
`/boot/grub2/custom.cfg` files will survive running the `grub2-mkconfig` command.
|
||||
* The `grub2-mkconfig` command creates a new configuration based on the currently running system. It collects information from the `/boot` partition (or directory), from the `/etc/default/grub` file, and the customizable scripts in `/etc/grub.d/`.
|
||||
|
||||
* The configuration format is changing with time, and a new configuration file can become slightly incompatible with the older versions of the bootloader. Always run `grub2-install` before you create the configuration file with `grub2-mkconfig`.
|
||||
|
||||
* In Fedora, it is generally safe to edit `/boot/grub2/grub.cfg` manually. *Grubby* in Fedora patches the configuration when a kernel update is performed and will try to not make any other changes than what is necessary. Manual changes can be overwritten with `grub2-mkconfig` when the system gets upgraded with *Anaconda*. Customizations placed in `/etc/grub.d/40_custom` or `/boot/grub2/custom.cfg` files will survive running the `grub2-mkconfig` command.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
= Installing GRUB2 on a UEFI system
|
||||
[[installing-grub-2-configuration-on-uefi-system]]
|
||||
= Installing GRUB2 on a UEFI system
|
||||
|
||||
Normally, *GRUB2* will be installed and set up by the installer, *Anaconda*, during the installation process. You will probably never have to deal with manual installation of *GRUB2*. However, in certain situations , you will want to install *GRUB2* manually, especially if you need to repair the existing *GRUB2* installation or you want to change its configuration.
|
||||
|
||||
This procedure shows the steps to install *GRUB2* on a UEFI system on Fedora 18 or newer. The procedure consists of four parts.
|
||||
|
||||
== Creating an EFI System Partition
|
||||
[[create-an-esp]]
|
||||
== Creating an EFI System Partition
|
||||
|
||||
The UEFI firmware requires to boot from an _EFI System Partition_ on
|
||||
a disk with a GPT label. To create such a partition:
|
||||
|
@ -20,7 +20,7 @@ $ lsblk
|
|||
. Create at least a 128 MiB disk partition using a GPT label on the primary hard disk.
|
||||
+
|
||||
----
|
||||
$ sudo gdisk /dev/sda
|
||||
# gdisk /dev/sda
|
||||
----
|
||||
+
|
||||
For the sake of this procedure, we assume that the created partition is recognized as `/dev/sda1`.
|
||||
|
@ -28,26 +28,26 @@ For the sake of this procedure, we assume that the created partition is recogniz
|
|||
. Format the partition with the _FAT32_ file system.
|
||||
+
|
||||
----
|
||||
$ sudo mkfs.vfat /dev/sda1
|
||||
# mkfs.vfat /dev/sda1
|
||||
----
|
||||
|
||||
. Create the `/boot/efi` directory as a mount point for the new partition.
|
||||
+
|
||||
----
|
||||
$ sudo mkdir /boot/efi
|
||||
# mkdir /boot/efi
|
||||
----
|
||||
|
||||
. Mount the partition to the `/boot/efi` mount point.
|
||||
+
|
||||
----
|
||||
$ sudo mount /dev/sda1 /boot/efi
|
||||
# mount /dev/sda1 /boot/efi
|
||||
----
|
||||
|
||||
. Proceed to the next part.
|
||||
|
||||
|
||||
== Install the bootloader files
|
||||
[[install-the-bootloader-files]]
|
||||
== Install the bootloader files
|
||||
|
||||
In order to use *GRUB2* with on the UEFI systems, you need to install or re-install appropriate packages:
|
||||
|
||||
|
@ -55,21 +55,22 @@ In order to use *GRUB2* with on the UEFI systems, you need to install or re-inst
|
|||
. Re-install the necessary packages.
|
||||
+
|
||||
----
|
||||
dnf reinstall grub2-efi grub2-efi-modules shim
|
||||
# dnf reinstall grub2-efi grub2-efi-modules shim
|
||||
----
|
||||
|
||||
. If the above command ends with an error, install the packages.
|
||||
+
|
||||
----
|
||||
dnf install grub2-efi grub2-efi-modules shim
|
||||
# dnf install grub2-efi grub2-efi-modules shim
|
||||
----
|
||||
|
||||
.More information
|
||||
|
||||
* This installs the signed *shim* and the *GRUB2* binary.
|
||||
|
||||
== Create a GRUB2 configuration
|
||||
|
||||
[[create-a-grub-2-configuration]]
|
||||
== Create a GRUB2 configuration
|
||||
|
||||
|
||||
If you already have a working *GRUB2* EFI configuration file, you do not need to do anything else.
|
||||
|
@ -77,25 +78,21 @@ If you already have a working *GRUB2* EFI configuration file, you do not need to
|
|||
Otherwise, create the configuration file using the `grub2-mkconfig` command.
|
||||
|
||||
----
|
||||
$ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
----
|
||||
|
||||
.More information
|
||||
* Under EFI, *GRUB2* looks for its configuration in
|
||||
`/boot/efi/EFI/fedora/grub.cfg`.
|
||||
* For newly installed kernels to work,
|
||||
`grubby` expects `/etc/grub2-efi.cfg` to be a symlink to the real
|
||||
grub.cfg (for example `/boot/efi/EFI/fedora/grub.cfg`).
|
||||
|
||||
== Solving problems with UEFI bootloader
|
||||
* Under EFI, *GRUB2* looks for its configuration in `/boot/efi/EFI/fedora/grub.cfg`.
|
||||
* For newly installed kernels to work, `grubby` expects `/etc/grub2-efi.cfg` to be a symlink to the real grub.cfg (for example `/boot/efi/EFI/fedora/grub.cfg`).
|
||||
|
||||
|
||||
[[solving-problems-with-uefi-bootloader]]
|
||||
== Solving problems with UEFI bootloader
|
||||
|
||||
When you power on your system, your firmware will look for EFI variables that tell it how to boot. On running systems, which have booted into the EFI mode and their EFI runtime services are working correctly, you can configure your boot menu with `efibootmgr`.
|
||||
|
||||
If not, `shim` can help you bootstrap. The EFI program
|
||||
`/boot/efi/EFI/BOOT/fallback.efi` will look for files called `BOOT.CSV`
|
||||
in your ESP and will add boot entries corresponding to them. The `shim` command
|
||||
provides its own `BOOT.CSV` file that will add an entry for `grub2-efi`.
|
||||
If not, `shim` can help you bootstrap. The EFI program `/boot/efi/EFI/BOOT/fallback.efi` will look for files called `BOOT.CSV` in your ESP and will add boot entries corresponding to them. The `shim` command provides its own `BOOT.CSV` file that will add an entry for `grub2-efi`.
|
||||
|
||||
During the boot process, you can use the *EFI Shell* to invoke the `fallback.efi` profile to boot the system:
|
||||
|
||||
|
@ -118,9 +115,8 @@ During the boot process, you can use the *EFI Shell* to invoke the `fallback.efi
|
|||
----
|
||||
|
||||
.More information
|
||||
* If you have no boot entries at all, then just booting off your disk in
|
||||
UEFI mode should automatically invoke `/boot/efi/EFI/BOOT/BOOTX64.EFI`,
|
||||
which will, in turn, invoke `fallback.efi`.
|
||||
* If you already have incorrect boot entries, you'll either need to delete
|
||||
them or to modify `BOOT.CSV` to create new entries with different names.
|
||||
|
||||
* If you have no boot entries at all, then just booting off your disk in UEFI mode should automatically invoke `/boot/efi/EFI/BOOT/BOOTX64.EFI`, which will, in turn, invoke `fallback.efi`.
|
||||
|
||||
* If you already have incorrect boot entries, you'll either need to delete them or to modify `BOOT.CSV` to create new entries with different names.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
= Restoring the bootloader using the Live disk.
|
||||
[[restoring-bootloader-using-live-disk]]
|
||||
= Restoring the bootloader using the Live disk.
|
||||
|
||||
Sometimes, especially after a secondary operating systems has been installed, the master boot record gets damaged which then prevents the original Linux system from booting.
|
||||
|
||||
|
@ -7,7 +7,8 @@ If this happens, it is necessary to reinstall *GRUB2* to recreate the original s
|
|||
|
||||
.Before you start
|
||||
|
||||
* Get the Fedora Live ISO from link:https://download.fedoraproject.org/pub/fedora/linux/releases/27/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-27-1.6.iso[getfedora.org].
|
||||
* Get the Fedora Live ISO from link:https://download.fedoraproject.org/pub/fedora/linux/releases/[getfedora.org].
|
||||
|
||||
* Prepare a bootable device using the downloaded ISO, either a CD or a USB.
|
||||
|
||||
.Procedure
|
||||
|
@ -19,7 +20,7 @@ If this happens, it is necessary to reinstall *GRUB2* to recreate the original s
|
|||
. Examine the partition layout and identify the `boot` and the `root` partition.
|
||||
+
|
||||
----
|
||||
$ sudo fdisk -l
|
||||
# fdisk -l
|
||||
----
|
||||
+
|
||||
If you are using the default Fedora layout, there will be one `/dev/sda1` partition that holds the `/boot` directory and one `/dev/mapper/fedora-root` that holds the root file system.
|
||||
|
@ -27,34 +28,34 @@ If you are using the default Fedora layout, there will be one `/dev/sda1` partit
|
|||
. Create the mount point for the root partition.
|
||||
+
|
||||
----
|
||||
$ sudo mkdir -p /mnt/root
|
||||
# mkdir -p /mnt/root
|
||||
----
|
||||
|
||||
. Mount the root partition on the mount point.
|
||||
+
|
||||
----
|
||||
$ sudo mount /dev/mapper/fedora-root /mnt/root
|
||||
# mount /dev/mapper/fedora-root /mnt/root
|
||||
----
|
||||
|
||||
. Mount the boot partition in the `boot` directory of the filesystem that you have mounted in the previous step.
|
||||
+
|
||||
----
|
||||
$ sudo mount /dev/sda1 /mnt/root/boot/
|
||||
# mount /dev/sda1 /mnt/root/boot/
|
||||
----
|
||||
|
||||
. Mount system processes and devices into the root filesystem in `/mnt/root`.
|
||||
+
|
||||
----
|
||||
$ sudo mount -o bind /dev /mnt/root/dev
|
||||
$ sudo mount -o bind /proc /mnt/root/proc
|
||||
$ sudo mount -o bind /sys /mnt/root/sys
|
||||
$ sudo mount -o bind /run /mnt/root/run
|
||||
# mount -o bind /dev /mnt/root/dev
|
||||
# mount -o bind /proc /mnt/root/proc
|
||||
# mount -o bind /sys /mnt/root/sys
|
||||
# mount -o bind /run /mnt/root/run
|
||||
----
|
||||
|
||||
. Change your filesystem into the one mounted under `/mnt/root`.
|
||||
+
|
||||
----
|
||||
$ sudo chroot /mnt/root
|
||||
# chroot /mnt/root
|
||||
----
|
||||
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader into the MBR, as described in xref:adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
|
@ -68,5 +69,5 @@ $ exit
|
|||
. Your bootloader should be now restored. Reboot your computer to boot into your normal system.
|
||||
+
|
||||
----
|
||||
$ sudo systemctl reboot
|
||||
# systemctl reboot
|
||||
----
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
= Setting default entry for *GRUB2*
|
||||
[[setting-default-entry]]
|
||||
= Setting default entry for GRUB2
|
||||
|
||||
Since `grub2-mkconfig` (and *os-prober*) cannot estimate which operating system, of those it finds, is to be marked as default, we usually are unable to predict the order of
|
||||
the entries in `/boot/grub2/grub.cfg`. To change the default layout, we need to set the default based on the `name` or `title`.
|
||||
Since `grub2-mkconfig` (and *os-prober*) cannot estimate which operating system, of those it finds, is to be marked as default, we usually are unable to predict the order of the entries in `/boot/grub2/grub.cfg`. To change the default layout, we need to set the default based on the `name` or `title`.
|
||||
|
||||
.Before you start
|
||||
|
||||
|
@ -16,7 +15,7 @@ GRUB_SAVEDEFAULT=false
|
|||
. If you needed to change the content of the `/etc/default/grub`, apply the changes to `grub.cfg`.
|
||||
+
|
||||
----
|
||||
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
# grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
----
|
||||
|
||||
.Procedure
|
||||
|
@ -24,29 +23,27 @@ $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
|||
. List all possible menu entries.
|
||||
+
|
||||
----
|
||||
$ sudo grep -P "^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
|
||||
# grep -P "^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
|
||||
----
|
||||
|
||||
. Select one of the displayed options and use it as an argument to set the default menu entry.
|
||||
+
|
||||
----
|
||||
$ sudo grub2-set-default <menuentry>
|
||||
# grub2-set-default <menuentry>
|
||||
----
|
||||
|
||||
. Verify the default menu entry
|
||||
+
|
||||
----
|
||||
$ sudo grub2-editenv list
|
||||
# grub2-editenv list
|
||||
----
|
||||
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader into the MBR, as described in xref:adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader into the MBR, as described in link:#adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
|
||||
|
||||
.More information
|
||||
|
||||
If you understand the risks involved, you can manually modify the
|
||||
`/boot/grub2/grub.cfg` file. In that case, set the number of the default operating system using the `set default` variable.
|
||||
If you understand the risks involved, you can manually modify the `/boot/grub2/grub.cfg` file. In that case, set the number of the default operating system using the `set default` variable.
|
||||
|
||||
For example:
|
||||
----
|
||||
|
@ -56,6 +53,4 @@ set default="5"
|
|||
[NOTE]
|
||||
====
|
||||
If you edit the configuration file manually, the settings will be overwritten each time the `grub2-mkconfig` command runs.
|
||||
====
|
||||
|
||||
|
||||
====
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
= Setting a password for interactive edit mode
|
||||
[[setting-password-for-interactive-edit-mode]]
|
||||
= Setting a password for interactive edit mode
|
||||
|
||||
If you wish to protect the *GRUB2* interactive edit mode with a password, but allow ordinary users to boot the computer, you have to create a definition file where you set up this functionality:
|
||||
|
||||
|
@ -18,16 +18,13 @@ password root <password>
|
|||
|
||||
.More information
|
||||
|
||||
You can encrypt the password by using *pbkdf2*. Use `grub2-mkpasswd-pbkdf2`
|
||||
to encrypt the password, then replace the password line with:
|
||||
You can encrypt the password by using *pbkdf2*. Use `grub2-mkpasswd-pbkdf2` to encrypt the password, then replace the password line with:
|
||||
|
||||
----
|
||||
password_pbkdf2 root grub.pbkdf2.sha512.10000.1B4BD9B60DE889A4C50AA9458C4044CBE129C9607B6231783F7E4E7191D8254C0732F4255178E2677BBE27D03186E44815EEFBAD82737D81C87F5D24313DDDE7.E9AEB53A46A16F30735E2558100D8340049A719474AEEE7E3F44C9C5201E2CA82221DCF2A12C39112A701292BF4AA071EB13E5EC8C8C84CC4B1A83304EA10F74
|
||||
----
|
||||
|
||||
More details can be found at
|
||||
https://help.ubuntu.com/community/Grub2/Passwords[Ubuntu Help: GRUB2
|
||||
Passwords].
|
||||
More details can be found at https://help.ubuntu.com/community/Grub2/Passwords[Ubuntu Help: GRUB2 Passwords].
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
[[solving-absent-floppy]]
|
||||
= Dealing with the "Absent Floppy Disk" Error
|
||||
|
||||
It has been reported by some users that *GRUB2* may fail to install on a partition's boot sector if the computer's floppy controller is activated in BIOS without an actual floppy disk
|
||||
drive being present. Such situations resulted in an _Absent Floppy Disk_ error.
|
||||
It has been reported by some users that *GRUB2* may fail to install on a partition's boot sector if the computer's floppy controller is activated in BIOS without an actual floppy disk drive being present. Such situations resulted in an _Absent Floppy Disk_ error.
|
||||
|
||||
To workaround this issue, go into the rescue mode and follow the procedure in xref:installing-grub-2-on-a-bios-system[Installing GRUB2 on a BIOS system] *GRUB2*, but use the `--no-floppy` option with the `grub2-install` command.
|
||||
To workaround this issue, go into the rescue mode and follow the procedure in link:#installing-grub-2-on-a-bios-system[Installing GRUB2 on a BIOS system] *GRUB2*, but use the `--no-floppy` option with the `grub2-install` command.
|
||||
|
||||
----
|
||||
grub2-install <target device> --no-floppy
|
||||
# grub2-install <target device> --no-floppy
|
||||
----
|
||||
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
= Using old graphics modes in bootloader
|
||||
[[using-old-graphics-modes]]
|
||||
= Using old graphics modes in bootloader
|
||||
|
||||
The terminal device is chosen with GRUB_TERMINAL. For more information, see the link:http://www.gnu.org/software/grub/manual/grub.html#Simple-configuration[Grub manual].
|
||||
|
||||
Valid terminal output names depend on the platform, but may include
|
||||
`console` (PC BIOS and EFI consoles), `serial` (serial terminal),
|
||||
`gfxterm` (graphics-mode output), `ofconsole` (Open Firmware console),
|
||||
or `vga_text` (VGA text output, mainly useful with Coreboot).
|
||||
Valid terminal output names depend on the platform, but may include `console` (PC BIOS and EFI consoles), `serial` (serial terminal), `gfxterm` (graphics-mode output), `ofconsole` (Open Firmware console), or `vga_text` (VGA text output, mainly useful with Coreboot).
|
||||
|
||||
The default is to use the platform's native terminal output.
|
||||
|
||||
|
@ -18,6 +15,4 @@ In Fedora, `gfxterm` is the default options. To get the legacy graphics modes:
|
|||
|
||||
. Set the `GRUB_TERMINAL` variable to one of the above mentioned options.
|
||||
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader into the MBR, as described in xref:adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
|
||||
|
||||
. Regenerate the *GRUB2* configuration file and reinstall the bootloader into the MBR, as described in link:#adding-other-operating-systems-grub2[Adding other operating systems to the *GRUB2* menu].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue