Ubuntu – How to skip boot-time fsck check preferably by editing grub menu-entry

fsckfstabgrub2

I want to make an menuentry in grub, which boots up as normal but skips fsck. If that is possible, I could create two menu-entries one of which would skip filesystem check and the other would not.

My /etc/fstab file looks like below,

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda7 during installation
UUID=0a0fda6a-a0af-461f-936e-fe6feff3adba /               ext2    errors=remount-ro 0       1
# /home was on /dev/sda5 during installation
UUID=b9ed5358-a68a-48ef-8c51-7241f0462913 /home           ext4    defaults        0       2
# swap was on /dev/sda6 during installation
UUID=301dcfce-1bb3-415d-a71a-df64add29443 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0

Best Answer

  • Editing /etc/fstab file to bypass fsck check at boot:

    You can change the value of <pass>, the 6th field of file system description line in /etc/fstab to 0 (zero) to avoid filesystem check at the boot. (For your swap it's already 0, so you'll have to change your / and /home partitions' values from 1 and 2 respectively to 0 each.)

    # <file system>                  <mount point>  <type> <options>      <dump>   <pass>
    
    UUID=0a0fda6a-a0af-461f-936e-fe6feff3adba /      ext2  errors=remount-ro 0       1
    
    UUID=b9ed5358-a68a-48ef-8c51-7241f0462913 /home  ext4  defaults          0       2
    
    UUID=301dcfce-1bb3-415d-a71a-df64add29443 none   swap    sw              0       0
    

    ..so that the entries look like:

    # <file system>                  <mount point>  <type> <options>      <dump>   <pass>
    
    UUID=0a0fda6a-a0af-461f-936e-fe6feff3adba /      ext2  errors=remount-ro 0       0
    
    UUID=b9ed5358-a68a-48ef-8c51-7241f0462913 /home  ext4  defaults          0       0
    
    UUID=301dcfce-1bb3-415d-a71a-df64add29443 none   swap    sw              0       0
    

    The documented description of the fs_passno i.e. <pass> field in /etc/fstab file:

    The sixth field (`fs_passno`):
    

    This field is used by the fsck program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.