Score:1

Add more verbosity when running `fsck` disk check at boot time?

cx flag

I've set the number of mounts after which the filesystem will be checked for errors:

sudo tune2fs -c 1 /dev/nvme0n1p2

(More at https://linuxconfig.org/how-to-force-fsck-to-check-filesystem-after-system-reboot-on-linux).

This causes fsck to run on every boot.

I've also added a script /root/fsck-log-save.sh to save each fsck log:

#!/bin/bash
cp /run/initramfs/fsck.log "/tmp/fsck.log.$(date +%Y%m%d-%H%M%S)"

(The script must be executable: sudo chmod +x /root/fsck-log-save.sh)

In order to run this log saving script on each boot, create a service /etc/systemd/system/fsck-log-rename.service file:

[Unit]
Description=FSCK log save at startup.

[Service]
ExecStart=/bin/bash /root/fsck-log-save.sh

[Install]
WantedBy=multi-user.target

Enable the service:

sudo systemctl enable /etc/systemd/system/fsck-log-rename.service

and start it:

sudo systemctl start fsck-log-rename.service

I'd like to have a more verbose output from fsck written into fsck.log. There is an option -V, but where to add this option?

cn flag
I would assume that is not going to work: `-v` needs to be issued when the command is issued. `systemd-fsck-root.service ` does the systemcheck and edit the command there to include ``-v` and you also will need to edit `/etc/fstab` and set `passno` to 0 on each boot (as that is the trigger to do a file system check). See `man systemd-fsck`. OR you will also need a personal systemd service for your system check.
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.