grub-devel
[Top][All Lists]
Advanced

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

Re: bli module inclusion gives me just black screen on real hardware


From: Tobias Powalowski
Subject: Re: bli module inclusion gives me just black screen on real hardware
Date: Sun, 1 Oct 2023 11:27:07 +0200
User-agent: Mozilla Thunderbird

Am 27.09.23 um 09:43 schrieb Oliver Steffen:
Quoting Daniel Kiper (2023-09-26 17:57:05)
On Sat, Aug 12, 2023 at 03:01:19PM +0200, Tobias Powalowski via Grub-devel 
wrote:
Am 12.08.23 um 14:52 schrieb Oliver Steffen:
Quoting Daniel Kiper (2023-08-11 18:13:57)
Hi,

Sorry for late reply but I was on vacation...

On Tue, Jul 18, 2023 at 02:34:08PM +0200, Tobias Powalowski via Grub-devel 
wrote:
Hi,

I tried to add the bli module to my standalone grub for my project. In qemu
testing all is fine, if trying to boot it on real hardware gives me just a
blank screen and game over.
Sorry to hear that.
I just tried it again on a Lenovo T14s (x86_64) and I can reach the menu
and the grub shell without problems.  What hardware are you using?

Used grub version is 2.12rc1.

Any ideas?
You could apply following patch.  It adds debug prints to the bli modue.
Then enable debug output in your grub.cfg by setting

     set debug=bli
     set pager=1

I recommend adding

    sleep 10 --verbose --interruptible

just after the line loading the bli module.  This is to keep the
messages visible for a moment before the menu clears the screen (should
it get to there).
This might give us a hint where it goes wrong.


  From cda95baaf0a3c0f277a5e37aff399574627b2263 Mon Sep 17 00:00:00 2001
From: Oliver Steffen <osteffen@redhat.com>
Date: Sat, 12 Aug 2023 14:23:31 +0200
Subject: [PATCH] bli dprint

---
   grub-core/commands/bli.c | 15 ++++++++++++---
   1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/grub-core/commands/bli.c b/grub-core/commands/bli.c
index e0d8a54f7..95caa4feb 100644
--- a/grub-core/commands/bli.c
+++ b/grub-core/commands/bli.c
@@ -89,23 +89,30 @@ set_loader_device_part_uuid (void)
     grub_err_t status = GRUB_ERR_NONE;
     char *part_uuid = NULL;

+  grub_dprintf ("bli", "getting loaded image\n");
     image = grub_efi_get_loaded_image (grub_efi_image_handle);
     if (image == NULL)
       return grub_error (GRUB_ERR_BAD_DEVICE, N_("unable to find boot 
device"));

+  grub_dprintf ("bli", "getting boot disk\n");
     device_name = grub_efidisk_get_device_name (image->device_handle);
     if (device_name == NULL)
       return grub_error (GRUB_ERR_BAD_DEVICE, N_("unable to find boot 
device"));

+  grub_dprintf ("bli", "getting uuid\n");
     status = get_part_uuid (device_name, &part_uuid);

     if (status == GRUB_ERR_NONE)
-    status = grub_efi_set_variable_to_string ("LoaderDevicePartUUID",
&bli_vendor_guid, part_uuid,
-                                         GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS |
-                                         GRUB_EFI_VARIABLE_RUNTIME_ACCESS);
+    {
+      grub_dprintf ("bli", "setting var\n");
+      status = grub_efi_set_variable_to_string
("LoaderDevicePartUUID", &bli_vendor_guid, part_uuid,
+                                           
GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS |
+                                           GRUB_EFI_VARIABLE_RUNTIME_ACCESS);
+    }
     else
       grub_error (status, N_("unable to determine partition UUID of
boot device"));

+  grub_dprintf ("bli", "cleanup\n");
     grub_free (part_uuid);
     grub_free (device_name);
     return status;
@@ -113,8 +120,10 @@ set_loader_device_part_uuid (void)

   GRUB_MOD_INIT (bli)
   {
+  grub_dprintf ("bli", "init start\n");
     grub_efi_set_variable_to_string ("LoaderInfo", &bli_vendor_guid,
PACKAGE_STRING,
                                GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS |
                                GRUB_EFI_VARIABLE_RUNTIME_ACCESS);
     set_loader_device_part_uuid ();
+  grub_dprintf ("bli", "init end\n");
   }
Hi I'll try after my vaccation, give me 2 weeks and I report back.
Are you back? Could you check the patch from Oliver?

Daniel

I think it is worth also trying the GUID patches discussed in this thread:
https://mail.gnu.org/archive/html/grub-devel/2023-09/msg00045.html

Oliver

Hi,

i'm a bit further now, on pure windows systems it works. My dual boot machine and pure linux system show the hang. I guess it has something to do with the GUID or GPT partitioning. On windows only systems it shows a message about GUIDs first before the sleep countdown comes.

Let's see if I get more info out of my not working machines.

greetings

tpowa

--
Tobias Powalowski
Arch Linux Developer (tpowa)
https://www.archlinux.org
tpowa@archlinux.org

Archboot Developer
https://archboot.com




reply via email to

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