Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2003 08:53:12 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: installkernel first?
Message-ID:  <20030221085312.GB4221@happy-idiot-talk.infracaninophi>
In-Reply-To: <1045807067.3e55bfdbd5f75@webmail.adam.com.au>
References:  <1045718989.3e5467cdd1dee@webmail.adam.com.au> <20030220153710.GA19633@fif.office.inext.hu> <1045807067.3e55bfdbd5f75@webmail.adam.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 21, 2003 at 04:27:47PM +1030, bastill@adam.com.au wrote:

> Not being familiar with single user mode, I didn't realise that only / was
> mounted in that mode (so why does the handbook put "fsck -p" as the FIRST
> command, before "mount -a" ? <sigh>).

That would be because fsck(8) only works effectively on unmounted file
systems -- it really doesn't need anything else trying to write stuff
to the filesystem while it's trying to fix it.  In fact, in single
user mode the root partition is initially mounted read-only, precisely
so that fsck(8) can fix up the root filesystem without the danger of
writes to the partition at the same time.  It used to be the case that
the instructions explicitly told you to remount the root fs read-write
before doing a 'mount -a', but 'mount -a' has done all of that option
changing stuff for you automatically for several years now.

The new 'background fsck' capability in FreeBSD 5.0 (as I understand
it) relies on the capability to treat the filesystems on the newly
booted machine as 'snapshots', so that modifications to the fs are
held in cache memory and only written out to the disk once the fsck(8)
process has finished cleaning up the underlying stuff.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030221085312.GB4221>