I am not allowed to have more than 4 partitions.During installing Ubuntu I am not allowed to have swap area because of this problem.What should I do?
-
Can you explain it more clearly? – Maksat Yalkabov Mar 17 '14 at 10:39
-
upload gparted screenshot to imgur.com and then post the link here. – Avinash Raj Mar 17 '14 at 10:41
-
You need to delete at least one of your primary primary partitions, after taking its backup and then restart installing ubuntu and then create logical partitions for your data on the previously deleted partition. – jobin Mar 17 '14 at 11:27
1 Answers
The 37.52 GB is the unallocated space in your hard disk. With MBR partitioning scheme, you can not create a new partition with it. So your option is to merge in some other partition.
Your merger options:
Merge the unallocated space to your 20.98 GB Ubuntu installation. [easiest and quickest]
Merge it into your Windows' install partition (the
C
drive in Windows), OR move the Windows' install partition [risk involved] to bring it next to your Ubuntu root/
partition, thus shifting unallocated space to right of Windows' partition which would then be merged to the extended partition (theD
drive). [Moving Windows' install/system partition involves risks and can take a long time to complete.]
Regarding Swap space:
You can create one more logical partition (in the extended partition container /dev/sda4
) and use it for swap.
For this you'll have to:
- Start a partition manager say GParted,
To create a new logical partition in the extended partition you'll have to shrink your current and only logical partition
/dev/sda5
. You can do this by right clicking the partition and selectingresize/move
option. Then in the Resize/Move window that appears, you can move the slider from right end towards left (preferred option) to create an unallocated space of appropriate size that you want for your swap,(this snapshot shows a resize/move operation being selected for a logical partition.)
(here I've selected a size of 2051 MB for the new partition. Make sure your Align to: option is set for MiB)
Right click the newly created unallocated space, and select New,
then set File System to linux-swap and click Add;
Finally click Apply All Operations button.
After you've created the swap partition, you can turn it on with
sudo swapon -a
(-a
implies turn on all available swap, checkman swapon
for more.)To bring it in use each time you boot into your system, open the file
/etc/fstab
, with root privilege, using the text editor of your choice. Then add an entry likeUUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
wherexxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
is replaced by the UUID of your swap partition. (You can usesudo blkid | grep swap
to check your UUID.) Save and close the file.
References:
-
Thank you rusty.Your answer seems to me what i wanted :) I want to choose 1. option in merger options. And Can you explain a little bit more about how we can create extended partition.I will also post my gparted GUI at home.Now I am using windows at school. – Maksat Yalkabov Mar 17 '14 at 12:10
-
You already have one extended partition, it's the one with green border in the snapshot that you've posted, within which you have a single logical
NTFS
partition (D
drive).. you can shrink this partition by 5 GB (the size of your swap) and use it for swap.. GParted can get both of your jobs done.. you'd have to learn the partitioning basics like resizing, shrinking, formatting, and the links should help you with that.. of course you can ping me if you need more.. – rusty Mar 17 '14 at 12:21 -
thank you for answering.Now I am sending my Gparted screenshot in a new question.There I need your one more advice. – Maksat Yalkabov Mar 17 '14 at 21:31
-
I checked your other question.. since that's a part of this post/problem itself, you could have edited your Q to include it here.. – rusty Mar 18 '14 at 02:52
-
I have 8 GB Of Ram .What GB of place should I give for swap area. And 1GiB = ? MiB – Maksat Yalkabov Mar 19 '14 at 20:32
-
Thank you for your comments user rusty :) I created swap area with gparted succesfully without problem.You saved me from deleting ubuntu and reinstalling it.Before I did not know about extended partition.Now I have 8GB RAM and I gave 5GB to swap area.Is it ok?One more thing I see my swap partition in gparted,in disk utility,and writing this command "sudo blkid | grep swap " But I can not see anything throug writing this command "swapon -s".Does not creating swap area mean that ubuntu is using it?Again Thank you very very much ? – Maksat Yalkabov Mar 19 '14 at 23:57
-
With 8 GB (= 8 x 1024 MB = 8192 MB) of RAM, the minimum recommended swap is 8 GB i.e. the size of RAM. Sorry for missing swap activation part, I've now updated the answer.. you can turn swap on with
swapon
command or automate this for each boot by editing/etc/fstab
.. – rusty Mar 20 '14 at 06:20 -
When I wrote the question above after creating swap area(5GB).What should I do ? Should I resize it with gparted again? – Maksat Yalkabov Mar 20 '14 at 07:34
-
yes resizing could be the better option.. however from the other viewpoint, the size of swap depends more upon your RAM usage, need for hibernation, etc, so if that doesn't exceed 5GB for you, then that should be fine imo.. – rusty Mar 20 '14 at 07:53
-
What is hibernation.I made a little it search,it says you save your RAM?What does it mean ? don't I use my RAM? Instead I use Hard disk.If so I don't want Hibernation,Thean this (5GB) swap is enough for me?Some guys says 2GB is enough. – Maksat Yalkabov Mar 20 '14 at 08:01
-
RAM is volatile memory, when your computer is powered off (shutdown) its contents will be lost but when computer hibernates the RAM contents are stored in non-volatile storage, the hard disk, and when you power on the system (wake from hibernation) the saved content will be swapped back to memory and you'd get the system in the state where you left.. check this wiki for more. – rusty Mar 20 '14 at 08:09
-
regarding "is 5G enough for me? some say 2G is enough!" I've said it before - it depends on the size of your RAM and its usage, check this link to get more idea.. if that's working for you now, leave it as it is. You may expand or create another one later when needed. – rusty Mar 20 '14 at 08:15
-
I loved Your last sentnence.Whenenver I need it I will resize it.Now my job is to activate my swap.thank you again :) – Maksat Yalkabov Mar 20 '14 at 08:25