When Ubuntu boots up, all is well. But when system is up for more than a few hours, the Hard Disk including root filesystem and swap partition become read-only. The GUI desktop disappears, and some messages like I/O error
, Read-only filesystem
etc appears and freezes without the power button. When I press power button in such sutuation some more messages popup. I am using a laptop.
Here is the screenshot of one of that times when this occured:
I tried to find the cause of problem according this answer and found this:
I booted into Ubuntu 18.04 Live CD.
This is the output of fsck -f /dev/sdXX
:
$ sudo fsck -f /dev/sda5
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda5: 567831/2187264 files (0.4% non-contiguous), 6372147/8728576 blocks
I also checked the return code:
$ echo $?
0
Then I rebooted and started Disks application in live CD. These are the screenshots of HDD SMART data:
Then when booted into my Ubuntu 20.04 installtion and noticed, a message like Initramfs unpacking failed: Decoding failed
appeared before appearing the boot logo and disappeared within seconds.
I executed sudo grep -i FPDMA /var/log/syslog*
on terminal and it gave no output.
I booted into Live CD again and executed sudo e2fsck -fccky /dev/sda5
and it gave following output:
$ sudo e2fsck -fccky /dev/sda5
e2fsck 1.44.1 (24-Mar-2018)
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done
/dev/sda5: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda5: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda5: 591731/2187264 files (0.4% non-contiguous), 6484554/8728576 blocks
It gave 0
return code:
$ echo $?
0
I returned to Ubuntu 20.04 and executed sudo fdisk -l
which gave following output:
$ sudo fdisk -l
Disk /dev/loop0: 9.7 MiB, 9510912 bytes, 18576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 28.92 MiB, 30306304 bytes, 59192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 91.32 MiB, 95748096 bytes, 187008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 93.94 MiB, 98484224 bytes, 192352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 54.66 MiB, 57294848 bytes, 111904 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 54.97 MiB, 57618432 bytes, 112536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 140.68 MiB, 147496960 bytes, 288080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop7: 140.68 MiB, 147501056 bytes, 288088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: ST500LM012 HN-M5
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A85852AC-BAD1-11E9-B49D-FE4A252694FC
Device Start End Sectors Size Type
/dev/sda1 2048 843642879 843640832 402.3G Microsoft basic data
/dev/sda2 843642880 844990463 1347584 658M Windows recovery environment
/dev/sda3 844990464 865961983 20971520 10G Windows recovery environment
/dev/sda4 865961984 872089599 6127616 2.9G Microsoft basic data
/dev/sda5 904894464 974723071 69828608 33.3G Windows recovery environment
/dev/sda6 974723072 976771071 2048000 1000M EFI System
/dev/sda7 872089600 904894463 32804864 15.7G Linux filesystem
Partition table entries are not in disk order.
Disk /dev/loop8: 160.16 MiB, 167931904 bytes, 327992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop9: 255.58 MiB, 267980800 bytes, 523400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop10: 4.2 MiB, 4403200 bytes, 8600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop11: 2.45 MiB, 2555904 bytes, 4992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop12: 14.77 MiB, 15466496 bytes, 30208 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop13: 276 KiB, 282624 bytes, 552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop14: 956 KiB, 978944 bytes, 1912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop15: 956 KiB, 978944 bytes, 1912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop16: 3.66 MiB, 3825664 bytes, 7472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop17: 2.17 MiB, 2273280 bytes, 4440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop18: 62.9 MiB, 65105920 bytes, 127160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop19: 34.55 MiB, 36216832 bytes, 70736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Update: This happens when I do excessive read and write operation on virtual hard disk. (E.g. while using virtual machine)
fsck
output. I will add screenshots of HDD SMART data very soon.dpkg
was installing packages. Then I reinstalled all package downloaded bydo-release-upgrade
. Maybe this is cause.