2

Ubuntu is my only OS. I recently downloaded many utilities for a lecture along with Visual Studio Code, and since then I have noticed unusual lag in my PC.

I cleared a lot of things using various tools like Bleach Bit and via terminal, yet, the lag still exists and opening applications is noticeably slower.

Here is a screenshot

Here is the text version of the screenshot.

I have space in my /home partition, I do not know if it is possible to reallocate sizes; is it practical?

I cannot use the swap partition as then I will have to unmount other partitions which includes home and root.

Edit: after applying the following commands, here is the screenshot of

enter image description here

Kulfy
  • 17,416
  • 26
  • 64
  • 103
  • 1
    Use `top` and `free` to diagnose the cause of lag. Use Disk Usage Analyzer or `du` to determine if you have unexpected space hogs on your Ubuntu partition. – user535733 Mar 02 '20 at 18:47
  • 1
    Both / and /home are too small and nearly full. You should reinstall and allocate more space. – mikewhatever Mar 02 '20 at 18:57
  • I could have used the answer you linked above, but he uses the swap partition, to delete swap partition I will have to unmount higher partition which is not possible. – Kartikeya Srivastava Mar 02 '20 at 19:01
  • 1
    Kartikeya, ever since fall of 2017, the Linux kernel has improved the swap file performance so that the only frequent need for a swap partition is if you have added Hibernation to your system. Once we have the results of `parted` we can discuss removing the swap partition without affecting performance. For details, see https://help.ubuntu.com/community/SwapFaq – K7AAY Mar 02 '20 at 19:08
  • I can afford to loose /dev/sda1 (105MB) , but /dev/sda2 has content that I require. – Kartikeya Srivastava Mar 02 '20 at 19:12
  • Yes, of course, could you tell me where to exactly copy and transfer the files. B) I was using elementary OS before it, I downloaded few important images and documents and therefore left sda6 as it is, while I was installing Ubuntu. – Kartikeya Srivastava Mar 02 '20 at 19:16
  • 1
    Partition changes are the quickest way to lose data by accident. Therefore i'd suggest making an external backup of what's in /dev/sda2. After the backup completes, verify what's on the backup matches the source. Then, backup _again_ to a different destination and verify _again_. You can use an external drive and/or space in the cloud for this process. Then, you can boot from an Ubuntu Live USB and make partition moves and changes. Oh, yes; what is in /dev/sda6 and why did you need to have it separate from /home? – K7AAY Mar 02 '20 at 19:19
  • 1
    PS: Please move the question regarding Visual Studio into a new question as it's a separate issue. – K7AAY Mar 02 '20 at 19:22
  • Is there no alternative to booting via Live USB? PS:Done. – Kartikeya Srivastava Mar 02 '20 at 19:24
  • 1
    What's on sda3 and sda6? – heynnema Mar 02 '20 at 19:58

1 Answers1

2

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Keep these things in mind:

  • always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

  • a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

  • a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

  • if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

  • you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Copy any last minute "few important images and documents" from sda6 to sda3 (as we'll delete sda6 (Elementary OS) later)

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

  • boot to a Ubuntu Live DVD/USB
  • start gparted
  • delete /dev/sda6 partition (this will remove Elementary OS)
  • resize the right side of /dev/sda8 /dev/sda7 and add ~40G to /dev/sda8 /dev/sda7
    • this leaves about 20G unallocated, which will get added to /dev/sda6 later
  • move /dev/sda8 /dev/sda7 partition all the way to the right
  • resize the right side /dev/sda7 /dev/sda6 all the way to the right
    • this adds about 20G to the /
  • click the Apply icon
  • reboot # reboot the computer
  • sudo update-grub # update GRUB since the /dev/sda6 deletion

Update #1:

After deleting /dev/sda6, gparted has renumbered partitions, and then /dev/sda7 became /dev/sda6, and /dev/sda8 became /dev/sda7. Follow the same instructions, substituting the new partition numbers.

Update #2:

Boot to Ubuntu Live DVD/USB again. Start terminal and type:

  • sudo fsck -f /dev/sda6
  • sudo fsck -f /dev/sda7
  • give me a new screenshot of gparted

Update #3:

sudo umount /dev/sda2 # unmount this partition

sudo ntfsfix -d /dev/sda2 # try to fix ntfs partition

Update #4:

If you don't have Users and Groups application already installed, install it this way...

sudo apt-get update

sudo apt-get install gnome-system-tools

Show me the advanced settings for your account. Upload a screenshot to imgur.com and give me the URL.

Create a new Administrative user named "Administrator". Log out of your current user and test the login for Administrator account.

Upload a copy of /etc/fstab to paste.ubuntu.com and give me the URL.

heynnema
  • 68,647
  • 15
  • 124
  • 180
  • 1
    Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/105169/discussion-between-heynnema-and-kartikeya-srivastava). – heynnema Mar 04 '20 at 18:22