Bug#470956: initscripts: checkroot.sh shouldn't fsck twice with /forcefsck

Adrian Bunk bunk at debian.org
Fri Mar 8 18:16:44 GMT 2019


Control: tags -1 -moreinfo

On Fri, Mar 08, 2019 at 04:53:41PM +0000, Pierre Ynard wrote:
> severity 470956 minor
> tags 470956 moreinfo
> thanks
> 
> > I am aware that fsck of ext2 isn't fast, but that's not a reason for
> > doing it needlessly *twice* when the first fsck gave an error <= 3.
> >
> > What happened was:
> > $ shutdown -F -r now
> > # computer reboots
> > # fsck of root fs
> < # fsck.ext2 returned error 3 (most likely since it optimized directories)
> > # computer automatically reboots  (everything works as expected until now)
> > # fsck of root fs  *grrr*
> 
> I don't see how the system itself could guarantee between the two boots
> that the filesystem is still clean the second time. Another OS could
> have been booted instead, used the filesystem and left it dirty. The
> device could have been swapped in and out of the machine, and mounted by
> another system, etc...
> 
> Even we wanted initscripts to set up some flag for the next reboot,
> that's not really possible because the filesystem is still read-only
> at this point, and really shouldn't be touched anymore until after the
> reboot.
> 
> I suppose that if anything could be done about this, it would be by fsck
> utilities in the filesystem internal attributes. But I don't know which
> filesystem types would be concerned by this issue and if they would
> allow to address it. Ted, what do you think about this?

The logical fix would be to mark the filesystem as clean since all
errors have been corrected.

If anything, the kernel should not mark it clean again if it gets 
mounted rw and then unmounted again before a reboot.

> Pierre Ynard

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed




More information about the Debian-init-diversity mailing list