touch /forcefsck weirdness?

Thorsten Glaser t.glaser at tarent.de
Wed Mar 3 20:36:00 GMT 2021


Hi *,

I wanted to get my / fsck’d on next boot, so I did…

	sudo touch /forcefsck
	sudo poweroff

… then turned the laptop back on after a bit.

Imagine my surprise when /var/log/fsck/checkfs showed that
/boot was fsck’d, but not /, and /var/log/fsck/checkroot
was last modified in 2016. Unfortunately I’ve got no idea
what was shown during boot because it tends to scroll past
too quickly, plus there’s some console setup stuff that
prevents scrolling back up later.

sudo tune2fs -l /dev/sda4 shows that my / was indeed not fsck’d.

Adding forcefsck to the kernel commandline in a second run
did work, but that is no option for e.g. headless servers,
so I’m left wondering how this would be done.

The kernel commandline part lets the initramfs fsck the root
filesystem. I don’t know which of the two (initrd or initscripts)
should be responsible for the /forcefsck method but there *is* a
/etc/init.d/checkroot.sh which I *thought* would do… remount it
read-only, fsck it, remount read-write again.

Alternatively I’d be happy if the initramfs did that.

----

Upon looking further, I see I’ve installed a package that contains…

	# needed for writeback
	echo readonly=n >>/conf/param.conf

… in a /usr/share/initramfs-tools/scripts/init-top/ script, causing
the initial mount to be read-write. This may have some impact, but
remounting R/O again, temporarily, should still be possible, right?

bye,
//mirabilos
-- 
Infrastrukturexperte • tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

*************************************************

Mit dem tarent-Newsletter nichts mehr verpassen: www.tarent.de/newsletter

*************************************************



More information about the Debian-init-diversity mailing list