2017-12-13 11:45:40 +00:00
[[booting-with-configfile-on-different-partition]]
2018-01-20 17:59:12 +00:00
= Booting the system using a configuration file on a different partition.
2017-12-13 11:45:40 +00:00
If you end up in *GRUB2* boot prompt, it is also possible to boot using a _configfile_ that's located on another
2023-01-21 14:23:23 +00:00
partition, as is often the case with multi-boot systems containing Ubuntu and Fedora. Follow the below procedure
if you need to boot from a configuration file on a different partition.
2017-12-13 11:45:40 +00:00
.Procedure
2023-01-21 14:23:23 +00:00
. Load the necessary modules to read your system's partitions (you will also need to load `part_msdos` or `part_gpt`, depending on your partition table).
+
* For BTRFS filesystems:
+
----
grub> insmod btrfs
----
+
* For LVM filesystems:
2017-12-13 11:45:40 +00:00
+
----
2023-01-21 14:23:23 +00:00
grub> insmod xfs
grub> insmod lvm
2017-12-13 11:45:40 +00:00
----
2023-01-21 14:23:23 +00:00
. Set *GRUB2* root to your `/boot` partition. On UEFI systems, you should set *GRUB2* root to the EFI system partition.
2017-12-13 11:45:40 +00:00
+
----
2023-01-21 14:23:23 +00:00
grub> set root=(hd0,msdos1)
2017-12-13 11:45:40 +00:00
----
. Set the path to the configuration file.
+
----
2023-01-21 14:23:23 +00:00
grub> configfile /grub2/grub.cfg
2017-12-13 11:45:40 +00:00
----
.More information
2018-01-20 17:59:12 +00:00
2023-01-26 13:40:12 +00:00
* 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_the_grub2_boot_prompt[Using the GRUB2 boot prompt] for more information.
2017-12-13 11:45:40 +00:00