If I understand correctly what you asking, then it greatly just depends if your bios on your motherboard allows & supports booting from an external hard drive. The other thing you can do, if you need to. Is you can take the external drive out of its enclosure & install it as a normal hard drive to use as an internal. If it is 3TB or larger then you will need to get a program that will partition & format it was one partition as not all partitions including the one in windows supports anything over 3TB & will mark it as 2 or more partitions instead. I use "MiniTool Partition Wizard Free" which does what is needed for the 3TB+ size hard drives. Though I just noticed you have an all in one so that might be a challenge as I have never messed with an all in one for the simple fact if the screen goes, your screwed. So um, you need to call Sony & ask them if your computer will support booting from an external or not, and they can help walk you threw how to set that up in your bios if its an option.
Hope you find this information useful, and good luck to you!