3

I recently installed Ubuntu and on every boot I see this:

    /dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck exited with status code 4
The root filesystem on /dev/sda2 requires a manual fsck

After running fsck manually Ubuntu boots normally clean, however after boot, I see the lock icon on all folders in my system and none of the apps run. I also started seeing issues with my web browser: Firefox is already running, but is not responding

I'm not sure what's wrong here. I have been running fsck manually and booting.

Results of sudo smartctl -a /dev/sda :

smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.8.0-36-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION === Model Family: Western Digital Blue Device Model: WDC WD5000AAKX-001CA0 Serial Number: WD-WMAYUA594803 LU WWN Device Id: 5 0014ee 0586a1865 Firmware Version: 15.01H15 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Sat May 13 13:39:32 2017 UTC SMART support is: Available - device has SMART capability. SMART support is: Enabled

=== START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED

General SMART Values: Offline data collection status: (0x82) Offline data collection activity was completed without error. Auto Offline Data Collection: Enabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 8580) seconds. Offline data collection capabilities: (0x7b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 87) minutes. Conveyance self-test routine recommended polling time: ( 5) minutes. SCT capabilities: (0x3037) SCT Status supported. SCT Feature Control supported. SCT Data Table supported.

SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 5736 3 Spin_Up_Time 0x0027 144 143 021 Pre-fail Always - 3800 4 Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1690 5 Reallocated_Sector_Ct 0x0033 194 194 140 Pre-fail Always - 116 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 086 086 000 Old_age Always - 10733 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 1665 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 141 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 1548 194 Temperature_Celsius 0x0022 103 094 000 Old_age Always - 40 196 Reallocated_Event_Count 0x0032 110 110 000 Old_age Always - 90 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 10 198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 1 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 188

SMART Error Log Version: 1 No Errors Logged

SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.

Since I was doing fsck /dev/sda2

Results of sudo smartctl -a /dev/sda2 :

smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.8.0-36-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION === Model Family: Western Digital Blue Device Model: WDC WD5000AAKX-001CA0 Serial Number: WD-WMAYUA594803 LU WWN Device Id: 5 0014ee 0586a1865 Firmware Version: 15.01H15 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Sat May 13 13:46:14 2017 UTC SMART support is: Available - device has SMART capability. SMART support is: Enabled

=== START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED

General SMART Values: Offline data collection status: (0x82) Offline data collection activity was completed without error. Auto Offline Data Collection: Enabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 8580) seconds. Offline data collection capabilities: (0x7b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 87) minutes. Conveyance self-test routine recommended polling time: ( 5) minutes. SCT capabilities: (0x3037) SCT Status supported. SCT Feature Control supported. SCT Data Table supported.

SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 5736 3 Spin_Up_Time 0x0027 144 143 021 Pre-fail Always - 3800 4 Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1690 5 Reallocated_Sector_Ct 0x0033 194 194 140 Pre-fail Always - 116 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 086 086 000 Old_age Always - 10733 10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 1665 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 141 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 1548 194 Temperature_Celsius 0x0022 102 094 000 Old_age Always - 41 196 Reallocated_Event_Count 0x0032 110 110 000 Old_age Always - 90 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 10 198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 1 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 188

SMART Error Log Version: 1 No Errors Logged

SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.

UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY error message:

enter image description here

Results of running fsck from a live USB:


ubuntu@ubuntu:~$ sudo fsck /dev/sda2 fsck from util-linux 2.27.1 e2fsck 1.42.13 (17-May-2015) /dev/sda2 contains a file system with errors, check forced. Pass 1: Checking inodes, blocks, and sizes Inodes that were part of a corrupted orphan linked list found. Fix<y>? yes Inode 1060186 was part of the orphaned inode list. FIXED. Inode 1060191 was part of the orphaned inode list. FIXED. Inode 1060193 was part of the orphaned inode list. FIXED. Inode 1060200 was part of the orphaned inode list. FIXED. Deleted inode 1060223 has zero dtime. Fix<y>? yes Pass 2: Checking directory structure Error reading block 4202608 (Attempt to read block from filesystem resulted in short read) while reading directory block. Ignore error<y>? yes Force rewrite<y>? yes Directory inode 1048767, block #0, offset 0: directory corrupted Salvage<y>? yes Missing '.' in directory inode 1048767. Fix<y>? yes Setting filetype for entry '.' in ??? (1048767) to 2. Missing '..' in directory inode 1048767. Fix<y>? yes Setting filetype for entry '..' in ??? (1048767) to 2.

Pass 3: Checking directory connectivity '..' in /home/faisal/.cache/logrotate (1048767) is <The NULL inode> (0), should be /home/faisal/.cache (1048583). Fix<y>? yes Pass 4: Checking reference counts Inode 2 ref count is 23, should be 24. Fix<y>? yes Inode 1048583 ref count is 19, should be 18. Fix<y>? yes Unattached inode 1060211 Connect to /lost+found<y>? yes Inode 1060211 ref count is 2, should be 1. Fix<y>? yes Pass 5: Checking group summary information Block bitmap differences: -(79757831--79757834) -(79757837--79757840) -(85494803--85494806) -(85524993--85525000) Fix<y>? yes Free blocks count wrong for group #2434 (21451, counted=21459). Fix<y>? yes Free blocks count wrong for group #2609 (6147, counted=6151). Fix<y>? yes Free blocks count wrong for group #2610 (29311, counted=29319). Fix<y>? yes Free blocks count wrong (105800045, counted=105799995). Fix<y>? yes Inode bitmap differences: -1060186 -1060191 -1060193 -1060200 -1060223 Fix<y>? yes Free inodes count wrong for group #129 (4724, counted=4729). Fix<y>? yes Free inodes count wrong (28871737, counted=28871728). Fix<y>? yes

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED ***** /dev/sda2: 578512/29450240 files (0.4% non-contiguous), 11994565/117794560 blocks

karel
  • 114,770
  • 1
    I would suspect a hard disk failure, as you say the requests for manual fsck are appearing repeatedly. Please [edit] your question and add the output of sudo smartctl -a /dev/sda to your question, which contains the SMART health report and attributes of your hard disk. – Byte Commander May 12 '17 at 17:58
  • Cant find smartctl when I try to sudo apt-get install smartmontools it doesnt install with several error which says read only file system. – Faisal Memon May 12 '17 at 18:20
  • 1
    I'd suggest you to boot an Ubuntu live system (e.g. from the DVD or USB drive you used to install Ubuntu) and perform the check from there. And in case it really turns out to be a hardware failure, make sure you have a backup of your important files - or make one while you still can. – Byte Commander May 12 '17 at 19:40
  • @ByteCommander I have updated the question after executing smartctl. Please take a look. – Faisal Memon May 13 '17 at 13:49
  • Any chance you can include all the output from your fsck? Better question, could you fsck the disk from a Live USB and see what happens? – Thomas Ward May 13 '17 at 15:44
  • @ThomasWard : I have updated the answer with entire fsck error screenshot - https://i.imgur.com/CQdIeVo.jpg

    and output of running fsck from live USB : https://pastebin.com/gg4S2F9Y

    – Faisal Memon May 13 '17 at 17:43
  • @FaisalMemon When you boot back to the system, does it work, or does it fail? It seems like it's trying to check itself which causes issues, but the USB seems to have been able to run fsck on the drive. – Thomas Ward May 13 '17 at 19:25
  • After I run fsck and restart it works. But when I restart again, it asks me to do fsck again :(

    I was facing this issue earlier too -> https://askubuntu.com/questions/910218/sbin-init-no-such-file-or-directory-not-able-to-boot-ubuntu-desktop .. Then I formatted and reinstalled last week since I was not able to fix it. But unfortunately I see this occur again :(

    – Faisal Memon May 14 '17 at 04:40
  • 2

2 Answers2

0

I had a similar problem the reason was the bad health of HDD, as soon I replaced it with new SSD and made a clean install of ubuntu the problem is gone.

If was due to bad sectors on HDD, this I verified from a windows tool Hard Disk Sentinal. As far I know the bad sector can not be removed everytime sometime it's due to physical damage to disk. Also my HHD was 5+ year old and reached it's life time writes.

In my new SSD I made a clean install of ubuntu 21.04 and it's works smooth.

I hade given same answer in Unix Stack Exchange.

0

type fsck /dev/sda2 and press enter whenever the terminal asks for input.

Now after the process finishes, type: reboot

After rebooting, open the terminal. Make sure you have internet connectivity and type:
sudo apt-get clean
sudo apt-get update
sudo apt-get updrade

Now, your system will start normally from now on.

die_wolf
  • 123