Menu

A memory leak has been introduced in version 0.13.1 on cMP5,1.

Startergo
2021-03-07
2021-04-03
  • Startergo

    Startergo - 2021-03-07

    A memory leak has been introduced in version 0.13.1 on cMP5,1. As a result rEFInd does not boot. 0.13.0 works fine.

     
  • Startergo

    Startergo - 2021-03-08

    @srs5694 So I found the offending commit:
    https://sourceforge.net/p/refind/code/ci/12d51ac9763a6c9bb729774f93adf82cd457d77d/
    "Added initial logging function:"
    Also non of the compilations made with EDKv2018 worked. All of them hung even 0.13.0. Only the gnu-efi compilations worked.

     

    Last edit: Startergo 2021-03-08
  • Startergo

    Startergo - 2021-03-08

    So it turns out it is the logging which prevented rEFInd from booting. Commented out the logging:

    #log_level 3
    

    And now it boots. The only feature that does not work is the Logging. By the way is the logging supposed to work on an HFS+ rEFInd setup?

     
  • Roderick W. Smith

    I've just merged an update to the git repository that fixes some memory management problems. I'd appreciate it if you check it out. There's a binary build here, too:

    https://www.rodsbooks.com/refind-bin-0.13.1.8.zip

    If rEFInd is installed to an HFS+ volume, logging should work, but the log file will be written to whatever FAT ESP rEFInd can locate, not to the HFS+ volume.

     
  • Startergo

    Startergo - 2021-03-08

    I have re-enabled the log_level 3, but this release still hangs. And no logs files were created.

     

    Last edit: Startergo 2021-03-08
  • Startergo

    Startergo - 2021-03-10

    Unfortunately the boot only works if I select manually the rEFInd from the Apple boot picker. It does not work in an automatic manner.

     
  • Startergo

    Startergo - 2021-03-10

    Unfortunately the boot only works if I select manually the rEFInd from the Apple boot picker. It does not work in an automatic manner.

     
  • Roderick W. Smith

    I'm pretty much flying blind here, but I looked over the EFI variable handling code and just posted a small tweak to git (603dad). Could you give that a try?

    If that fails, I'll need more information:

    • A log file, if logging works. (I made changes recently that I expect will fix your problem with that.)
    • The output of efibootmgr -v in Linux, as root or using sudo, if you're dual-booting with Linux.
    • The output of gdisk -l /dev/sda, as root or using sudo, changing /dev/sda to whatever your disk device filename is. (This will be something like /dev/disk0 in macOS; and if you do this from macOS, you'll need to install gdisk and disable SIP, at least temporarily.)
     
  • Startergo

    Startergo - 2021-03-10
    sudo gdisk
    GPT fdisk (gdisk) version 1.0.5
    
    Type device filename, or press <Enter> to exit: /dev/disk3
    Warning: Devices opened with shared lock will not have their
    partition table automatically reloaded!
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    bootoption info Boot0080
    Name: Boot0080
    Description: BigSur - Data
    Container Partition UUID: 620991A1-787F-4945-A0A1-D8A620490755
    APFS Volume UUID: C5095A14-FCD2-4091-8B0D-4E9C3329C261
    Loader Path: \D1375666-2944-483E-A95B-6CE64A1FCAB8\System\Library\CoreServices\boot.efi
    

    Is this what you are looking for?
    Also attached more info.
    I will now boot latest build and let you know.

     

    Last edit: Startergo 2021-03-10
  • Startergo

    Startergo - 2021-03-10

    Again does not boot automatically, but only selected from the Apple boot picker. I don't have Linux installed. Can I obtain the requested data from OSX?

     
    • joevt

      joevt - 2021-03-11

      gdisk

      You can install gdisk in macOS. Go to http://www.rodsbooks.com/gdisk/download.html

      Or use these macOS commands:
      sudo gpt -r show -l /dev/disk0
      sudo gpt -r show /dev/disk0
      diskutil list /dev/disk0

      for thedisk in /dev/disk0s*; do echo ${thedisk/\/dev\//}; diskutil info $thedisk | egrep 'Volume Name|UUID|Type|Visible|Offset|Size' ; done
      

      efibootmgr

      In macOS, the dumpallbootvars command from the gfxutil.sh script should be sufficient.
      https://gist.github.com/joevt/477fe842d16095c2bfd839e2ab4794ff

      Does the path used by the Apple boot picker match the path that was created by bless? Use dumpallbootvars to check the path that was created by bless. It probably has a description of Mac OS X.
      Then reboot, go into the Startup Manager (hold the Option key at boot), select the rEFInd option, hold the Control key so the up arrow turns into a circular arrow and press return to set it as the new default boot path and to boot it.
      Use dumpallbootvars to check the path that was created by the Startup Manager. It probably has an empty description.

       

      Last edit: joevt 2021-03-11
  • Startergo

    Startergo - 2021-04-02

    Just tested snapshot f89bb8c808aba03df20bb3e65a60b7267d2fcf26.
    What I discovered:
    1. Automatic boot with Log level 0 does show refind boot screen without any partitions.
    2. Log level 4 or 1 hang in automatic mode boot on grey screen.
    3. Booting first to Apple bootpicker and selecting rEFind from there with log level 1 works fine. Log is attached.

     

    Last edit: Startergo 2021-04-02
  • Roderick W. Smith

    Log files for runs that succeed are useless in diagnosing problems when rEFInd hangs; I need the logs from runs that hang to do any good. This means you'll need to bypass the hanging rEFInd completely to access the log file, of course. The way I do this is to get a working rEFInd installed as the primary and then install a second rEFInd (say, to EFI/refind-test on the ESP) that I launch from the first one, and configure the second one to produce logs and fail. Alternatively, rEFInd can be bypassed on a boot-by-boot basis by using the computer's own boot manager.

     
  • Startergo

    Startergo - 2021-04-03

    Hmm, but that is like catch 22.
    If rEFInd does not hang the log is useless. If it hangs it cannot produce the log. Am I missing something?

     
  • Startergo

    Startergo - 2021-04-03

    Ok. Booted throgh rEFInd automaticaly with log disabled. No partitions available. Entered shell and booted refind-test. Only few partitions were recognized and only HFS+. Log attached:

     

    Last edit: Startergo 2021-04-03
  • Startergo

    Startergo - 2021-04-03

    I have to mention that only HFS+ partitions were recognized during second run from shell. This is a known issue for the MVC vbios as it disables the APFS for some weird protection reason. @dakanji has a workaround for this in the RefindPlus:

    # Supply APFS filesystem capability. When this option is active, RefindPlus will load
    # Mac OS APFS filesystem drivers, apfs.efi, which are available in system folders of
    # Mac OS 10.13 (High Sierra) and later. The drivers are loaded to match each specific
    # Mac OS version and this ensures that changes made by Apple to the drivers for different
    # Mac OS versions are accounted for as compared to loading a single APFS driver for every
    # Mac OS versions in use. This setting only applies to Mac OS and only functions if needed.
    # NB: This functionality is only available on TianoCore Builds
    #
    # Inactive when commented out (Does not supply APFS filesystem capability)
    #
    supply_apfs
    

    I am not sure though why on an initial scan the HFS+ are also unavailable?

     
  • Startergo

    Startergo - 2021-04-03

    So I loaded apfs_x64.efi and hfs_x64.efi in drivers in the first rEFInd instance. Then it automaticaly booted to the second rEFInd instance and continued automatically to the OS. Log attached:

     

    Last edit: Startergo 2021-04-03
  • Startergo

    Startergo - 2021-04-03

    As soon as I enable logging in the previously working first rEFInd instance it hangs again.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.