I have an Ubuntu 13.04 PC. Now, using gparted I have partitioned an ntfs file system to install Windows 7. But it seems that Windows 7 did not install any of the partition stating the selected partition is of type gpt. Now moreover trying to format, I have formatted my grub bootloader. So I can't boot to Ubuntu either. Now I have a live Ubuntu usb. But before fixing the grub, I would like to know how can I install Windows without deleting my entire Ubuntu and hard-disk? I can't do that. I have formatted the partition to ntfs using gparted. Why does Windows still give me the gpt error? Is there any way to do it? Or someone please tell me to stop trying.
Windows installs only to Master Boot Record (MBR) disks on BIOS-based computers and only to GUID Partition Table (GPT) disks on EFI-based computers. Linux, OTOH, is more flexible; it can install to GPT on BIOS-based computers, and in some cases it's possible to install to MBR on EFI-based computers. (The Ubuntu installer disallows the latter, IIRC.)
In any event, if your computer has an EFI, you should be able to proceed by forcing the Windows 7 installer to boot in EFI mode. You may be able to do this by selecting a CD/DVD boot device with "EFI" or "UEFI" in the description in the firmware's boot manager; or you may need to play games with the installation medium to get it to boot in EFI mode. I don't happen to have any URLs handy, but Googling on "boot Windows 7 installer in EFI mode" might turn something up.
If your computer has a conventional BIOS with no EFI support, your best option is to convert your disk from GPT to MBR format. You can do this with
In either case, you'll need to re-install or re-enable a Linux boot loader after you've installed Windows. The Boot Repair utility can usually do this. In the case of an EFI-mode boot, you could also try a number of alternative EFI boot loaders.