LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2021, 08:34 AM   #1
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 648

Rep: Reputation: 174Reputation: 174
ext4 and "touch forcefsck"


{{{I don't know if this question "belongs" in this thread, because it concerns filesystems, a command, and software... so if this thread is not the place it should be in.... tell me I am a {butt}hole and I will apologize}}}

Last night, I discovered why on a ext4 filesystem the command "touch /forcefsck" doesn't work as expected.

Yeah, I have been using the ext4 filesystem since around 2008.

I know the solution is to change/write

GRUB_CMDLINE_LINUX="fsck.mode=force"

in the file /etc/default/grub and do an "update-grub" {or update-grub2}

And it now works as expected..... BUT....

Suppose I don't want to force an fsck on all of my filesystems every time I reboot?

Yeah... I know I can do a CTRL-c and stop the process.

QUESTION:

Is there any other way to NOT force a fsck on all my filesystems every time I reboot OTHER than edit that file and do an update?

I would guess that the answer is "NO", but just asking just in case there might be a better solution.

Thank you for your time and have a great day!
 
Old 07-31-2021, 10:07 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,761

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
As I understand how things work specific to linux filesystems.

Normal automatic fsck checks happen as defined when the filesystem was created or as configured. If the 6 column (fsck) value is greater then 0 the filesystem will be checked at start based on last check, number of mounts or unclean unmount.

On SySV init systems you can force a fsck at boot time by creating a dummy file named forcefsck in the / directory. After fsck is finished the forcefsck file is deleted.

On systemd init systems you need to add a command line parameter fsck.mode= which can be either auto, force or skip. which is passed to systemd-fsck service.

I have not tried lately but you should be able to manually edit the boot command line from the grub menu either to delete or add a kernel parameter.
 
Old 07-31-2021, 02:26 PM   #3
kevinbenko
Member
 
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable {Probably forever}
Posts: 648

Original Poster
Rep: Reputation: 174Reputation: 174
Thank you for your reply, michaelk.

I'll read up on the parameters {auto/force/skip} for fsck.mode.

Maybe that will get me what I need to know.

Have a good day!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
forcefsck Slackware-Spain Slackware 3 10-01-2020 02:06 AM
[SOLVED] /forcefsck, shutdown -F -r 1 kaz2100 Linux - Software 2 01-19-2018 06:46 PM
[SOLVED] How to tell if /forcefsck fsck ran at reboot for ext4 anon091 Linux - Server 2 04-12-2013 03:32 AM
[SOLVED] how to remove forcefsck from / anon091 Linux - Newbie 5 04-01-2011 05:38 AM
"fsck died with exit status 6" , what to do after forcefsck ? frenchn00b Debian 3 06-19-2010 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration