memtest
You may have a hardware problem.
Go to https://www.memtest86.com/ and download/run their free memtest
to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.
swap
Unless you hibernate, your swap partition is way too big. We'll replace it with a 4G /swapfile.
Note: Incorrect use of the rm
and dd
commands can cause data loss. Suggest copy/paste.
In the terminal
...
sudo swapoff -a # turn off swap
sudo rm -i /swapfile # remove old /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo chmod 600 /swapfile # set proper file protections
sudo mkswap /swapfile # init /swapfile
sudo swapon /swapfile # turn on swap
free -h # confirm 16G RAM and 4G swap
Edit /etc/fstab, using sudo -H gedit /etc/fstab
or sudo pico /etc/fstab
.
Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...
/swapfile none swap sw 0 0
Note: Remove other existing swap lines. Use gparted
to delete /dev/sda5.
reboot # reboot and verify operation
Update #1:
memtest
freezes when run. Suspect bad RAM, or RAM that needs re-seating in its socket. RAM is in slots DIMM0-3. Remove DIMMs1-3 and retest memtest
. If memtest
runs without error, add back one DIMM into slot DIMM1 and retest, etc.
Update #2:
It looks like your sdc drive has one or more bad blocks. Let's map it out...
Note: do NOT abort a bad block scan!
Note: do NOT bad block a SSD
Note: backup your important files FIRST!
Note: this will take many hours
Note: you may have a pending HDD failure
Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.
In terminal
...
sudo fdisk -l
# identify all "Linux Filesystem" partitions
sudo e2fsck -fcky /dev/sdXX
# read-only test
or
sudo e2fsck -fccky /dev/sdXX
# non-destructive read/write test (recommended)
The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.
The -fccky parameter...
-f Force checking even if the file system seems clean.
-c This option causes e2fsck to use badblocks(8) program to do
a read-only scan of the device in order to find any bad blocks.
If any bad blocks are found, they are added to the bad block
inode to prevent them from being allocated to a file or direc‐
tory. If this option is specified twice, then the bad block scan
will be done using a non-destructive read-write test.
-k When combined with the -c option, any existing bad blocks in the
bad blocks list are preserved, and any new bad blocks found by
running badblocks(8) will be added to the existing bad blocks
list.
-y Assume an answer of `yes' to all questions; allows e2fsck to be
used non-interactively. This option may not be specified at the
same time as the -n or -p options.
Update #3:
Since deleting /dev/sda5, you're left with a 28G unallocated hole on your HDD. You can add that space to /dev/sda1.
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...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.
- boot to a Ubuntu Live DVD/USB, in “Try Ubuntu” mode
- start
gparted
- Delete /dev/sda2 extended partition
- Resize the right side of /dev/sda1 all the way to the right
- click the Apply icon