10

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.

6

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, ...)

  • Thanks! I'll upvote this reply as soon as I verify it works (which will happen in several days) :) – lesnik Oct 30 '15 at 9:34
  • Thanks again, method works. If I find that the filesystem check started and I do not feel like waiting, I unplug power supply and push Ctrl-Alt-Del (ctrl-c does not work by the way). It looks more like a workaround, not a clean solution, but it solves my problem. – lesnik Nov 11 '15 at 7:34
12

To only skip fsck once (rather than disabling it permanently via fstab, or tune2fs) try these options:

  1. temporarily add the fastboot GRUB parameter before booting. For more info, check this link: https://wiki.ubuntu.com/Kernel/KernelBootParameters
  2. touch /fastboot should also skip the fsck check next time you boot
  • 1
    Does /fastboot work for every boot? Does it persist? – Aaron Franke Jan 20 '18 at 0:41
  • 1
    /fastboot file is delete after boot, so next re-boot is not pressent – albertovar Mar 14 '18 at 13:28
  • Is /fastboot per drive, or just for the root filesystem? – mwfearnley Dec 12 '18 at 17:19
5

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
2

On my proxmox/debian instance:

Ctrl-Z

stops fsck and

Ctrl-D

continues to boot as normal.

  • What about AWS EC2 instance? Or any remote instance? You need console access to do that. – icalvete Oct 9 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.