fsck in securelevel 2?

2005-04-24 Thread Kövesdán Gábor
Hi,
I tried to check the root partition with fsck and it found errors and 
for my greatest surprise, it answered its questions automatically with 
no. It is due to the securelevel 2? I've been thinking whether fsck uses 
direct access (which is denied by the securelevel) or not?

Cheers,
Gábor Kövesdán
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: fsck in securelevel 2?

2005-04-24 Thread Erik Trulsson
On Sun, Apr 24, 2005 at 03:49:27PM +0200, Kövesdán Gábor wrote:
 Hi,
 
 I tried to check the root partition with fsck and it found errors and 
 for my greatest surprise, it answered its questions automatically with 
 no. It is due to the securelevel 2? I've been thinking whether fsck uses 
 direct access (which is denied by the securelevel) or not?

Of course fsck uses some kind of direct access to the disk.
It would not be able to identify and repair problems with the
filesystem, if it had to go through the filesystem to access the disk.

And to quote the manpage for init(8) (which describes what the various
securelevels mean):
Setting the security level above 1 too early in the boot sequence can
 prevent fsck(8) from repairing inconsistent file systems.

In the normal boot sequence fsck is run long before the securelevel is
raised so this is normally not a problem.


I hope the root partition had not been mounted as read/write when you
ran fsck, because if you run fsck on partition which is mounted r/w
fsck will often (incorrectly) report errors even if there are no
problems, and then one can really mess things up.



-- 
Insert your favourite quote here.
Erik Trulsson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: fsck in securelevel 2?

2005-04-24 Thread James Alexander Cook
On Sun, Apr 24, 2005 at 03:49:27PM +0200, K?vesd?n G?bor wrote:
 Hi,
 
 I tried to check the root partition with fsck and it found errors and 
 for my greatest surprise, it answered its questions automatically with 
 no. It is due to the securelevel 2? I've been thinking whether fsck uses 
 direct access (which is denied by the securelevel) or not?

If by direct access you mean opening the disk for writing, I'm pretty sure
the answer is yes, fsck does use direct access.  Correct me if I'm wrong, but
the only possible way to write to a disk in securelevel 2 is by mounting it and
modifying the filesystem on it.  And you can't fix a filesystem without a more
direct way of accessing it.

 
 Cheers,
 
 Gbor Kvesdn

- James Cook
  [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]