Install Grub2 On Usb Drive From Windows
If the Grub entries do not allow you to boot into Windows after installing Phoenix OS, then you can use the bootable Windows media (DVD or USB pen drive) to boot and then perform startup repair.
I've been trying to find a way to install grub2 to a usb drive, in such a way that I can boot a PC in UEFI mode into Ubuntu, without modifying the UEFI firmware settings in any way or replacing the pre-installed Windows 7 x64 bootloader with grub. You cannot set two /boot partitions with boot-flag! There is only one boot-flag necessary for grub2 in /boot partition - so simply deactivate boot-flag in your partition /dev/sda1 After this activate boot-flag in /boot partition of /dev/sdi - sure? This is correct? You have a /boot partition in /dev/sdi? So there you need to activate boot-flag ( simply with gparted ). Grub2 is already installed in /dev/sdi?
» Vfx Stock Video Footage ( 113 clips) A collection of HD and 4K vfx stock video clips including smoke, particles, green screen and video overlays, free to download.

Usb Drive Not Recognized
If not now follows (necessary because you modified boot-flags): sudo grub-install /dev/sdi sudo update-grub2 Before this all your machine was booting into Windows 7 of /dev/sda3 via /dev/sda1 - but now boot-flag is deactivated and set to /boot partition of /dev/sdi - and your machine should now boot to installation of your usb-drive. Only in case that in UEFI-mode your machine is not able to boot into usb-drive - then you should disable UEFI-mode in BIOS-settings and enable there EFI-mode instead. You're almost there. Removable media like usb will boot from a boot able EFI partition (and that's one bootable EFI partition PER DEVICE, not total), using the bootloacer /EFI/Boot/bootx64.efi (for x64 architectures). Simply copy your /EFI/ubuntu/grubx64.efi to /EFI/Boot/bootx64.efi, and have a copy of grub.cfg in /EFI/ubuntu/grub.cfg and it should boot. Of course, the grub.cfg must be set up to boot the hard disk like you want. Simply copying the grub.cfg off the hard disk's installation will work, but then you will need to recopy every time you update kernels, so you can make the /EFI/ubuntu/grub.cfg a few lines which import the maintained /boot/grub/grub.cfg (like 13.04 does I think).
* For Secure boot, use shim.efi for the /EFI/Boot/bootx64.efi and have a copy of the SIGNED grubx64.efi in /EFI/Boot also. Grub.cfg is in the same place, /EFI/ubuntu. Your live media uses this mechanism to boot, so if it works, this method will work. I mounted the gpt-system partition on the SSD as read-only, copied the contents of EFI/ubuntu/ to my pen drive, then copied EFI/ubuntu/grubx64.efi from the SSD system partition to EFI/Boot/bootx64.efi on my pen drive. First I tried to boot the pen drive using the grub.cfg from the /EFI/ubuntu/grub.cfg located on the SSD system partition, then from the grub.cfg located in /boot/grub/grub.cfg on the SSD's ubuntu partition. Just to be clear, does grub.cfg have to be in /EFI/Boot or /EFI/ubuntu?
– Aug 8 '13 at 13:38 •. Might and magic heroes 6 shades of darkness. There is no such thing as a '/boot flag.' GParted and parted do have a 'boot flag' (no leading slash), but this terminology is confusing at best.
The GParted/ parted 'boot flag' is really a way to set the type code on a partition to identify it as an from which the firmware reads boot loaders. Contrary to what dschinn1001 seems to be saying, you should not set the type code for your Linux /boot partition to the ESP code. It's legal to have multiple ESPs on a single disk, although Windows is allergic to such setups, so I recommend against it. The ESP must have a FAT filesystem (technically FAT32, although FAT16 often works in practice), so unless your Linux /boot partition uses FAT, you should not set the GParted/ parted 'boot flag' on the /boot partition. Installing GRUB on a USB flash drive is technically possible, but it's a bit limiting.