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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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):
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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.
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 namedAA1DD412-5B27...something
inC:\\
. 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):
Upon cold start, Toshiba's
UEFI
launches a hard codedbootx64.efi
boot manager inY:\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
toY:\refind
.At the following boot, resuming from hibernation runs well.
Last edit: Carlo Vaiani 2018-10-26
I suggest restoring your
EFI/BOOT
directory on your ESP to its stock configuration and configuring rEFInd inEFI/refind
to launch in the conventional EFI manner via EFI variables. (You'd edit these withefibootmgr
in Linux, Easy UEFI in Windows, etc.)