fsck on boot 24.04 for root fs

Jerry Geis jerry.geis at gmail.com
Fri Nov 1 17:20:05 UTC 2024


On Fri, Nov 1, 2024 at 1:05 PM Keith via ubuntu-users <
ubuntu-users at lists.ubuntu.com> wrote:

> On 11/1/24 9:44 AM, Jerry Geis wrote:
> > I tried adding this to /etc/default/grub
> > GRUB_CMDLINE_LINUX_DEFAULT="fsck.mode=force fsck.repair=yes"
> > then running update-grub
> > rebooted
> >
> > found this in /var/log/syslog
> >
> > systemd[1]: systemd-fsck-root.service - File System Check on Root Device
> > was skipped because of an unmet condition check (ConditionPathExists=!/
> > run/initramfs/fsck-root)
> >
> > IN fact that file is there :
> > ls /run/initramfs/
> > fsck-root  fsck.log  overlayroot.log
> >
> > How can I re-generate INITRAMFS so that file is not present - so fsck
> > happens on the root fs ?
> >
>
> Initrd usually runs fsck before mounting the actual root filesystem. It
> creates the /run/initramfs/fsck-root stampfile that tells
> systemd-fsck-root.service that the root filesystem has already been
> checked. The results of the check should be in the fsck.log file.
>
> --
> Keith
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


I can remote /run/initramfs/fsck-root  and reboot - the file is
re-generated. How do I disable this file ?

This is hte contents of the log:
more /run/initramfs/fsck.log
Log of fsck -C -f -y -V -t ext4 /dev/nvme0n1p2
Fri Nov  1 17:16:11 2024

fsck from util-linux 2.39.3
[/usr/sbin/fsck.ext4 (1) -- /dev/nvme0n1p2] fsck.ext4 -f -y -C0
/dev/nvme0n1p2
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/nvme0n1p2: 252898/15196160 files (0.2% non-contiguous),
6418716/60773888 blocks

Fri Nov  1 17:16:12 2024



However I dont see it doing it on the screen - and /var/log/syslog says it
was actually SKIPPED
  kernel: systemd[1]: systemd-fsck-root.service - File System Check on Root
Device was skipped because of an unmet condition check
(ConditionPathExists=!/run/initramfs/fsck-root

Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20241101/a7349672/attachment-0001.html>


More information about the ubuntu-users mailing list