Once in a while (every 30-th boot) my linux system decides to check filesystem for errors. I am ok with this – what needs to be done needs to be done.
But sometimes I need my laptop to boot fast. I need some urgent job to do and I do not have time to wait for fsck to complete (it may take about 10 minutes). How can I stop the check in this case?
The only solution (well, workaround) I come up to now is to turn off auto fsck and run it manually occasionally. I do not like this approach, because I have to remember when it was the last time I run it.
What I want is to be able to press Ctrl+C to abort filesystem check. Let filesystem check run during the next boot!
But actually if I press Ctrl+C fsck just restarts.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
To only skip fsck once (rather than disabling it permanently via fstab, or tune2fs) try these options:
- temporarily add the
fastbootGRUB parameter before booting. For more info, check this link: https://wiki.ubuntu.com/Kernel/KernelBootParameters touch /fastbootshould also skip thefsckcheck next time you boot
Method 2
tune2fs does the trick. It allows you to view/change filesystem parameters:
# tune2fs -l /dev/system_vg/tmp_lv | grep -i check Mount count: 8 Maximum mount count: 34 Last checked: Sat Oct 29 12:44:27 2015 Check interval: 15552000 (6 months) Next check after: Thu Apr 26 12:44:27 2016
You can change each parameter to enable/disable it, or to force filesystem check on next reboot, etc.
I suggest you change to disable Maximum mount count, and Check interval on laptops.
# tune2fs -c 0 -i 0 /dev/system_Vg/tmp_lv
Method 3
fsck has an option which makes it delay the automatic check when the laptop is on battery power; that is, if the filesystem is configured to check once every 30 mounts, it will interpret that as once every 60 battery-powered mounts. Most distributions have it enabled these days. However, it only checks for that at startup.
What you could do is, if the automatic check starts, remove the power supply from your laptop and then restart fsck by whatever way (hard reset, ctrl-c, …)
Method 4
On my proxmox/debian instance:
Ctrl-Z
stops fsck
and
Ctrl-D
continues to boot as normal.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0