I know this question seems similar to the question in this link EXT4-fs error after Ubuntu 17.04 upgrade, however, mine is different in the case that I am not using a Samsung NVMe SSD, and therefore the workaround by changing the boot parameter and also the bug report are not helping me. Thing is, I get the same errors gotten as the user from the other question.
Although mine happens randomly, sometimes when I boot the system, I'm not able to open any apllications as they close instantly, and when I try to shutdown or restart, it gets stuck and shows a black screen with an error looking like this ext-fs error device sda 7 ext4_find_entry comm gdm3: reading directory iblock 0, followed by a couple of errors saying /dev/sda7: Clearing orphaned inode 6946818 (uid=122, gid=127, mode=0100600, size=0).
Then it shows that it is starting a couple of processes, and after showing [ OK ] Started MySQL Community Server., it shows another error [ 642.321539] systemd-journald[314]: Failed to write entry (24 items, 610 bytes), ignoring: Read-only file system... and keeps showing more errors like that forever.
Even if I force a restart, the same thing always happens a second time, then on the third time, it works again. Like I said earlier, this is totally random, some days I go by without this happening, while some days it happens frequently. I'm dual-booting Windows 10 and that works fine. I'm using a HP 250 G5 Notebook PC, Ubuntu 18.04. Hard drive model is ST500LM000-1EJ162 (DEM7).
Edit:
As requested, below is a screenshot of my Disks page
1 Answer
Lets check your file system for errors.
For 18.04 or newer...
- boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
- open a
terminalwindow by pressing Ctrl+Alt+T - type
sudo fdisk -l - identify the /dev/sdXX device name for your "Linux Filesystem"
- type
sudo fsck -f /dev/sdXX, replacingsdXXwith the number you found earliersudo fsck -f /dev/sda7
- repeat the
fsckcommand if there were errors - type
reboot
Note: If you continue to have problems, we'll bad block your disk, using procedures that I can add later.
Update #1
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. 13