*BSD News Article 25102


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!gatech!pitt!w2xo!durham
From: durham@w2xo.pgh.pa.us (Jim Durham)
Newsgroups: comp.os.386bsd.questions
Subject: fsck on FreeBSD
Keywords: fsck FreeBSD
Message-ID: <12@w2xo.pgh.pa.us>
Date: 17 Dec 93 06:04:09 GMT
Lines: 67

I know someone made a post regarding the hanging of fsck on reboot with
FreeBSD, but I failed to save the posting. However,
here is what I have been able to determine experimentally...

First, the fstab file as I have it..

**********************

/dev/wd0a  /         ufs  rw  1 1
/dev/wd0e  /usr      ufs  rw  1 2
/dev/wd1c  /usr/local ufs rw  1 3

**********************

Results:

Fsck fails while running "fsck -p" in the /etc/rc script on reboot.

Fsck fails only after adding a line in /etc/fstab for a third file system.
   In my case this is for wd1c .

Removing the third line causes it to check the first two partitions only,
   but it doesn't hang.

Fsck -p run manually also hangs.

The hang occurs after fsck'ing the first partition, wd0a.

I killed the third line, copied the second line with the
editor to make a new third line. Made the minimal changes
to make it into the third line (looking for control chars or
some such thing in desparation), and I actually got it
to run with all three lines in fstab...but...it ran out of order!
It fsck'd wd0a, then wd1c, then wd0e !

I then rebooted and it went back to hanging after fsck'ing wd0a.


I don't have the disk space to unpack the source distribution, or
I would gladly try to fix this. Has anyone else come up with a fix?

A really awful hack to work around this is to copy your /etc/rc file
to /etc/rc.old, then edit rc to change the "fsck -p" line to
"fsck -p /dev/rwd0a", for example, then duplicate the entire case
block twice more, changing the file system argument to "fsck-p"
to the other partitions. ie;

	fsck -p /dev/rwd0a
	case
	...
	...
	esac
	fsck -p /dev/rwd0e
	case
	...
	...
	esac
	fsck -p /dev/rwd1c
	case
	...
	...
	esac

You get the idea. A real hack, but if your system won't reboot........


-Jim Durham