Sunday, July 19, 2015

windows 10 - What is written in the EFI partition ? In details




  • I have a HDD(called HDD1) with some partitions such as EFI partition and windows 10 partition.

  • I have another HDD (called HDD2) with only a EFI partition and windows 10 partition.




I would like to replace the windows partition from HDD2 to HDD1. (kind of restoration)



What should I replace from the EFI partition of HDD2 to HDD1 in order to be able to boot on windows ?




  • Could you tell me in details what there are inside the EFI partition ? (the bit/sector start of the windows/linux/any_other_OS partition ?)

  • Is there any unique ID for each windows inside the EFI ? (means just replacing the windows partitions/files is not enough)




I'd like to know the EFI system in a low level in order to know what is possible to do or not.



Assumption: The windows partition of HDD2 is same size or smaller than the HDD1's one.



Edited: By just replacing the windows partition, it's working. Means in the EFI partition, there is no information about windows installed. But I don't get why there are so many files in the EFI partition.


Answer



In the efi partition, there is the efi boot loader in the directory /EFI/boot, and on a x64 system the file bootx64.efi is loaded, on a x86 system the file bootia32.efi is started. No sector addresses or similar are needed, because the EFI understands the file system (FAT32).



Windows stores its boot configuration in the directory /Microsoft/Boot/, namely in the file BCD (which is a registry hive with the boot settings) and various language files in respective sub-directories.




The BCD file stores entries for the boot loader, and addresses the partitions (at least on GPT systems) via their unique ID. So simply copying a given BCD to another disk won’t work, as the unique IDs won’t match, and Windows will stop booting with the error 0xC0000255.



You can use a tool like bcdedit to fix that, or Visual BCD editor.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...