grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading grub.cfg


From: Laszlo Ersek
Subject: reading grub.cfg
Date: Wed, 12 Apr 2023 13:47:56 +0200

Hi,

sorry for the beginner questions in advance.

How does grub2 locate and read "grub.cfg"?

My (very superficial) understanding is this:

- grub2 relies on its own filesystem drivers; for example, it does not
attempt to consume EFI_SIMPLE_FILE_SYSTEM_PROTOCOL directly on a UEFI
system -- it presumably consumes the BlockIo and/or DiskIo protocols, as
a dependency of its own filesystem drivers

- in one of those detected filesystems, it locates "grub.cfg", and reads it.

Is this more or less correct?

What about the following dependency problem:

- some filesystem driver is built as a grub2 module,
- grub.cfg contains a matching "insmod" grub2 command, loading said module,
- but "grub.cfg" is placed on a filesystem of that particular type.

Is this a realistic problem? If so, how is it solved? Is there something
obvious I'm missing?

Another question: assuming an EFI_SIMPLE_FILE_SYSTEM_PROTOCOL-based fs
driver existed in grub2, a particular filesystem might then appear
*twice* to grub2, once via its own "native" driver, and another time via
the UEFI SimpleFs-backed driver. Would this be a problem?

Thanks for your patience!
Laszlo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]