I bought a new Lenovo B50-80 laptop with 4GB RAM, 500 GB HDD preinstalled with Windows 7 Professional. I would like to install Ubuntu alongside the existing Windows 7. For that when I tried to create a new partition using the Disk Management, it is not allowing me to do it. I'm getting an error message that I cannot create more than 4 partitions. I was able to shrink the C: volume and create unallocated space. But the unallocated space is showing as unusable in Ubuntu installation.
I tried to do the following:
Copy / take back up of the Lenovo D: which has the Lenovo applications and Drivers. And delete the D:
Now, we have a new One unused partition of 25 gb unallocated space for installing the Ubuntu.
I tried to install Ubuntu in the unallocated space of 25gb. Since it is a single partition, Ubuntu is asking me to create another partition allocating 4gb for the swap area. When I try to do that, the remaining 21gb space is becoming unusable (Since, the Windows partition does not allow more than 4 partitions).
My question is can we install Ubuntu in the unallocated space of 25gb in a single partition? Is Swap area partition necessary? Can we install Ubuntu without a Swap area? Can Swap area be allocated as file space instead of a separate partition? What will happen if I install without a swap area?
No, you don't need a swap partition, as long as you never run out of RAM your system will work fine without it, but it can come in handy if you have less than 8GB of RAM and it is necessary for hibernation. For more information see this question: Do we still need swap partitions on desktop?
However, you can get around the 4 partition limit by creating an extended partition, and then creating a swap partition and a default partition (these "sub" partitions appear under the extended partition and are called "logical" partitions). This will be an option when you create your partitions in the installer. Check out this related question: My disk already has 4 primary partitions, how can I install Ubuntu?
You don't really need a swap partition. In our times computers have 4GB of RAM or more. That is normally enough for daily use.
But... If you do RAM heavy tasks your machine might run out of RAM... and crash.
In my opinion a good solution for you is to install Ubuntu on that single partition an add maybe 1GB of swap as a swapfile.
Here is a good toutorial for that... Ubuntu Linux Create and Add Swap File Tutorial
Another solution would be to enable zRam. Look here... How do I use zRam?
Swap partitions do two things: they can provide an overall speed boost by freeing up memory for more cache, and they can prevent rare disastrous out-of-memory situations where the system will start killing processes without warning.
If you have tons of RAM, you probably aren't needing it for a speed boost - it'll almost never be utilised. But it is still a good idea to have it for the other purpose: just in case you run out of memory completely. This can still happen even in these days of 8GB+ RAM, ie due to a rogue process, or a very memory-heavy process such as an image editor.
You don't need to use a partition. It is possible to have a swap file instead of a swap partition. Just don't set up any swap partition, and then set up a swap file later.
Agree to all the above answers. Nowadays no essentially when you have lots of RAM(16 or 32 GB etc...). In my 32 GB RAM Desktop the swap partition is not being used to a great extent. I kept it as I am working with lot of Bigdata Hadoop and NoSQL which are in general Java based and can result into OOM(Out of memory errors). So just in those kind of scenarios it's good. It never hurts to keep it and if you feel it is not being used then simply merge it to '/'
It depends on what you are running on your system.
If you are creating content, it is probably a good idea to still have swap space allocated, so if you do run out of RAM, your processes will just get slow instead of being killed and potentially losing work.
If your machine is just running programs, then you don't need or even want swap space. I design and build many kiosk-like display systems that fit this usage exactly. I'd rather like a process to die suddenly than be slow because then I can detect that condition and correct it.
As has been said before, you can allocate swap files on your root filesystem after installation if you have run out of main partitions. You might also be able to create an extended partition as one of your main partitions that can overcome the 4-partition limit if you have a disk that is MBR-based. GPT disks don't have the 4-partition limit.
Thank you all for the suggestions and inputs. With all your help, I was able to successfully Install Ubuntu 14.0.4 LTS alongside Windows 7 Professional. My Laptop is Lenovo B50 80 with 4 GB RAM, 500 GB HDD preinstalled with Windows 7 Professional.
I'm summarizing what I did below, so that it may help others.
As mentioned in the question, I tried to shrink the C: Volume using Disk Management in Windows and allocated some space to install Ubuntu.
But, when I tried to install Ubuntu in the unallocated space, it was showing as unusable. (It is because Windows does not allow to create more than 4 partitions)
Finally, this is what I did :
Steps to Install Ubuntu alongside Windows 7 in Lenovo B50 80 :
The Windows has two drives/ partitions : (Windows C: and Lenovo D: ) other than the 2 hidden partitions for One Key Recovery.
The Lenovo D: is 25 GB and has Applications and Drivers folders. We can take a back up of that. ( In a flash drive or by copying it to the C: ).
I believe all the Applications and Drivers are available in the Lenovo website and it can be downloaded. So, I went ahead and deleted the D: partition. So, now there is an unallocated space of 25 GB. Ubuntu needs only 6 GB space for installation. So, 25 GB is more than enough.
But if you think you need more space allocated for Linux. You can shrink the C: upto 200 GB and it will merge with the already unallocated 25 GB. So, now you will be having a single partition of unallocated partition of 225 GBs.
Now restart the system with Live USB Ubuntu Flash Drive. Select Try Ubuntu.
After Ubuntu is loaded. Click Install Ubuntu.
The installation window opens. Select the Language. Click Next/ Continue
There will be options like "Install Ubuntu alongside Windows 7" . But in my case, Ubuntu did not detect Windows 7, so, I got only the following options:
Erase the disk and install Ubuntu
Something Else.
Choose "Something Else" and click Continue. You will get the Partition screen.
Now you will be able to see all the partitions with the Windows drives and the free space of 225 GB.
Select the Free space and click + at the bottom to create a new Partition.
First, create a partition for Swap Area with 4 GB space. So, Give Size as 4096.
Choose the type of Partition as "Logical" instead of "Primary". Select "Use as" as Swap Area.
Click Ok.
Next we can use the remaining free space for the rest of the Linux installation.
Again Select the Free Space and click + at the bottom.
Size will be having the remaining free space size by default. Choose the type of Partition as "Logical" instead of "Primary".
Select "Use as" as "Ext4 Journaling File System".
Select Mount Point as " /" .
Click "Install Now". You will get a warning pop up that the two partitions you created now will be formatted.
Click Ok and continue with the Installation.
The Installation will be completed successfully and it will ask you to restart the system.
Go ahead and restart the system.
Remove the Live USB flash drive before rebooting.
The system will sometimes boot to Windows or Ubuntu. You will not get the GRUB loader.
If your system boots to Windows by default and you don't see Ubuntu. Shut down and reboot with Live USB again to Ubuntu.
In my Case, the system restarted to Ubuntu.
The GRUB will be successfully fixed.
Actually if you did its better. As others has said its ok. If you didn't unless you know that you won't run out of ram. But in case if you needed. You can reserve a pen drive to the swap. Its simple through Gparted