Today I bought a Lenovo G510 Laptop (4GB Ram, 500GB Hard Drive) and need install both Ubuntu and Windows 7. I have some questions regarding this.
What OS should I install first ?
What are the partition sizes should I put for swap, root and home ?
First Install windows on your lappie (You can install ubuntu too but then u have to run boot repair from live usb to repair the grub becoz Windows bootloader is aggressive).
Follow these steps if your lappie supports BIOS (the steps are totally different for UEFI lappie)
Partition should be of ext4 type memory for ubuntu
Kindly approve my answer if it helps you by clicking the tick below the the arrow pointing downward since it will increase your reputation as well as mine
Just as anybody else until now suggested you: First install Windows, then Ubuntu.
I personally gave 40GB to Ubuntu as root partition without using an extra /home partition and about 800MB swap (2G RAM).
If you want to split them up, you should size the / in a way that it can hold all your programs and system. Depending on what you are going to install, maybe 10GB might be enough (around 2-3GB is absolute minimum for the bare system, I think), but e.g. many big games, office progs, media stuff etc might also require a lot more... Then in contrast, the /home partition will contain all your data (photos, music, videos, documents, downloads, system/program settings etc.). So the main part of this will be made by your multimedia data, the rest should not take more than a GB or so.
For swap, I think it is recommended to give it about the same size as your RAM, a bit bigger if you want to use it for hibernation (not recommended since version 12 ?)
But about the file systems: Ubuntu's default file system for data partitions (all except swap) is ext4! I would suggest you to use this instead of old FAT or windows' newer NTFS. You would not be able to access the files on a ext4 volume from within windows without additional drivers, but for Ubuntu, it has several advantages, e.g. it does not require any defragging and provides always high data transfer speed. As a workaround, you could allocate another partition in NTFS or FAT32 where you can copy the Ubuntu files you have to access from Windows too (the other direction works directly). For swap, you of course use linux-swap.
Install Windows first, its bootloader is rather aggressive and will not let you access your (previous) linux installation without further configuration (such as installing the GRUB boot loader again from some medium). Installing Ubuntu second will replace the Windows bootloader with GRUB, saving you the trouble.
I doubt you would benefit from creating a separate /home partition. Just go with root and swap. Swap should be double the RAM (8 GB in your case), depending on how much memory you tend to use (leaving lots of applications open etc). The size of root depends on what you use the system for.
I would install windows 7 first Ubuntu handles being installed secondly much more efficiently than Windows.
Follow these steps
As far as partition sizes are concerned I would go for 30gb ntfs partition for windows and you will need 2 fat32 partitions for Ubuntu
A swap partition of 2gb to 4gb and a root partition that is a minimum of 10gb.
Give Ubuntu a partition of about 20gb but it's a personal preference thing.
The remaining space left on the hard drive you might want to set up as a logical drive you can use ntfs or fat32 but I prefer to use a fat 32 partition labelled Data or media. Just how I set up my system.
Yeah, you should install windows first. However, during linux installation, when partitioning it is important to have a separate /home partition so that in case of computer or reinstallation later you can select that same partition for home instead of allocating new space. This way you can prevent loss of data. You could additionally do this for /var, /tmp etc but that's a personal preference or if you have a large system with lots of users