Re: Can I easily force fsck on separate sysv ext4 /home ?

"Bruce Dubbs" ([email protected] via lfs-support Mailing List) <[email protected]> Sat, 12 Apr 2025 06:39:58 -0500
Newsgroups gmane.linux.lfs.support
Message-ID <[email protected]>
On 4/12/25 3:32 AM, Ken Moffat ([email protected] via lfs-support Mailing List) 
wrote:
> Just finished building LFS and my idea of minimal BLFS (nfs, git,
> yadda, yadda) for a desktop system.  Something among the (desktop)
> BLFS packages keeps /dev mounted which prevents me cleanly
> unmounting.  Seen that in a native build, in that case there seemed
> to be a lot of damage to the new filesystem (/etc, /var).
> 
> On this occasion I'm fairly sure the new system (for a different
> machine) is ok, but /home (nvme0n1p2) got shared (my problem).  When
> I mounted the new system at /mnt/lfs it reported it was replaying
> the journal for nvme0n1p2, then discarded orphaned inodes.
> 
> But, trying to be cautious, I'd like to do a forced fsck of it.
> 
> The current rootfs was fsck'd during boot, but I cannot see any
> obvious way to force fsck for other filesystems before mounting them
> ?  And I'm not sure that even the rootfs had a full fsck -f.

If you want to fsck a partition once, then log in as the root user, unmount /home, 
and check the partition.  Another way would be to boot to an external drive and
check each partition.

If you want to check everything at each boot, take a look at /etc/init.d/checkfs.
It is doing fsck ${options} -a -A -C -T, which is probably doing e2fsck, on
each filesystem in /etc/fstab.

   -- Bruce

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page