Windows 8 will not overwrite your boot partition (/media/sdb8) if you you specifically tell Windows not to do so during the installation process (hard disk setup where you select which partition to install C: drive on...). But Windows 8 will overwrite your MBR, as far as I know. So, once Windows 8 is installed, you will not be able to boot into Ubuntu; even though you will still be able to boot into Windows 7.
To fix this problem, you will need the same version of the Ubuntu LiveCD from which you had installed Ubuntu. Using the LiveCD, you can fix the MBR to show a boot screen to select Windows 8, 7 and Ubuntu. The detailed instructions can be found here: https://help.ubuntu.com/community/Grub2#Copy_LiveCD_Files.
I am listing them here for convenience.
- Boot the LiveCD Desktop.
- Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.
- Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".
sudo fdisk -l or
sudo blkid. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently. Example: the MBR may be installed on /dev/sdb and the Ubuntu partition may be on /dev/sdb3.
- Mount the partition containing the Ubuntu installation:
sudo mount /dev/sdXY /mnt. Example:
sudo mount /dev/sdb3 /mnt. Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot. Since you have a separate boot partition (which contains grub - /media/sdb8 - you will need to run the following command as well:
sudo mount /dev/sdb8 /mnt/boot. Note: If the user has a separate /home partition, this must be mounted to /mnt/home. Encrypted home partitions should work.
- Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device. If you are using 10.04 or 10.10, then run
sudo grub-install --root-directory=/mnt /dev/sdX. Example:
sudo grub-install --root-directory=/mnt /dev/sdb. If you are using 11.04 or 11.10, then run
sudo grub-install --boot-directory=/mnt/boot /dev/sdX. Example:
sudo grub-install --boot-directory=/mnt/boot/ /dev/sdb.
- Reboot into the Ubuntu installation on your hard disk.
- Refresh the GRUB 2 menu by typing the following command in your terminal:
NOTE: As answered by Steve, "Windows 8 uses the new Protogon file system". Grub does not have support for this file system (yet!). Once this support comes, you can use Grub to boot into the Windows 8 bootloader. Until that time, as suggested by jart, use a separate hard disk to hold the Windows 8 partition and it's bootloader. This way, even the Ubuntu hard disk MBR will not get over-written. Unplug the Ubuntu hard disk when you are installing to the Windows 8 hard disk. Once the installation is complete, plug the Ubuntu hard disk back in, boot into the Ubuntu hard disk (by setting it in the BIOS boot sequence) and follow the steps which I have outlined above.