Page 1 of 1

[Solved] FSCK from script at bootup

Posted: Fri Jan 18, 2013 1:59 am
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

Re: FSCK from script at bootup

Posted: Fri Jan 18, 2013 5:18 am
by itsme4401
SEE: man tune2fs!
No script is needed:

Code: Select all

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

Re: FSCK from script at bootup

Posted: Fri Jan 18, 2013 5:31 am
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

Re: FSCK from script at bootup

Posted: Sat Jan 26, 2013 2:02 am
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.