You are not logged in.

#1 2022-05-25 04:21:25

TTMM00
Member
Registered: 2017-02-28
Posts: 7

Filesystem check error at boot [SOLVED]

Hello to everybody, thank you for reading me.

Since yesterday in the morning I have a filesystem check error message at the boot and whatever I make among what is proposed doesn't help.

Here is the message :


/dev/sda1 : Superblock needs_recovery flag is clear, but journal has data.
/dev/sda1 : Run journal anyway

/dev/sda1 :UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(...)
ERROR :Bailing out.Run 'fsck /dev/sda1' manually
**********FILESYSTEM CHECK FAILED**********
(...)
*************************************************
sh: can't access tty: job control turned off
[rootfs ]#

Then when I type

fsck /dev/sda1

It says :

Superblock needs_recovery is clear but journal has data Run journal anyway ? yes
/dev/sda1:recovering journal.

(that's it)

And if I answer no at first :

Run journal anyway ? No
Clear journal ? yes
Run journal anyway ? yes
fsck.ext4: unable to set superblock flags on /dev/sda1

(then)

/dev/sda1 : ***** FILE SYSTEM WAS MODIFIED ***
/dev/sda1 : ****WARNING: Filesystem still has errors ****

My hard disk is a Solid State Drive which is something like 4 or 5 years old and I only wish the problem doesn't stem from its possible breakdown.

A big thank to anyone who can help me solve the problem because I cannot use my computer since the error occured.

Thierry.

Last edited by TTMM00 (2022-05-25 19:38:31)

Offline

#2 2022-05-25 04:56:27

wishmaster
Member
Registered: 2020-05-07
Posts: 34

Re: Filesystem check error at boot [SOLVED]

Hi! I had the same problem yesterday.
I think your situation is very similar that mine.

This is my post: https://bbs.archlinux.org/viewtopic.php?id=276662

I think the problem is a with the last update of systemd. I downgraded the packages to 05/22 and seems to be working fine now.
Today I was using the system normally.

Offline

#3 2022-05-25 05:58:51

TTMM00
Member
Registered: 2017-02-28
Posts: 7

Re: Filesystem check error at boot [SOLVED]

Hello,
Thank you for your reply Wishmaster.

My problem is I cannot dowgrade or make anything on the error screen because it doesn't take most of the commands I type and the other ttys are not available pressing Ctrl+Alt+F2-6.

For instance :

[rootfs]# nano /etc/pacman.conf
sh: nano: not found
[rootfs]# su thierry
sh: su: not found
[rootfs]# downgrade systemd
sh: downgrade: not found

I wonder how can I get out from this trap !

Any help welcome.

Thierry.

Offline

#4 2022-05-25 06:05:47

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Filesystem check error at boot [SOLVED]

@wishmaster, you probably caused the inconsitent FS by rebooting hard out of the hanging shutdown

fsck.ext4: unable to set superblock flags on /dev/sda1

is a tid-bit more concerning…

@TTMM00, boot sth. like https://grml.org , run the fsck from there check "stat /dev/sda1" and also dmesg for IO errors and smartctl, https://wiki.archlinux.org/title/Smart
The error very unfortunately often indicates that the drive has turned into read-only mode (you can perhaps still rescue data from it, but no longer write)

Offline

#5 2022-05-25 06:35:35

TTMM00
Member
Registered: 2017-02-28
Posts: 7

Re: Filesystem check error at boot [SOLVED]

Thank you for your reply Seth.

@seth : Do you mean my SSD is probably broken a that I should replace it and that rescueing the files it contains is the only thing I can now do ?

Offline

#6 2022-05-25 06:55:01

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Filesystem check error at boot [SOLVED]

It's one possible cause (probably the most common one) but we don't know this for sure.
You best inspect the drive offline and may also try to write to it bypassing the filesystem, https://wiki.archlinux.org/title/Badblocks - you can limit this to a (sacrificial, in case of destructive tesing) file for which you'd identify the blocks w/ filefrag and if the drive is ro, this will possibly extend to all partitions and the partition table.

But first just at it offline (ie. from a live distro)

Offline

#7 2022-05-25 19:34:56

TTMM00
Member
Registered: 2017-02-28
Posts: 7

Re: Filesystem check error at boot [SOLVED]

@seth
I made what you previously advised with a grml live usb key, then booted on grml-live and tried pretty randomly a few repair commands among which this one :

% fsck -b [a_number_I_forgot] /dev/sda1 {or "/dev/sda" , I have forgotten} 

(note : [a_number_I_forgot] was was a 4-figure number and was proposed by fsck utility)

Then I was proposed to make the fix of an incredible amount of bad blocks, files and directories (3,000+).

Then when I booted again on my regular SSD, the error message was gone and the computer started flawlessly.

However, if the error came from the tired SSD, I fear the error message at boot comes back sooner or later, so I ordered a brand new SSD to change it as soon as possible.


Anyway, thanks a lot again to you @wishmaster and @seth for your replies.

Problem SOLVED.

By the way, does anyone know  if I can duplicate my tired-archlinux-240GB-SSD to a brand-new-500GB SSD and where is a reliable doc for it  ?

Thank you all again.

Thierry.

Last edited by TTMM00 (2022-05-25 20:00:57)

Offline

#8 2022-05-25 20:27:38

seth
Member
Registered: 2012-09-03
Posts: 51,319

Re: Filesystem check error at boot [SOLVED]

You used one of the backup superblocks.
The write ops could have failed because the drive was mounted when you checked it or the booted (rescue) system was compromised by the FS errors, I'd check the SMART data to get an idea where the SSD is at.
The errors could have been the result of a flawed/aggressive data trimming strategy.

To migrate the system:
https://wiki.archlinux.org/title/Migrat … _new_drive

Offline

#9 2022-05-26 02:58:19

TTMM00
Member
Registered: 2017-02-28
Posts: 7

Re: Filesystem check error at boot [SOLVED]

Thank you very much for the link  @seth.

Since I made the blocks repair my computer keeps on working (several boots made flawlessly).

Maybe this SSD drive would still be working a long time w/o being changed, I don't know.

Anyway replacing it is still an opportunity to upgrade to a larger one with a more renowned brand (I own a Sandisk and ordered a 870 EVO Samsung).

Have a nice day.

Offline

Board footer

Powered by FluxBB