In my PC I have a HDD and SSD. On my SSD I have installed Windows 8.1, and my HDD's sole purpose is to hold some data. I needed access to Ubuntu, so I installed in on a pendrive and it's working fine if I've choosen booting in Legacy mode (and put pendrive before SSD with Windows bootloader). However, it doesn't work in UEFI mode at all.
I don't want to use this Legacy mode, as I want my Windows to be available ASAP and UEFI simply works faster. However, I want my Ubuntu start if this pendrive is attached to my laptop. During installation I showed that I want to have bootloader installed on my pendrive.
What can I do?
My version - Ubuntu 14.04LTS.

- 113
-
uninstall grub from pendrive from ubuntu and install grub in /dev/sda – Faizan Akram Dar Mar 16 '15 at 16:17
-
1If you installed Ubuntu in legacy mode on the pendrive then this might be helpful http://askubuntu.com/q/559007/40581 otherwise you should [edit] your question and state exactly what your problem is and what you have already done trying to solve it. – LiveWireBT Mar 16 '15 at 16:36
1 Answers
First, be aware that Windows 8 uses various tricks to reduce boot time. One of these is to turn shutdown operations into suspend-to-disk actions, which enables faster startup. The problem with this is that filesystems are left in an unclean state; only Windows (indeed, only the specific instance of Windows that was most recently "shut down") can safely access the filesystem. Dual-booting in such a configuration is unsafe, since the EFI System Partition (ESP), which holds boot loaders, is affected. It gets worse if you try to access the Windows partition or any shared data partition from Linux. To safely manage a dual boot of Windows 8 or later and Linux, you must disable this "fast startup" feature, as described here (among many other places).
Second, you can boot a BIOS-mode Linux installation by setting up an EFI-mode boot loader. In the case of your installation on a flash drive, you can either:
- Create an EFI System Partition (ESP) on your flash drive and install whatever EFI boot loader you like on there as
EFI/BOOT/bootx64.efi
. You'll then need to use your firmware's built-in boot manager to select the USB flash drive to boot, much as you'd do if you wanted to run an Ubuntu installer. - Install your EFI boot loader of choice on the hard disk's ESP. You'll have to configure it to boot the kernel from the USB flash drive, or at least to boot a kernel from the hard disk's ESP and use the USB flash drive's root (
/
) filesystem.
The first approach makes your USB flash drive installation easily portable to other systems but may be a little more hassle to use. The second approach means you won't have to monkey with the firmware's boot manager, but you'll be altering your boot path even when you want to boot Windows, which will slightly slow things down.

- 44,284
- 7
- 63
- 105
-
After several hours of trying, reinstalling system and so on I finally managed to make it work. I'll post later how exactly I did manage to achieve that. Problem is that during installation, Ubuntu doesn't install bootloader to ESP (even though I told installer to do so) and I had to do it manually, just like accepted answer says in question @LiveWireBT suggested in comment below my question. – spoko Mar 19 '15 at 15:47