Upgrading OSX on a three partition hard without losing bootcamp I have a three-partition hard drive on my MacBook pro mid 2009: 

1) Snow leopard (10.6.8) on Macintosh HD with 175GB free 

2) DATA on a FAT32 partition 

3) Windows 7 on a Bootcamp partition with 85GB free

I have installed windows from within the OS X, following the Bootcamp instruction, then I have created the third partition and did some "recovery" on windows side to have all three partitions working properly.

Now after some years, I want to upgrade Snow Leopard to new OS X (El Captain). 
I downloaded the new OS X from App Store, and tried to upgrade, it started the upgrade process but then it failed saying that it cannot upgrade on this partition. It suggested to change the size of Macintosh HD by at least 128 MB, and re partition it, so that it would fix the errors, and the new os x would install. So, I shrank the macintosh HD partition by 1.5 GB, and repartitioned. Still no good.

So, not that my Snow Leopard is upgraded, but also my Bootcamp startup option is also gone now. Bootcamp options does not appear in the Startup Disks menu, nor when I hold OPTIONS key on system boot.

a) how to get bootcamp startup disk back?

b) how to upgrade to el captain, maintaining three partitions, and the windows installation?

Thank you so much

edit:
Some details:

diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *750.2 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            274.5 GB   disk0s2
   3:                  Apple_HFS Untitled                24.9 GB    disk0s3
   4:       Microsoft Basic Data DATA                    299.4 GB   disk0s4
   5:       Microsoft Basic Data BOOTCAMP                150.8 GB   disk0s5


.

sudo gpt -r show /dev/disk0
Password:
gpt show: /dev/disk0: Suspicious MBR at sector 0
       start        size  index  contents
           0           1         MBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640   536157600      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   536567240      262144         
   536829384    48673336      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   585502720      262144         
   585764864   584828928      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1170593792   294553600      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1465147392        1743         
  1465149135          32         Sec GPT table
  1465149167           1         Sec GPT header


.

sudo fdisk /dev/disk0
Password:
Disk: /dev/disk0    geometry: 91201/255/63 [1465149168 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] &lt;Unknown ID&gt;
 2: AF 1023 254  63 - 1023 254  63 [    409640 -  536157600] HFS+        
 3: AF 1023 254  63 - 1023 254  63 [ 536829384 -   48673336] HFS+        
 4: 0B 1023 254  63 - 1023 254  63 [ 585764864 -  584828928] Win95 FAT-32
a) how to get bootcamp startup disk back? 

You have an additional 24.9 GB partition between the "Mackintosh HD" and the "DATA" partitions. This means you have 5 partitions (if you include the hidden EFI partition). The "BOOTCAMP" partition is the 5th and last partition. The Apple software is designed by default to search for Windows on only the first 4 partitions. This is why you can not startup to the "BOOTCAMP" partition. 

The easiest fix would be to delete this partition using the Disk Utility application. The space could then be added back to the "Mackintosh HD" partition. I have not used the OS X 10.6.8 Disk Utility application in a long time, but with the newer OS X versions, sometimes this application can fail to properly delete partitions. So, beware and you probably should have a backup of important files.

b) how to upgrade to el captain, maintaining three partitions and the windows installation?

I am not sure why El Captain would not install. Are you sure you first upgraded OS X to version 10.6.8? Also, I do not think shrinking the "Mackintosh HD" partition by 1.5 GB would help. If anything you would need to erase files to create more available storage. I believe you need 8.8 GB of available storage.

It is possible to maintain the three partitions, but requires an effort. The problem is Windows can only be aware of four partitions per HDD or SSD. For your internal drive, you currently only have four partitions. (The first partition is a hidden EFI partition.) Installing El Captain will introduce a fifth "Recovery HD" partition after the "Macintosh HD" partition.  There are three ways around this problem:


Delete the "Recovery HD" partition. You can optionally first copy
this partition to a flash drive if you wish. The problem here is
that some later update will probably recreate the partition, so you
will have to do this again later.
Use some free third party utility like gdisk to manual set which
partitions Windows can access. The problem is the Disk Utility may
reset the manual changes back to the defaults, requiring you to
manually set them again later.
Put the Windows and FAT32 partitions before the "Mackintosh HD"
partition. The problem here is that you need to reinstall Windows or
use a third party tool to move the partitions. If you reinstall, you
can not use the Boot Camp Assistant to create the Windows partition.
Personally, I chose this method. You can use the Snow Leopard
installation DVD to create the partitions.


Note: If during installation you are asked about Core Storage, I would advise to avoid using it. You do not need Core Storage unless you want to encrypt your disk.