First, you say your "BIOS is UEFI," but that's not true. You almost certainly have no BIOS; you have a UEFI. This may sound like splitting hairs, but it's not; referring to an EFI/UEFI as a "BIOS" drags in a lot of assumptions that simply do not apply in the EFI world. ("UEFI" is essentially version 2.x of EFI, so I generally use "EFI," as it's the more general term.) Generally speaking, EFI is a replacement for BIOS, not an extension to it. There are some exceptions and caveats, though:
- Some very early EFIs were built atop a conventional BIOS. One example I've seen is Gigabyte's Hybrid EFI. Such systems do have a BIOS, and it's used both to boot BIOS-mode OSes and to initialize the hardware for the benefit of the EFI.
- Most modern EFIs for x86-64 systems include a Compatibility Support Module (CSM), which enables the EFI to use boot loaders written for BIOS. The CSM is to the EFI as WINE or dosemu is to Linux; but just as WINE does not turn Linux into Windows, the CSM does not make the EFI a BIOS.
Sorry if this seems long-winded and pedantic, but it deserves emphasis because I see a lot of people heading into EFI-land with BIOS assumptions that lead them into trouble. This is evident in your own question....
On an EFI-based computer, installing a second OS does not normally overwrite the boot loader of the first OS. Of course, you must make room for the second OS's partitions, but that's independent of the boot loader. Under EFI, boot loaders are stored as separate files on the EFI System Partition (ESP), which is a FAT partition with a type code of C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EF00 in
gdisk, the "boot flag" set in
parted or GParted, "EFI System Partition" or "EFI boot partition" in the Ubuntu installer).
EFI determines which boot loader to use by entries stored in NVRAM. When you install Ubuntu, it will create its own boot loader (GRUB) on the ESP (stored in
EFI/ubuntu), add that new boot loader to the computer's NVRAM-based list, and then set the Ubuntu entry to be the default. Ubuntu will not change the Windows boot loader, but that Windows boot loader will run only if you enter the computer's own boot manager and select it or if you chainload it from GRUB. Once you install Ubuntu, you can tweak these settings with the
efibootmgr utility; for instance, you could set the Windows boot loader to be the default and then use the machine's built-in boot manager to select GRUB. To do this, you must first identify the existing entries by typing
sudo efibootmgr and then set the boot order you desire (so that Windows is first) with the
-o option, as in
sudo efibootmgr -o 2,5 to make
Boot0002 first and
Note that a Linux-capable boot loader is required to boot Linux. It doesn't have to be GRUB, but something is needed. Thus, your option #1 will work only if you install something manually. There are several EFI boot loaders for Linux available -- see my page on this subject for details. You could in principle install one of these on a USB flash drive, leaving the ESP and NVRAM untouched. I don't know what the point of that would be if you've got a regular disk-based installation of Ubuntu, though; it would be like trying to keep music out of an opera house by banning iPods within its walls.
If you want to keep GRUB from installing in Ubuntu, the trick is this:
- When you launch the Ubuntu installer, select the option to try Ubuntu before installing it, rather than the option to install it.
- When the desktop appears, open a Terminal window by clicking on the Ubuntu icon in the upper-left corner, typing
terminal in the search field, and hitting enter or clicking the Terminal icon.
- In the Terminal window, type
ubiquity -b. This launches the installer program (Ubiquity) with an option (
-b) to not install a boot loader.
Once the install is finished, it will be up to you to install a boot loader yourself, whether it be to the ESP or to a USB flash drive. Again, see my EFI boot loaders page (referenced earlier) for information on what's available and basic installation instructions.