Let me deconstruct:
- You have a computer that runs Windows 8.1. A hint that it features and boots via UEFI.
- You have 2 harddrives. Windows (including ESP) is installed on the 1st drive (HDD), SSD space if free for Ubuntu installation
- You don't want to always choose on startup which system to boot, it should boot Windows by default
- No Windows boot files should be overwritten at any point
Let me try explaining it this way...
Plug and play booting for harddrives with UEFI
Old computers that only boot via BIOS/MBR
With BIOS/MBR this was easy: Just install on a separate drive, install the boot loader there and everything was fine. Installing to external drives was easy. (At least that was my experience.)
Newer computers that feature UEFI instead of BIOS
With UEFI this greatly depends on the implementation of the firmware.
What one would expect is:
- UEFIs SecureBoot extension can be disabled.
- The internal boot order of harddrives can be changed in the firmware.
- The system can handle more than one ESP.
- Managing, including adding, UEFI boot entries in your firmware is implemented in a user friendly way.
- The firmware provides CSM for booting legacy bootloaders.
- The firmware can prioritize UEFI over CSM and vice versa.
A firmware upgrade does not erase all registered boot entries in the firmware setup.
(I had negative experience with ASUS boards doing that. I am currently staying away from UEFI booting on these boards.)
It still is unclear how the various systems from various manufacturers behave. To my knowledge, there currently exists no such table where you could look up your system and find out what firmware and which version reliably implements the above points. Manufacturers tend to be not very cooperative by either not publishing changelogs for newer firmware versions at all or just providing meta description ("fixed a severe issue"[sic]) for security through obscurity reasons.
Considerations for UEFI booting
You should be able to install Ubuntu in UEFI mode without overwriting any Windows boot files, by creating another ESP on the other drive. However backing up your ESP is recommended.
I currently don't know how to dump the UEFI boot configuration in readable format to do a disaster recovery, but recovering/wrting these entries that are written to the firmware should be considered when the firmware doesn't provide functionality for managing and creating these entries (efibootmgr, UEFI shell or doing it from within Windows).
Gummiboot on the other side looks promising for setting up multiboot harddrives. One would just need to add a gummiboot entry to the firmware and everything would be fine. (Even better if the firmware detected such drives like it does with optical media or USB thumb drives.)
TL;DR: Use CSM/legacy booting
Backup your ESP!
(Zipping the contents should do the job. Also backup everything else too and have recovery media ready for Windows.)
Enable CSM, but give UEFI booting priority.
Boot installation media in non-UEFI mode.
(Alternatively disable UEFI booting for installation or just create non-UEFI bootable media.)
Install to your target harddrive and make shure the the bootloader installs there too.