[Solved] FSCK from script at bootup

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Gandalf the White

[Solved] FSCK from script at bootup

Post by Gandalf the White »

Back in the days of UNIX, when I was a young man, during the bootup of our UNIX computers, they would go through a command called FSCK. If an error was found, it would correct it. If I remember correctly. The command was in a script file. I do not remember the name of the file. It was like Window's Autoexec.bat. Could it be .cshrc, I think? I just do not remember. It has been to long time. I need your help. :cry:

Does Cinnamon have such a file? If so, what command would I append to it to cause the fsck to be initiated at bootup?

All my internet research has produce ways to manually running fsck. That is not my desire. The problem with searching the internet is you have to know the correct question. :evil:

I have never accepted just hitting the ball. I have always continued to swing until I had a home run. Please help me hit this home run. :D

Thank you,
Gandalf
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
itsme4401

Re: FSCK from script at bootup

Post by itsme4401 »

SEE: man tune2fs!
No script is needed:

Code: Select all

sudo tune2fs -c <number of reboots between checks> /dev/sdXY
Gandalf the White

Re: FSCK from script at bootup

Post by Gandalf the White »

itsme4401 wrote:SEE: man tune2fs!
No script is needed:

Code: Select all

sudo tune2fs -c <number of reboots between checks> /dev/sdXY
Sounds great. Thank you. Question: what command will give me the XY numbers?
I took a look at the man page and am thankful I'm retired, now. :D
squigish

Re: FSCK from script at bootup

Post by squigish »

Code: Select all

sudo blkid
will display a list of all your hard drives and partitions, along with their label (if any), their device file (/dev/sdXY), UUID, and filesystem type.

If that's not enough to identify the partition you want to run fsck on, you can look at the /etc/mtab (all currently mounted file systems) or /etc/fstab (all filesystems set to mount during boot) files to identify the mount points.
Locked

Return to “Cinnamon”