Filesystem checks on every boot

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Filesystem checks on every boot

Post by mcventur » Wed Dec 07, 2016 9:41 am

Hi. When i reboot my LM 18 the filesystem is checked ever. I thin that this process should happen one of every 30 times, isnt' it?

I've executed certains test commands to check if anhy partition is not clean, but this is not the case: all clean.
Here is the typical commands for this case that i've seen on this forum for the same problem:

Code: Select all

[marce-linux-mint]sudo -i
[sudo] password for marce: 
marce-linux-mint ~ # for V in $(ls /dev/sd[a-c]?*);do if  $(blkid "$V" | grep -q ext); then echo -n  "$V  " ;tune2fs -l $V | egrep 'state|Mount\ \count|Maximum' ;fi;done
/dev/sda7  Filesystem state:         clean
Mount count:              36
Maximum mount count:      -1
/dev/sda8  Filesystem state:         clean
Mount count:              36
Maximum mount count:      -1
marce-linux-mint ~ # exit
logout
[marce-linux-mint]
Somebody can to get me to deal with the problema?

deepakdeshp
Level 15
Level 15
Posts: 5847
Joined: Sun Aug 09, 2015 10:00 am

Re: Filesystem checks on every boot

Post by deepakdeshp » Wed Dec 07, 2016 11:55 am

It is not required to fsck file system during every hour ,not even for every boot also.
Usually there are no problems which will require fsck of that partition or system..Only in case of booting problems you can run fsck in recovery mode.

That said you should have a backup strategy and do regular backups, as there can be various causes of failure like system hanging, disk or other hardware failure etc.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Re: Filesystem checks on every boot

Post by mcventur » Thu Dec 08, 2016 8:17 am

deepakdeshp wrote:It is not required to fsck file system during every hour ,not even for every boot also.
Usually there are no problems which will require fsck of that partition or system..Only in case of booting problems you can run fsck in recovery mode.

That said you should have a backup strategy and do regular backups, as there can be various causes of failure like system hanging, disk or other hardware failure etc.
Sorry, but I am not understanding you. You are exposing the reasons to force a fcsk, isn't it? In my case, i am not forcing it. It occurss automatically ever when i boot in LM (i have a dual Windows 10 and LM 18 system). I think that normally the fcsk is executed one of every 30 boots, not all boots like in my case. This is the cause of my question.

Thanks for your help.

User avatar
greerd
Level 6
Level 6
Posts: 1056
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Filesystem checks on every boot

Post by greerd » Thu Dec 08, 2016 9:09 am

EDIT: 'Mount count' is the total mounts (not mounts since last fschk)

Doesn't Mount count: 36 mean that the system has booted 36 times since the last fschk?
and Maximum mount count: -1 mean that fschk is infact disabled?

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Filesystem checks on every boot

Post by Cosmo. » Thu Dec 08, 2016 9:50 am

greerd wrote:Doesn't Mount count: 36 mean that the system has booted 36 times since the last fschk?
and Maximum mount count: -1 mean that fschk is infact disabled?
Correct. But there is another mechanism for automatic file system checks.
Enter in the terminal:

Code: Select all

sudo tune2fs -l /dev/sda1 | grep -i "check"
and you see in the output of days weeks or months between 2 checks. Even with mount count = -1 the check might be done daily.
Note: replace a1 according your system.

To stop all checks, edit with root permission the file /etc/fstab and set the last parameter in each line to 0 (zero).

User avatar
greerd
Level 6
Level 6
Posts: 1056
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Filesystem checks on every boot

Post by greerd » Thu Dec 08, 2016 10:56 am

Strange, I have an old box at work that I'm playing around with to test this, default Min18 XFce 64bit install using all the hdd so /dev/sda1 is my / directory and fstab last parameter for /dev/sda1 is 1;
sudo tune2fs -l /dev/sda1 | grep -i "check"shows "Last checked: Wed Aud 10" & "Check Interval: 0(<none>)" So I sudo touch /forcefsck, reboot and it boots normally (no fsck that I recall used to takes minutes (many years ago)), the forcefsck file that I confirmed was there before reboot is now gone (like one would expect) but sudo tune2fs -l /dev/sda1 | grep -i "check" shows the exact same as before "Check Interval: 0(<none>)" and same date.

User avatar
greerd
Level 6
Level 6
Posts: 1056
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Filesystem checks on every boot

Post by greerd » Thu Dec 08, 2016 11:36 am

Sorry OP for going off on a tangent, I forgot we use systemd on Mint18, perhaps this link will shed some light.

Sounds like fsck runs every boot but not necessarily a 'full check'. The 'full check' is based on feedback from 'system files checkers' like number of boots, time since last check, unclean unmounts, etc. See man 8 systemd-fsck

mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Re: Filesystem checks on every boot

Post by mcventur » Thu Dec 08, 2016 6:46 pm

Code: Select all

marce@marce-linux-mint ~ $ sudo tune2fs -l /dev/sda7 | grep -i "check"
Last checked:             Fri Oct 21 18:54:03 2016
Check interval:           0 (<none>)
marce@marce-linux-mint ~ $ sudo tune2fs -l /dev/sda8 | grep -i "check"
Last checked:             Fri Oct 21 18:54:06 2016
Check interval:           0 (<none>)
marce@marce-linux-mint ~ $ 
I would like that it makes the normal file checking. (1 of every 30 boots?), not never checking. When i boot i see the message, under the mint logo, "Press Ctrl + C to cancel the filesystem check", on every boot. It's not normal, isnt it?

User avatar
greerd
Level 6
Level 6
Posts: 1056
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Filesystem checks on every boot

Post by greerd » Thu Dec 08, 2016 7:22 pm

"Press Ctrl + C to cancel the filesystem check", on every boot. It's not normal, isnt it?
I haven't noticed that in a long long time, and it would only appear every 20 boot or so unless "sudo touch /forcefsck" was used to force fsck on the next boot.

What does sudo systemd-analyze blame say regarding systemd-fsck?

mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Re: Filesystem checks on every boot

Post by mcventur » Fri Dec 09, 2016 5:47 am

Code: Select all

marce@marce-linux-mint ~ $ sudo systemd-analyze blame | grep "fsck"
          4.479s systemd-fsck@dev-disk-by\x2duuid-EA38\x2d21A9.service
          3.117s systemd-fsck@dev-disk-by\x2duuid-2ee250ba\x2d9f93\x2d4d3c\x2dba9d\x2df1dbe4c70043.service

User avatar
greerd
Level 6
Level 6
Posts: 1056
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Filesystem checks on every boot

Post by greerd » Fri Dec 09, 2016 7:32 am

So, systemd-fsck runs on boot and takes less than 5 seconds per disk which indicates that its not doing a full fsck but slower than one would expect for its quick check(should be less than a couple hundred ms according to my not so new system). I would expect minutes for a full fsck on a hdd, I don't know how long a ssd would take.

Based on your OP, both sda7 and sda8 are clean so a full fsck wouldn't be expected to run, at least not on every boot. I've read where the default time allowed for fsck isn't long enough to complete so it keeps trying every boot and never succeeds, but they mention 4 minutes, not 4 seconds.

I'm curious if this is a fresh install or an upgrade?

mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Re: Filesystem checks on every boot

Post by mcventur » Fri Dec 09, 2016 7:50 am

It's a fresh install, directly LM 16 x64 Cinnamon.
Yes, the filesystem check must be quick. It just delay a few seconds, but the Ctrl +C Message was worryng me a little.
Then, it's normal? And where do you see the time or type of system check that is executed on my system boot? Thanks for your help.

User avatar
greerd
Level 6
Level 6
Posts: 1056
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Filesystem checks on every boot

Post by greerd » Fri Dec 09, 2016 1:36 pm

I did some testing on my old system again.

1. Commented out 'GRUB_CMD_LINE_LINUX...' in /etc/default/grub, saved, ran 'sudo update-grub', rebooted. This disables the graphical boot so you see whats going on as it flashes by, but no indication of fsck running.

2. Issued 'sudo tune2fs -c1 /dev/sda1' to force fsck every boot.(My system is on sda1) Checked this by issuing 'sudo tune2fs -l /dev/sda1' and verified its Max Count =1. Also left grub as is. Rebooted and definitely seen fsck run with its progress bar. (surprisingly fast, maybe 4 or 5 secs) Noticed 'sudo tune2fs -l /dev/sda1' updated the Last Checked date.

3. Took the comment out of /etc/default/grub that I'd put there previously, rebooted with the graphical boot. Did not see the Ctrl +c message even though fsck would of been running.

4. set things back to normal, 'sudo tune2fs -c-1 /dev/sda1' (left grub as is, kinda like it)

I don't know why your getting the Ctl +c message, is it an ext4 formatted fs? Hopefully someone can jump in here?

mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Re: Filesystem checks on every boot

Post by mcventur » Fri Dec 16, 2016 11:15 am

Both partitions (sda7 and sda8) are ext4. sda7 is the filesystem partition, and sda8 is the /home partition.
I've followed your steps, but the Ctrl + C messsage is still there on boot...
Before force the filesystem checking, this is the message (i think there wasnt progress bar):
https://snag.gy/I3iexX.jpg

Once activated the fsck on both partitions, these are the two important images:
The first: https://snag.gy/RoKCWH.jpg
and the second: https://snag.gy/m0RvCS.jpg

Both on same boot process.

It seems to me that the ctrl + c message checking and the forced checking are different types of checkings??

This is the sda7 and 8 actual state, after setting things back to normal:

Code: Select all

tune2fs 1.42.13 (17-May-2015)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          2f051f36-c24c-4219-98e3-a1ad376f975e
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              2940928
Block count:              11751424
Reserved block count:     587571
Free blocks:              9298192
Free inodes:              2521489
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1021
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Fri Oct 21 18:54:03 2016
Last mount time:          Fri Dec 16 16:04:01 2016
Last write time:          Fri Dec 16 16:03:50 2016
Mount count:              2
Maximum mount count:      -1
Last checked:             Fri Dec 16 15:57:12 2016
Check interval:           0 (<none>)
Lifetime writes:          39 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:	          256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
First orphan inode:       1182060
Default directory hash:   half_md4
Directory Hash Seed:      60d862e5-904f-40df-a125-14d84569b360
Journal backup:           inode blocks

User avatar
greerd
Level 6
Level 6
Posts: 1056
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Filesystem checks on every boot

Post by greerd » Fri Dec 16, 2016 2:20 pm

It seems to me that the ctrl + c message checking and the forced checking are different types of checkings??
I agree, I think it probably has something to do with your RAID 6.

mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Re: Filesystem checks on every boot

Post by mcventur » Sat Dec 17, 2016 5:33 am

In fact, i didnt know i was using a raid. I have LM installed on a laptop, with a unique HD. I thought that a RAID is a system with more than one HD.

User avatar
Minterator
Level 5
Level 5
Posts: 596
Joined: Thu Jan 10, 2013 8:29 am

Re: Filesystem checks on every boot

Post by Minterator » Sat Dec 17, 2016 7:14 pm

Disk check on every reboot: Go to Startup Apps and create a new item with command:

Code: Select all

sudo touch /forcefsck
Mint 17.3 MATE, kernel 4.11.12

mcventur
Level 1
Level 1
Posts: 14
Joined: Fri Oct 28, 2016 8:28 pm

Re: Filesystem checks on every boot

Post by mcventur » Mon Dec 19, 2016 7:12 am

Minterator wrote:Disk check on every reboot: Go to Startup Apps and create a new item with command:

Code: Select all

sudo touch /forcefsck
Thanks, but what i want is not check on every boot. I mean, deactivate the message showing "Press Ctrl + C to cancel..." on boot. Deactivate the check, finding its cause, not the message.

rdonnelly
Level 5
Level 5
Posts: 519
Joined: Thu Nov 27, 2008 9:38 pm

Re: Filesystem checks on every boot

Post by rdonnelly » Mon Dec 19, 2016 11:37 am

I am having the same problem as well with a fresh install LM 18, it is on the same partition as LM 17.3 and never had a problem with that install.

I tried this https://ubuntuforums.org/showthread.php ... st11469223 but it did not work for me.

Some kind of Ubuntu bug?
Using Mint since 2008
*Mint 18.2 KDE
*ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
*AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
*G.SKILL Ripjaws X Series 16GB DDR3 SDRAM
*nVIDIA GEFORCE GT 610 2GB

faffmeister
Level 1
Level 1
Posts: 16
Joined: Mon Dec 27, 2010 4:18 pm

Re: Filesystem checks on every boot

Post by faffmeister » Tue Dec 20, 2016 11:07 am

I have exactly the same problem.

fsck is run on every boot.

In fact I posted about it back in early September but have had no suggestions:

viewtopic.php?f=46&t=229153&p=1211449&h ... k#p1211449

It would be great if someone could come up with a solution to this irritating and timewasting problem.

Thanks.
Last edited by faffmeister on Wed Mar 08, 2017 3:31 pm, edited 1 time in total.

Post Reply

Return to “Installation & Boot”