Score:0

Forcing fsck to check more than one mount point at every boot?

cx flag

I want to force fsck to run before every boot on my 2 mount points (constant problems with the filesystem):

  • /dev/nvme0n1p2
  • /dev/nvme0n1p4
> mount | grep nvme0
/dev/nvme0n1p2 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/nvme0n1p4 on /home type ext4 (rw,relatime)

This is what my fstab looks like:

> more /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
#
# / was on /dev/nvme0n1p2 during installation
UUID=c8da3896-602b-48a0-969f-d17e2d78ebcb /               ext4    errors=remount-ro 0       1
#
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=02B5-2A18  /boot/efi       vfat    umask=0077      0       1
#
# /home was on /dev/nvme0n1p4 during installation
UUID=4fb469d5-6a3c-4153-9d27-8257d862bb99 /home           ext4    defaults        0       2
#
# swap was on /dev/nvme0n1p3 during installation
UUID=1b1bb9f3-084a-4951-93ac-2c12dc9f15e3 none            swap    sw              0       0

Note the PASS column, it is set to 1 for nvme0n1p2 and to 2 for nvme0n1p4.

  • 0 – disabled
  • 1 – higher priority and is checked first
  • 2 – will be checked last

To force fsck after every system reboots I do the following:

  • sudo tune2fs -c 1 /dev/nvme0n1p2
  • sudo tune2fs -c 1 /dev/nvme0n1p4

To confirm the command is applied sudo tune2fs -l /dev/nvme0n1p4:

Maximum mount count: 1

However, on every boot, I see only the nvme0n1p2 is being checked.

Why is the second mount point nvme0n1p4 not being checked?

Note that blkid for some reason gives nothing for nvme0n1p4:

> blkid /dev/nvme0n1p4
> 

For nvme0n1p2 it gives the usual output:

> blkid /dev/nvme0n1p2
/dev/nvme0n1p2: UUID="c8da3896-602b-48a0-969f-d17e2d78ebcb" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ee3e65c7-d35e-4d6e-a856-55cda225dda3"
neuhaus avatar
us flag
How did you determine the UUID of nvme0n1p4 if blkid doesn't provide it?
cx flag
I read it from fstab, see above.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.