Re: Problem Booting (Bad Super Block)

2003-11-28 Thread John Duffey
On 28 Nov, Rishi Chopra <[EMAIL PROTECTED]> wrote:
> /dev/da0s1a:  BAD SUPER BLOCK:  VALUES IN SUPER BLOCK DISAGREE
> WITH THOSE IN FIRST ALTERNATE /dev/da0s1a:  UNEXPECTED
> INCONSISTENCY:  RUN fsck MANUALLY

> How can I fix this error so that the machine boots normally? 
> I am unable to run fsck from the prompt by just typing
> 'fsck'

I have this problem quite often in my version - 5.1-Release #9.

The trick is to never reboot. 

The bad superblock is always found on my second partition,
mounted on /disc2 (of which I use half a gig as swap space, the
other 5.5gigs do absolutely nowt)

Sorry. Let's cut to the chase. Type "newfs /dev/da0s1a" and you
should get back on the ball fairly quickly. 

John

-- 

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


Re: Problem Booting (Bad Super Block)

2003-11-28 Thread Matthew Seaman
On Fri, Nov 28, 2003 at 12:56:02AM -0800, Rishi Chopra wrote:
> I've started having problems on my FreeBSD box; I've installed FreeBSD 
> on this system at least 5 times before without any problems.
> 
> This time, the installation took many attempts, and the following error 
> message occurs when I attempt to boot up:
> 
> /dev/da0s1a:  BAD SUPER BLOCK:  VALUES IN SUPER BLOCK DISAGREE WITH 
> THOSE IN FIRST ALTERNATE
> /dev/da0s1a:  UNEXPECTED INCONSISTENCY:  RUN fsck MANUALLY
> 
> Automatic file system check then fail, the boot process aborts, and the 
> system starts in single user mode.
> 
> How can I fix this error so that the machine boots normally?  I am 
> unable to run fsck from the prompt by just typing 'fsck'

First thing you have to do is run fsck manually, like it says:

# /sbin/fsck -y /dev/da0s1a

With luck, this will fix the problems with your filesystem.  Now, make
sure that the rest of your filesystems are clean:

# /sbin/fsck -p

and then you should be able to reboot successfully.

If you can't run /sbin/fsck then you must be running FreeBSD 5.x with
the dynamic root patches.  In this case, there should be a statically
linked copy of fsck in /recover (? -- can't remember exactly what
directory is used, but it's something like that).  

The question remains as to why you're seeing this problem.  There are
3 obvious possibilities I can think of:

i) You didn't shut down cleanly -- however, normally the automatic
   fsck on reboot should clear up any problems.  If you're
   exceedingly unlucky, you might kill the system right in the
   middle of a critical operation and leave the disk in a nasty
   state leading to the effects you've seen.  In this case, once
   you've cleared up this time, you shouldn't suffer from the
   problem again.

   ii) Your disk is failing.

  iii) You've got (or once had) FreeBSD 5.x installed on the same
   system and you mount your 4.x partitions under 5.x -- there
   have been changes to the superblock format in UFS1 between 4.x
   and 5.x:

   http://www.freebsd.org/cgi/query-pr.cgi?pr=54884

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


pgp0.pgp
Description: PGP signature