Wow!!! This looks VERY promising indeed!
My weekend is almost over, but I couldn't resist trying it out:
Partitions on hd are all "normal" and visible (p1=EFI, p2/3/4/5: OS partitions, p6/7: Data)
(1) In Windows, create file "carrier.dat" of exactly 17042 bytes (I used "FileFiller")
(2) Boot PE, copy file to harddisk (EFI partition).
(3) Boot Grub4UEFI, "c" for command line, create partition table backup with:
dd if=(hd0)0+34 of=(hd0,0)/carrier.dat bs=512 count=34
(4) Boot PE, copy (don't move) S:\carrier.dat to a new name, "ptb-1111.bin" (ptb= "partition table backup", all the "1's" indicate a "visible" partition, a "0" would indicate a hidden partition). So this particular backup has all partitions as "normal".
(5) Still in PE, use diskmanagement to remove "OS" partitions 2,3 and 4 (partition numbers 3,4,5). So now only the EFI partition is visible, one OS partition, and the two data partitions. This is the desired layout for when we want to boot "OS1/ Windows1" with Grub4UEFI!!!
(6) Reboot to Grub4UEFI, command line, create a backup of this particular partition table, same command line as (3)
This causes "carrier.dat" to be overwritten, which is as expected (and actually "necessary", as Wonko showed).
(7) Like (4), boot PE, copy (don't move) S:\carrier.dat to a new name, this time it's "ptb-1000.bin" (1=visible, 0=hidden).
At this point I first wanted to test a restore of the original partition table (ptb-1111.bin), and everything worked! Tried to boot Windows from partition 2 ("OS1/Windows1"), worked fine.
So now I have to repeat the steps above to complete the list:
ptb-1111.bin (safety backup, all partitions visible)
ptb-1000.bin (show OS1, hide others)
ptb-0100.bin (show OS2, hide others)
ptb-0010.bin (show OS3, hide others)
ptb-0001.bin (show OS4, hide others)
When all the files are created, I will test integrating them into menu.lst, which means adding this command for each OS selection:
dd of=(hd0)0+34 if=(hd0,0)/ptb-xxxx.bin bs=512 count=34
(replace "xxxx" with the desired config).
Until now, I only have "1111" and "1000", I will do the others later.
This might not be the "ultimate" solution for "simple" GPT partition hiding, but it is a very interesting concept, and until I learn more by studying the actual partition table backups, etc., I think this is not a bad solution!
All the "hard work" can be conveniently done in PE/ DiskManagement, Grub4UEFI doesn't have to do much "new" stuff, you just have to make sure you have your partition table backups copied to the correct filenames.
A very big thanks again to Wonko!