Windows 10 e disabilitazione della funzionalità di fast startup

In Windows 8 era stata introdotta la funzionalità Fast Startup per aumentare le performance del boot, a riguardo si veda il post Delivering fast boot times in Windows 8:

“In Windows 7 we made many improvements to the boot path, including parallel initialization of device drivers, and trigger-start services, but it was clear we’d have to get even more creative (and less incremental) if we hoped to get boot performance anywhere close to fast enough to meet all of these needs.

Our solution is a new fast startup mode which is a hybrid of traditional cold boot and resuming from hibernate.”

In sintesi rispetto a Window 7 a partire da Windws 8 al momento dello shutdown viene eseguita la chiusura della sessione utente e l’ibernazione della sessione kernel:

“Now here’s the key difference for Windows 8: as in Windows 7, we close the user sessions, but instead of closing the kernel session, we hibernate it. Compared to a full hibernate, which includes a lot of memory pages in use by apps, session 0 hibernation data is much smaller, which takes substantially less time to write to disk. If you’re not familiar with hibernation, we’re effectively saving the system state and memory contents to a file on disk (hiberfil.sys) and then reading that back in on resume and restoring contents back to memory. Using this technique with boot gives us a significant advantage for boot times, since reading the hiberfile in and reinitializing drivers is much faster on most systems (30-70% faster on most systems we’ve tested).”

A riguarda si veda anche Distinguishing Fast Startup from Wake-from-Hibernation:

“Starting with Windows 8, a fast startup mode is available to start a computer in less time than is typically required for a traditional, cold startup. A fast startup is a hybrid combination of a cold startup and a wake-from-hibernation startup. Frequently, kernel-mode device drivers need to distinguish fast startups from wake-from-hibernation so that that their devices behave as users expect. To make this distinction, drivers can use information that is available in system power IRPs.

 

During a cold startup, the boot loader constructs a kernel memory image by loading the sections of the Windows kernel file into memory and linking them. Next, the kernel configures core system functions, enumerates the devices attached to the computer, and loads drivers for them.

 

In contrast, a fast startup simply loads the hibernation file (Hiberfil.sys) into memory to restore the previously saved image of the Windows kernel and loaded drivers. A fast startup tends to take significantly less time than a cold startup”.

La gestione di tale funzionalità è disponibile tramite pannello di controllo:

In alternativa è possibile utilizzare il tool a riga di comando PowerCfg.exe, a riguardo si veda il post Windows 8 / Windows Server 2012: Faster Boot Process.

Per quanto riguarda la gestione della funzionalità di Fast Startup tramite Group Policy erano state rese disponibili una serie di informazioni nel post Supporting Windows 8 Fast Startup with Group Policy. Una prima considerazione è relativa al fatto che il Fast Startup è attivo, per defualt e che potrebbe in alcuni casi impedire l’applicazione delle Group Policy e/o delle Group Policy Preferences:

Are there any considerations for using Group Policy with Fast Startup-enabled PCs?

Yes – when using Fast Startup on Windows 8 PC’s, you’ll find that policy and preference items that are targeted during computer shutdown and startup will not be applied during default shutdown and startup operations. This occurs because the operating system kernel is not completely shutdown when using Fast Startup, rather it is hibernated and resumed, which bypasses the processing of these policy and preference items.

NOTE: Even if Fast Startup is left at the default setting of being enabled, a full computer shutdown can still be initiated by end-users by holding down the Shift key while performing a shutdown manually. In addition, Computer Restart operations perform a full shutdown, as this is commonly required after applying system updates or installing new applications.”

Una seconda considerazione è relativa al fatto che il Fast Startup interviene solo durante lo shutdown e l’avvio e non durante il riavvio:

“Can I force Group Policies to be applied to Fast Startup-enabled PCs?

Sure thing – note that Fast Startup, when enabled, only applies on shutdown and startup operations. Computer restarts always perform a full kernel shutdown. If we keep this in mind, we can restart computers outside normal business hours to apply policy and preference items targeted for computer shutdown and startup.”

Per quanto riguarda la gestione tramite Group Policy della funzionalità di Fast Startup al momento anche il Windows 10 esiste solo la group policy introdotta con Windows 8 ovvero la Computer Configuration\Policies\Administrative Templates\System\Shutdown\Require use of fast startup che consente solo di forzarne l’utilizzo si noti che se tale policy non è impostata è disabilitata vengono utilizzate le impostazioni locali di sistema che prevedono che tale funzionalità sia attiva per default (a riguardo si vedano anche Group Policy Settings Reference Spreadsheet Windows 1803 e Group Policy Search):

“This policy setting controls the use of fast startup. If you enable this policy setting, the system requires hibernate to be enabled. If you disable or do not configure this policy setting, the local setting is used.”

Per disabilitare la funzionalità di Fast Startup tramite Group Policy è possibile utilizzare una Group Policy Preference per configurare la chiave di registro HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power per impostare il valore HiberbootEnabled di tipo DWORD a 0.

Su determinati computer potrebbe essere necessario disabilitare tale funzionalità se si verifica ad esempio l’issue che sebbene si arresti il computer questo si riavvia autonomamente dopo qualche secondo, ho rilevato questo issue su computer particolarmente datati e disabilitando il Fast Startup il problema si è risolto.

Un’altra considerazione che va fatta è che se il Fast Startup è abilitato quando si arresta il computer verrà utilizzato il file Hiberfil.sys per persistere lo stato del sistema e questo potrebbe consentire ad utente malintezionato di estrarre informazioni sulla sessione precedente, si pensi al caso del furto di un computer. A riguardo si vedano le considerazioni riportate nel seguente forensicswiki.org -Hiberfil.sys.