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).
Lets check your file system for errors.
For 18.04 or newer...
terminal
window by pressing Ctrl+Alt+Tsudo fdisk -l
sudo fsck -f /dev/sdXX
, replacingsdXX
with the number you found earliersudo fsck -f /dev/sda7
fsck
command if there were errorsreboot
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" partitionssudo e2fsck -fcky /dev/sdXX
# read-only testor
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...