Assign unallocated space to swap. I have no swap on disk currently. When I change the unallocated space to a new partition the mount point is not /. so it is not detected in df -h .
2 Answers
I found a solution. Just right-click the partition and format to linux-swap in GParted. Then right-click again and click "Swapon".
Then you need to edit 2 files.
In
/etc/fstab, addUUID=4567a897-0845-4fee-816d-9e1cf1954e20 none swap sw 0 0In
/etc/initramfs-tools/conf.d/resume, addRESUME=UUID=/etc/initramfs-tools/conf.d/resume
Finally run
update-grub
update-initramfs -u
I think you must try LIVE PENDRIVE it's better then using commands. Boot through live Pendrive and then open Gparted it will be there by default, then open it. You will see the Unallocated space. Distinguish it from the rest (it will have separate color). Make swap partition as per your RAM and make sure that you have root(/) partition there(at least 20 Gb for installing heavy software but a minimum of 8 GB is sufficient). If you have some space left then make /home partition too. For selecting swap partition select Logical Partition, Beginning of Space and then from Use As column choose swap from drop down menu. Then OK. If you are installing ubuntu for fresh then make a /boot partition for legacy Bios. If you are dual booting(assuming that you have installed both operating system on same BIOS mode) then leave it as it is. Then done.
- 1