Why is my root filesystem always scanned at boot?
Solution 1
All looks OK in the outputs... :P
Two more things you can try:
- check if a
/forcefsck
file exists on your system; - boot into a LiveCD
and force the check of the
partition, for example using
GParted
→ Partition → Check.
Solution 2
Maybe you don't let it finish. It is a scheduled process every 30 boots. The linux file-system is checked. You can start this process by:
shutdown -rF now
This will restart and start the check.
Edit the check by running:
gksu gedit /etc/fstab
Last digit of every mounting line controls the fsck. Set value to 0 if want to disable fsck. for example:
/dev/hda1 /media/window_c vfat defaults 0 0
Related videos on Youtube
luri
Working fields: Architecture and structural engineering Graphical design Research on architecture Teaching (maths, design, technology, visual arts...)
Updated on September 17, 2022Comments
-
luri over 1 year
I always have a pause at boot saying my filesystems are being checked (with a "press C to cancel" note, too). Actually (seeing
boot.log
) I think it's the/
fs, which is located at/dev/sdb5
Several questions altoghether, here (hope this does not break any rule):
- Is this normal?
- Can I (or even should I) prevent this anyhow?
- According to boot.log (below) the fs does not seem to be 'clean', or, at least, it's in an state or condition that makes fsck always can it for errors for a while (just a few seconds). How can I fix it?
Edit: This is my boot.log:
fsck desde util-linux-ng 2.17.2 udevd[515]: can not read '/etc/udev/rules.d/z80_user.rules' /dev/sdb5: 249045/32841728 ficheros (0.3% no contiguos), 20488485/131338752 bloques init: ureadahead-other main process (1111) terminated with status 4 init: ureadahead-other main process (1116) terminated with status 4 Password: * Starting AppArmor profiles [160G Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox [154G[ OK ] * Setting sensors limits [160G [154G[ OK ]
And this is dumpe2fs results for the filesystem being checked (well, the relevant part of the log):
Filesystem volume name: <none> Last mounted on: / Filesystem UUID: 42509bf9-f3e6-460a-8947-ec0f5c1fbcc8 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: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 32841728 Block count: 131338752 Reserved block count: 6566937 Free blocks: 110850356 Free inodes: 32592701 First block: 0 Block size: 4096 Fragment size: 4096 Reserved GDT blocks: 992 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 Dec 10 19:44:15 2010 Last mount time: Mon Feb 14 17:00:02 2011 Last write time: Mon Feb 14 16:59:45 2011 Mount count: 1 Maximum mount count: 33 Last checked: Mon Feb 14 16:59:45 2011 Check interval: 15552000 (6 months) Next check after: Sat Aug 13 17:59:45 2011 Lifetime writes: 331 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: 28049496 Default directory hash: half_md4 Directory Hash Seed: d3d24459-514b-4413-b840-e970b766095b Journal backup: inode blocks Journal features: journal_incompat_revoke Tamaño de fichero de transacciones: 128M Journal length: 32768 Journal sequence: 0x0005e0c4 Journal start: 1
This is my
/etc/fstab
file:# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 #Entry for /dev/sdb5 : UUID=42509bf9-f3e6-460a-8947-ec0f5c1fbcc8 / ext4 errors=remount-ro 0 1 #Entry for /dev/sdb1 : UUID=685EC6355EC5FC36 /media/DATOS ntfs defaults,user 0 0 #Entry for /dev/sda2 : UUID=6A366B05366AD21D /media/W7 ntfs defaults,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,dmask=0077,fmask=0177 0 0 #Entry for /dev/sdb6 : UUID=66aa7f93-4c89-4118-af47-fdaa78db8f22 none swap sw 0 0 #Lector de tarjetas impresora //192.168.85.77/Memory_Card /media/HP smbfs defaults 0 0
-
samme4life about 13 yearsCan you please check the output of
dumpe2fs
(especially thefilesystem state
field) when the partition is UNMOUNTED? You can e.g. restart the computer and boot into a LiveCD and check the output from there. -
luri about 13 yearsWhen booted from LiveCD
Filesystem state
saysclean
(same as in log above). Boot pauses about 20 seconds to check filesystems... it's just a bit annoying. I added relevant fstab line to question. -
samme4life about 13 yearsCould you post the whole
/etc/fstab
file? Also: do you access the ext4 partitions from Windows or other OS? -
luri about 13 yearsNot usually I think once or twice I did some weeks ago, but just to read a file. I'll update the question with whole
/etc/fstab
now. -
luri about 13 yearsNo
/forcefck
I can find, and I already ckecked the partition (from Disk utility and with fsck when booted from a LiveCD) -
luri about 13 yearsI also chkdsk'ed the two NTFS partitions in W7, just to be sure. A few errors were corrected in one of them, but still I got the filesystem check when booting. Even though I'd say it's sdb5 which is being checked, (
dumpe2fs
Mount count
is always 1, unless I skip the check -pressing c-), is there any way to check if the rest of filesystems are 'clean' (asdumpe2fs
won't work on them, afaik)? -
luri about 13 yearsStupid me!! I checked for /forcefsk in the wrong console (the one in my laptop instead of the one I had ssh'ed into my desktop).... So the answer is YES, there is a /forcefsk file. Can you post an answer so that I can mark it as "Accepted"?
-
luri about 13 yearsI always let it finish (does not take long, tho). I have this line in fstab: UUID=42509bf9-f3e6-460a-8947-ec0f5c1fbcc8 / ext4 errors=remount-ro 0 1 So if I have understtod you correctly, this line is making ubuntu fsck my / at every boot. Should I change last digit to 0, or should I leave it as is? I mean... is it -by default- supposed to check / at everyboot or is it a misconfiguration of my fstab file?
-
LGB about 13 yearsI think the check is scheduled by these conditions: no clean umount, max mount count is reached or max time interval elapsed since the last fsck. dumpe2fs can tell you those settings (it's better to redirect to the file, and check it later, since it dumps large amount of information). If the interval/mount count is not your case, then it can be the unclean shutdown. Maybe your filesystem cannot be unmounted cleanly on shutdown/reboot that's why it's checked then. I am not sure it helps but maybe /var/log/boot.log tells the reason or you can read on boot ("unclean" or something?).
-
LGB about 13 yearsBtw, I wouldn't recommend to set the last field in fstab to zero, it will surely solve your problem but then there is no fsck even if it's really needed, and it can be sometimes dangerous to use a non-fsck'ed fileystem which would be the case if there is no fsck at all on startup even if it is really needed.
-
luri about 13 yearsI added dumpe2fs resuts for sdb5 (the fs being checked always at boot), in case that helps.... But my question is... should that entry be 1 by default? Should it (again I mean by default) be set to 0 or to 30 or...? In other words... is it really normal that it is fsck'ed at each boot? I don't want to disable fsck on it (although it is set to 0 in all the other filesystems), just make it run when necessary.
-
luri about 13 yearsAdded boot.log... Doesn't say it's clean, but doesn't say it's unclean, either. It says: "/dev/sdb5: 249648/32841728 ficheros (0.3% no contiguos), 20503149/131338752 bloques". I don't really understand why it's checked EVERY boot.... The 6th parameter in fstab is also set to 1 in another computer's root fs (same Ubuntu version) and it's not checked EVERY boot. Can I fsck / with some parameter to do kind of full check?
-
luri about 13 yearsAs I said before, the
/forcefsk
file was the problem. File is gone, problem is gone.