mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-25 05:37:32 +00:00
Lukas Ruzicka
15cd9db9b7
* Edit original content * Add new content * Fix asciidoc markup * Modularize
69 lines
1.7 KiB
Text
69 lines
1.7 KiB
Text
= Using the GRUB2 boot prompt
|
|
[[using-the-grub-2-boot-prompt]]
|
|
|
|
If improperly configured, *GRUB2* may fail to load and subsequently drop
|
|
to a boot prompt. To boot into the system, proceed as follows:
|
|
|
|
. Load the XFS and LVM modules
|
|
+
|
|
----
|
|
insmod xfs
|
|
insmod lvm
|
|
----
|
|
|
|
. List the drives which *GRUB2* sees:
|
|
+
|
|
----
|
|
grub2> ls
|
|
----
|
|
|
|
. Study the output for the partition table of the `/dev/sda` device. It may look similar to the following example on a dos partition table with three partitons.
|
|
will look something like this:
|
|
+
|
|
----
|
|
(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
|
|
----
|
|
+
|
|
or similar to this output on a gpt partition table of the `/dev/sda` device with four
|
|
partitions.
|
|
+
|
|
----
|
|
(hd0) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)
|
|
----
|
|
|
|
. Probe each partition of the drive and locate your `vmlinuz` and `initramfs` files.
|
|
+
|
|
----
|
|
ls (hd0,1)/
|
|
----
|
|
+
|
|
The outcome of the previous command will list the files on `/dev/sda1`. If this partition contains the `/boot` directory, it will show the full name of `vmlinuz` and `initramfs`.
|
|
|
|
. Set the root partition.
|
|
+
|
|
----
|
|
grub> set root=(hd0,3)
|
|
----
|
|
|
|
. Set the desired kernel.
|
|
+
|
|
----
|
|
grub> linux (hd0,1)/vmlinuz-3.0.0-1.fc16.i686 root=/dev/sda3 rhgb quiet selinux=0
|
|
# NOTE : add other kernel args if you need them
|
|
# NOTE : change the numbers to match your system
|
|
----
|
|
|
|
. Set the desired `initrd`.
|
|
+
|
|
----
|
|
grub> initrd (hd0,1)/initramfs-3.0.0-1.fc16.i686.img
|
|
# NOTE : change the numbers to match your system
|
|
----
|
|
|
|
. Boot with the selected settings.
|
|
+
|
|
----
|
|
grub> boot
|
|
----
|
|
|
|
. To restore the bootloader's functionality, 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].
|