maharmstone / quibble

Quibble - the custom Windows bootloader
GNU Lesser General Public License v3.0
2.06k stars 81 forks source link

`EFI_NOT_FOUND` for `btrfs(<...>)` syntax. (some debug info provided). #77

Open Esgariot opened 1 year ago

Esgariot commented 1 year ago

Hi, I'm trying to boot from btrfs subvolume and I'm getting Unable to parse ARC name, along with EFI_NOT_FOUND error code.

my loader entry looks like this:

[Windows]
SystemPath=btrfs(b6abd326-f396-4479-99d2-4a5ca63c7da6)\Windows
Options=/SUBVOL=@win

and here's btrfs check and btrfs subvolume list that match stuff provided above:

Additionally, I've built top of master, and added some debug prints here and there, and it goes like this:

  1. this is the part that fails in boot.c, with Status being EFI_NOT_FOUND

        // Inside parse_arc_name
        EFI_GUID quibble_guid = EFI_QUIBBLE_PROTOCOL_GUID;
        EFI_HANDLE* handles = NULL;
        UINTN count;
    
        Status = bs->LocateHandleBuffer(ByProtocol, &quibble_guid, NULL, &count, &handles);
        if (EFI_ERROR(Status)) {
            print_string("Unable to parse ARC name, because of EFI_ERROR.\n");
            print_error("Error:", Status);
            return Status;
        }
  2. After printing calls of almost every function in btrfs.c I get thousands of calls to drv_supported and couple of calls to drv_start, then the TUI with entry selection comes up, after selecting Windows I get
            Unable to parse ARC name, because of EFI_ERROR.
            Error: EFI_NOT_FOUND
Esgariot commented 1 year ago

There's also Loading driver btrfs.efi... success

maharmstone commented 1 year ago

The /SUBVOL option is supposed to be the subvol's number, in hex: so it should be Options=/SUBVOL=110. Does that fix things?

Esgariot commented 1 year ago

Sadly, nope. I don't think it gets to the parsing of Options part, without it, using root subvolume it produces the same error, and when using multipart(0)... syntax it also failed on EFI_NOT_FOUND after making some progress, but that's another problem I might encounter after resolving this one.

Esgariot commented 1 year ago

Hmm, maybe there's a problem with multiple btrfs drivers being loaded? Because other than quibble's, I'm using refind with btrfs_x64.efi from https://efi.akeo.ie