Menu

rEFInd and Win10 Hibernation

2018-10-02
2018-11-13
  • Carlo Vaiani

    Carlo Vaiani - 2018-10-02

    When I trigger hibernation in Windows something rather weird happens.
    I have rEFInd configured to boot automatically Windows, unless a key is pressed at power on time.
    So, when I power on my laptop after hibernation, Bitlocker recovery screen is shown, asking to enter encryption key.
    If I do nothing, after some 20-30 seconds the laptop switches itself off.
    At following power on, though, machine boots automatically to Windows, loading the hibernated state.
    Any idea what the cause is and, most of all, how to avoid that inconvenience?

     
  • Roderick W. Smith

    Does rEFInd appear in either of these power-on cases? I'm guessing not, but it's unclear from your description if this guess is correct.

    If rEFInd isn't appearing, then this sounds like a Bitlocker bug or quirk. I'm not familiar with that software, so I can't be sure what should be happening -- it could be that it should ask for a password on every boot, in which case the boot when it doesn't ask for one is a security bug; or it could be that it shouldn't ask for a password, in which case the first boot is a bug that's presumably not reducing security compared to what's intended.

     
  • Carlo Vaiani

    Carlo Vaiani - 2018-10-26

    I tried it once more.
    rEFInd does appear at power up from hibernation.
    This time, I noticed that rEFInd seems to be using a different configuration: instead of automatic boot, as per my running config, a 20 sec timeout is shown (which does not run, as we are already discussing here)
    The point is that I can only find one other refind.conf file in my disk, in a folder named AA1DD412-5B27...something in C:\\ . It has the same structure the main EFI system folder, but different contents.
    However, editing rEFInd.conf over there has no impact: 20 sec timeout is still shown.
    I think we can ignore the issue with Bitlocker asking for the decryption key. Probably it comes from the fact that the Windows boot launched by the rEFInd instance shown after hibernation has something different than the "production" one, which triggers Bitlocker security measures.
    As I wrote, if I further reboot my PC (e.g. clicking on Reboot icon in rEFInd) everything runs fine (i.e. rEFInd shows up and it goes on automatically booting Windows, as per my config file, correctly resuming status at hibernation time).

    [EDIT]
    I found out what instance of rEFInd gets launched after hibernation,
    This is the structure of my ESP (in a Toshiba laptop):

        Directory: Y:\EFI
    
    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    d-----       17/09/2018     11:46                Microsoft
    d-----       19/09/2018     21:48                ubuntu
    d-----       26/09/2018     16:20                refind
    d-----       19/09/2018     20:21                tools
    da----       26/10/2018     10:51                Boot
    

    Upon cold start, Toshiba'sUEFI launches a hard coded bootx64.efi boot manager in Y:\Boot. I of course replaced that with rEFInd by renaming the file.
    After hibernation resume, on the contrary, rEFInd instance in Y:\refind gets launched.
    In there, I had removed rEFInd.conf, so rEFInd went on using its default configuration (with 20 sec boot timeout).
    I proved that by adding a config file in Y:\refind and setting a particular boot timeout value (17 sec).
    (I suppose Windows is better capable of using UEFI variables and finds the boot settings created by rEFInd at installation time).
    Anyway, the main problem still remains: the first time rEFInd is launched after hibernation, it somehow calls a Windows boot loader that "disturbs" Bitlocker. This happens even if I copy the main config file from Y:\Boot to Y:\refind.
    At the following boot, resuming from hibernation runs well.

     

    Last edit: Carlo Vaiani 2018-10-26
  • Roderick W. Smith

    I suggest restoring your EFI/BOOT directory on your ESP to its stock configuration and configuring rEFInd in EFI/refind to launch in the conventional EFI manner via EFI variables. (You'd edit these with efibootmgr in Linux, Easy UEFI in Windows, etc.)

     

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.