Let us say we have a Dual Boot Machine. Or we have a Linux LiveCD in the CD Drive.
We are running Windows & select reboot or Hibernate.
The Machine exits the OS and goes back to the Booting Process.
Here we can select some other OS. Or we can boot the Linux LiveCD in the CD Drive.
Then we shutdown the other OS.
When we reboot, Windows again takes control. Does this Windows instance "know" that there was some other OS running in between reboots ?
I am thinking about some CMOS Setting (or BIOS or UEFI or Similar) which records the Previous Boot Device.
Comparing this with Current Boot Device will tell the OS that there was some other OS running in between.
Is that Possible ?
Though I am asking this out of curiosity, there are Practical reasons about this :
Eg 1 : When we have a Corporate laptop, and the Corporate Policy is to not use Linux LiveCD (eg to extract Confidential Data out of the HardDisk) , it may be useful to check "Previous Boot Device" and record it against the employee.
Eg 2 : Windows may hypothetically want to go into "Paranoia Mode" about system file integrity and initiate a full system check if & when it detects that "Previous Boot Device" was not Windows.