I have a bootable USB stick created using PEBakery on a Fat32 partition that resides on a USB flash drive. When I insert this flash drive into a USB port of my computer and boot, it will be recognized as bootable by the UEFI and can be selected for booting from.
For a test system that already contains a bootable Windows partition, I would like to get rid of the USB flash drive and add another partition on the existing hardrive instead, copy the files from the USB flash drive to that partition, and make it bootable from either the system UEFI or the Windows 10 bootloader.
My current partition Layout looks like this:
500 MB EFI System Partition, no drive letter
80 GB Boot Page File Primary Partition, drive letter C
160 GB unpratitioned space left
My first attempt was to create a 4GB FAT32 partition on the unpartitioned space, and copy all the files from the flash drive (folders efi, boot, etc) there. Unfortunately, this seems not to be sufficient, neither the windows bootloader, nor the UEFI system when booting the PC recognize this partition as bootable.
Which steps need to be performed to make the contents of the USB flash drive to be bootable from the internal harddisk on an additional partition instead? I haven't found anyone else yet who wanted to do something similar, but I think it should be somehow possible.
Thank you very much for any hints.