1 1
garfius

Check and fix filesystem

Recommended Posts

I was reading about hecking the filesystem /

 

Seems the way is: touch /forcefsck

 

But this action does not fix, so we need 'somewhere': fsck.repair=yes

 

How do i have to do it?

 

Thanks.

Share this post


Link to post
Share on other sites
1 hour ago, Tido said:

 

Thanks, but this is not the goal.

 

The goal is to fix any corrupt file at next startup sequence, damage done by an unexpected power off.

 

Already done in other OS, like dietPi or ubuntu on legacy kernels, but don't know the procedure here.

 

The target is an armbian set up on a hard-to-reach place, and i need reliability.

 

Thanks again.

Share this post


Link to post
Share on other sites
2 hours ago, martinayotte said:

Check "man tune2fs", there the option "-c <n>" to call fsck.ext4 every "n" reboot.

Thanks!

 

The working commands:

#--locate which partition--
df -h
#--set check interval--
tune2fs -l /dev/mmcblk0p1
tune2fs -i 2 /dev/mmcblk0p1
tune2fs -c -1 /dev/mmcblk0p1

To check FS every boot:

tune2fs -l /dev/mmcblk0p1
tune2fs -i 1 /dev/mmcblk0p1
tune2fs -c 1 /dev/mmcblk0p1

 

Share this post


Link to post
Share on other sites
2 hours ago, martinayotte said:

Check "man tune2fs", there the option "-c <n>" to call fsck.ext4 every "n" reboot.

But this only seems to check, not repair.

 

https://unix.stackexchange.com/questions/400851/what-should-i-do-to-force-the-root-filesystem-check-and-optionally-a-fix-at-bo

Says:

This DID a check, but to force a fix too, you need to specify fsck.repair="preen", or fsck.repair="yes

 

But not where to write this commands...

Share this post


Link to post
Share on other sites
17 hours ago, garfius said:

But not where to write this commands...

Maybe you can try to add the line "extraargs=fsck.mode=force" into /boot/armbianEnv.txt and reboot.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1