NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/43905: fsck_root fails on write protected partition



The following reply was made to PR misc/43905; it has been noted by GNATS.

From: Alan Barrett <apb%cequrux.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: misc/43905: fsck_root fails on write protected partition
Date: Mon, 27 Sep 2010 08:27:56 +0200

 On Sun, 26 Sep 2010, Christoph Badura wrote:
 >  >  /etc/rc.d/fsck_root invoked "fsck -p /" (assuming that fsck_flags
 >  >  had the default value of "-p").  Given that, it's not clear to me
 >  >  that fsck should have behaved any differently.
 >
 >  How about "it should behave like TFM(tm) says"?  Or, alternitively
 >  "it should behave like it has the last 15+ years"?  That has worked
 >  satisfactorily for me.
 >  
 >  youll-thank-me-later!bad 109 % uname -r; grep xbd0a /etc/fstab; sudo fsck 
 > -p /
 >  5.1_RC4
 >  /dev/xbd0a      /       ffs     ro
 >  Password:
 >  /dev/rxbd0a: file system is clean; not checking
 
 I don't see anything in the fsck(8) man page that promises not to open
 devices for writing if the file system is clean.  Since you show that
 this used to work, there are at last two bugs here:
 
 1) there was a regression in behaviour;
 2) the behaviour is not documented.
 
 >  I don't know what fsck_root is for either.  Lacking any documentation at
 >  all it looks to me like it is trying to duplicate standard functionality.
 
 I don't know where (or even whether) it's documented, but the reason
 for having two separate rc.d scripts to fsck the root file system and
 to fsck everything else, is to allow other rc.d scripts to be run in
 between.  The following explanation appears in the log message for
 revision 1.1 of fsck_root:
 
 " revision 1.1
 " date: 2009-04-21 18:08:57 +0200;  author: joerg;  state: Exp;
 " Split fsck during boot into two phases. Check the root file system
 " first, mount root and run the various disk providers. Add swap and
 " check the remaining file systems after that.
 " This breaks the dependency cycle for lvm, which needs writeable /dev.
 " Depend on rndctl in cgd.
 
 --apb (Alan Barrett)
 


Home | Main Index | Thread Index | Old Index