[comp.unix.microport] Auto-checking of file systems

john@wa3wbu.UUCP (John Gayman) (12/01/88)

   What do I have to modify in Sys V/AT to have it run fsck on all file
systems, including root, at power up regardless of wether the previous
shutdown was normal or not. I've looked through the files run in inittab
and its not real clear. Thanks.   
					John


-- 
John Gayman, WA3WBU              |           UUCP: uunet!wa3wbu!john
1869 Valley Rd.                  |           ARPA: john@wa3wbu.uu.net 
Marysville, PA 17053             |           Packet: WA3WBU @ AK3P 

wtr@moss.ATT.COM (12/03/88)

In article <683@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes:
>   What do I have to modify in Sys V/AT to have it run fsck on all file
>systems, including root, at power up regardless of wether the previous
>shutdown was normal or not. I've looked through the files run in inittab
>and its not real clear. Thanks.   
>					John

john,

check out the variouse /etc/rc* files.  these are the scripts
that are run upon changing to a new init level.  the various
/etc/rc *directories* hold individual scripts which are also
run.  i believe that the code that you are looking for should
be in there.

sorry i can't be more precise, but i don't have a uport system
anymore. (gotta at&t unix-pc a few weeks ago, and sold my pc).
but the scripts are fairly strait forward and simple to pick 
apart. (also pretty educational, if you realy want to find out 
what all goes on at bootup)

good luck!

=====================================================================
Bill Rankin
Bell Labs, Whippany NJ
(201) 386-4154 (cornet 232)

email address:		...!att!moss!wtr

rsj@wa4mei.UUCP (Randy Jarrett WA4MEI) (12/04/88)

In article <683@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes:
>
>   What do I have to modify in Sys V/AT to have it run fsck on all file
>systems, including root, at power up regardless of wether the previous
>shutdown was normal or not. I've looked through the files run in inittab
>and its not real clear. Thanks.   
>					John

In the file /etc/mountall comment out three lines in the following group
that are marked with #xxx.


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
" /etc/mountall "

		#	First check file system state and repair if necessary.
		msg=`/etc/fsstat ${dev} 2>&1`
#xxx		if [ $? -ne 0 ]
#xxx		then
			echo "
	${msg}
	${dev} is being checked automatically."
			/etc/fsck -y -t /fsck.tmp -D ${dev}
#xxx		fi

		/etc/mount ${dev} ${fs} ${readonly}
	done

And then three lines in bcheckrc to force the checking of /dev/dsk/0s0

" end of /etc/mountall "
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

" /etc/bcheckrc "

msg=`/etc/fsstat ${rootfs} 2>&1`

#xxx if [ $? -ne 0 ]
#xxx then
	echo "
	${msg}
	The root file system (${rootfs}) is being checked automatically."
	/etc/fsck -y -D -b ${rootfs}
#xxx fi

" end of bcheckrc "
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Doing the three lines in each file will force the use of fsck on each filesystem everytime you boot your system


-- 
Randy Jarrett  WA4MEI 
UUCP  ...!gatech!wa4mei!rsj        | US SNAIL: P.O. Box 941217
PHONE +1 404 493 9017		   |           Atlanta, GA 30341-0217

mem@zinn.MV.COM (Mark E. Mallett) (12/09/88)

In article <683@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes:
>   What do I have to modify in Sys V/AT to have it run fsck on all file
>systems, including root, at power up regardless of wether the previous
>shutdown was normal or not. I've looked through the files run in inittab
>and its not real clear. Thanks.   
>					John

You should be able to add a line in /etc/inittab that gets run at
bootup time, pointing to a shell procedure that checks your file
systems.  Like this:

ca::sysinit:/etc/checkall </dev/console > /dev/console 2>&1

Note that there's already an /etc/checkall that's a skeleton.
But just a list of fsck commands for the disks you wish to check
should do the trick.

-mm-

-- 
Mark E. Mallett  Zinn Computer Co/ PO Box 4188/ Manchester NH/ 03103 
Bus. Phone: 603 645 5069    Home: 603 424 8129     BIX: mmallett
uucp: mem@zinn.MV.COM  (  ...{decvax|elrond|harvard}!zinn!mem   )
Northern MA and Southern NH consultants:  Ask me about MV.COM