Unfortunately, there's no standardization in how EFIs handle this sort of thing, but the behavior you describe is fairly common, in my experience. The trouble is that EFIs are much "smarter" about identifying boot devices than are BIOSes, and many EFIs remove invalid boot entries when they're identified as such. Thus, when you unplug a USB drive and start the computer up again, it will notice that there's an invalid boot entry for the USB drive and delete it from the boot list. I know of no in-EFI solution to this sort of problem.
That's not to say that there aren't workarounds, though. Specifically, you could install an EFI boot manager on your internal disk that does what you want -- that is, to boot Windows when the USB flash drive is not plugged in and boot Ubuntu from the USB drive when it is plugged in. You'd then leave this boot manager set as the default boot program.
Unfortunately, AFAIK Ubuntu's GRUB can't be configured in this way, so you'll need to look elsewhere. The rule you want to follow is simple enough that a really simple program could be written to do the job, but the one I know can do it is much more complex: My own rEFInd boot manager. I recommend you try installing and configuring it as follows:
- Boot to Ubuntu.
- Check to see what (if anything) is mounted at
/boot/efi
. (Typing df -h
will let you see the currently-mounted partitions.)
- If
/boot/efi
corresponds to a partition on the USB drive, unmount it and mount the EFI System Partition (ESP) from your hard disk. (As noted on the link, the ESP is a FAT partition with a particular type code. You may have to track it down with gdisk
, parted
, or GParted.)
- Install the rEFInd Debian package from the rEFInd downloads page. Do not install the PPA; install the Debian package (or using the
.zip
file and running refind-install
manually).
- Edit
/boot/efi/EFI/refind/refind.conf
and make the following changes:
- Optionally set
timeout -1
. If this is set, the rEFInd menu will not appear unless you hold down a key as rEFInd starts. You might want to hold off on setting this until after you've tested the installation.
- Set
default_selection "vmlinuz,Microsoft"
. This causes rEFInd to boot Linux if it finds a Linux kernel and Windows if a Linux kernel is not present -- that is, if the Linux USB drive is unplugged. Replacing vmlinuz
with grub
should also work, and is worth trying if vmlinuz
doesn't work.
- Reboot and test the system.
If you try it without setting the timeout
value, you should see the rEFInd menu appear and highlight the Windows option (which may be the only option) if the USB drive is unplugged; but the Ubuntu option should be highlighted by default if the USB drive is plugged in. If this works, setting timeout -1
will cause a straight boot to the desired OS.
If rEFInd doesn't detect the Ubuntu installation with the USB drive plugged in, try hitting Esc. If an Ubuntu option then appears, try setting scan_delay 1
(or conceivably some higher value).
The biggest problem with using rEFInd in this way is that there will be a delay as it starts up, scans for OSes, and so on. This should be just a second or two when the USB drive is not plugged in, and maybe another two or three seconds when the USB drive is plugged in. A more specialized boot manager to handle this specific task might be able to do the job with less of a delay, but I don't know of any such program.
Asus T100 is Intel Bay Trail device and most of those, despite having a 64bit CPU, have IA32 (32bit) EFI firmware. Also feature called Secure Boot is enabled in EFI setup by default and that might block some operating systems from showing up in boot menu. In order to make firmware recognize flash-drive as bootable it needs to be formatted as FAT32 and have signed 32bit operating system loader in EFI/bootia32.efi.
You do not mention which 2nd operating system you are trying to boot so I can only assume it's a Linux distribution. It probably does not show up in menu because:
SecureBoot is enabled and EFI/bootia32.efi is not signed by valid key - easiest is to disable SecureBoot in EFI setup (there should be a toggle). Beware that some Windows 10 features (e.g. BitLocker) don't work in that state.
32bit EFI loader is not present on flash-drive at all (this applies for most 64bit Linux distribution Live USBs - e.g. Ubuntu). In that case you will need to compile GRUB for 32bit EFI and place it to proper directory (and also disable SecureBoot, obviously). For Ubuntu, there are ISOs already prepared. You can find them here: http://linuxiumcomau.blogspot.com/2016/10/running-ubuntu-on-intel-bay-trail-and.html
(NOTE: those are not official Ubuntu images, have patched kernel to support specific hardware and are not officially supported in any way - please read the information on that page before trying them out.)
This page might give you some hints on getting Linux running on your device (if Linux is case): http://www.jfwhome.com/2014/03/07/perfect-ubuntu-or-other-linux-on-the-asus-transformer-book-t100/
Best Answer
You need to enable booting from non-EFI devices. This option can be found in most BIOSs called the Compatibility Support Module or CSM. This option is sometimes hidden until you disable Secure Boot. I've also seen it hidden until Fast Boot is disabled. Once you enable the CSM module and set it to boot EFI + Legacy boot devices you shouldn't have any trouble booting your USB device.