Problem with fsck
m.seaman at infracaninophile.co.uk
Thu Jan 26 12:11:31 PST 2006
manish jain wrote:
> I recently persuaded my organisation to shift our main
> server from Linux to FreeBSD 6.0. We are now facing a
> problem with fsck. After improper shutdown, we need
> fsck to run automatically and non-interactively in the
> foreground upon restart. Enabling background fsck lets
> the system come up but fails to properly start a few
> network services. With background fsck disabled, what
> would be the best way to automatically run 'fsck -fy'
> for each of the partitions upon restart after an
> improper shutdown ? Would it be okay to add the
> corresponding fsck lines somewhere at the top of
> /etc/rc ?
into /etc/rc.conf. That will cause the box to run 'fsck -p'
in the foreground on each reboot.
Alternatively, if this is a one-off, just hit '4' on the boot-up
menu screen, boot into single user mode and run fsck manually.
First, run 'fsck -p' to automatically repair any filesystems marked
as unclean when shutdown. If fsck flails and requests human
interaction then run
adjusting X, Y and z to suit your local partitioning, and changing
ad to whatever is appropriate if you aren't running on bog-standard
IDE or SATA drives.
Note that it can be quite dangerous to run 'fsck -y' blindly: that
gives fsck permission to destroy otherwise recoverable data if it
needs to in order to get the filesystem back into shape.
Once fsck shows all your partitions as clean, just hit ^D to let the
system come the rest of the way up.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060126/7b5807a4/signature.bin
More information about the freebsd-questions