I am dealing with a PC, some off-the-shelve HP office box, a few years old. I had been using it for a while with different flavors or Linux mostly for computing stuff headless. At some point, I had to install Windows 7 x86_64, so I removed all previous hard drives from the machine, found another SSD, plugged it in, wiped it blank and installed Windows 7 (all defaults) on it. From what I can tell, it was installed in UEFI boot mode (i.e. the SSD has a small FAT32 partition with set boot flag).
Time goes by, I need to run Linux on this machine again, I plug out the SSD and install Linux Mint (i.e. Ubuntu), most recent version as of 2 weeks ago, onto a USB flash drive. The Mint installer throws error messages at me, telling me that there is another OS on this PC which runs as in legacy BIOS mode and installing Mint in UEFI mode is a bad idea. Remember, the SSD was plugged out. Ok ... I can not convince the Mint installer not to crash over this error message, so I partition my USB flash drive manually with GParted. 512 MByte FAT32 with BOOT flag set plus an ext4 system partition, GPT partition table. I run the Mint installer again and point it to those partitions. It throws another warning at me but does not crash. Mint installs (in UEFI mode) and works. Kernel and Grub updates work.
Time goes by, again, and I need Windows again. I still have my SSD around, so I plug it in. The USB flash drive is also present, I thought it would not matter ... I boot the PC, Windows works just fine, I shut it down. Well, now I want to start Mint. UEFI does not find it. Period. I unplugged the SSD. I tried every available USB port. I switched Secure Boot on (just for fun) and off again. I switched to BIOS boot only mode and back to UEFI / legacy combined. I switched to UEFI only mode. It just wont recognize Mint. Going through the boot menu of UEFI does not list the USB flash drive as an UEFI boot option, only as a Legacy BIOS option (I remember it was listed as an UEFI option when I installed Mint onto it).
The Mint UEFI boot partition is untouched, as far as I can tell (change dates match with the date of the last Grub update). The BOOT flag is set. There really is not anything wrong with it, as far as I can tell. My only "mistake" was booting Windows once while the USB flash drive containing Mint was plugged into the PC.
What can I do to debug and/or resolve this issue? What am I possibly overlooking?
EDIT (1): This is what
gdisk tells me:
# gdisk -l /dev/sdc GPT fdisk (gdisk) version 0.8.8 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sdc: 30464000 sectors, 14.5 GiB Logical sector size: 512 bytes Disk identifier (GUID): *** Partition table holds up to 128 entries First usable sector is 34, last usable sector is 30463966 Partitions will be aligned on 2048-sector boundaries Total free space is 4029 sectors (2.0 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 1050623 512.0 MiB EF00 2 1050624 30461951 14.0 GiB 0700
Code EF00 for partition 1 is irritating. Should not it be EE00?
Also posted in the Mint Forums.