4.2 fsck and /etc/rc question
Tim Smith
tim at callan.UUCP
Sat Feb 9 07:55:29 AEST 1985
In article <649 at turtlevax.UUCP> edmund at turtlevax.UUCP (Ed Trujillo) writes:
>reboot the -n option avoids the sync. Why then does fsck do a sync()
>before the call to exit(4) ??? Is there a logical reason for this?
The above is for 4.2bsd, so what I say may be wrong. On Sys V it goes
like this....
When fsck is run on the root, the cooked file system is used. This is
because of the way fsck determines when it is doing root. So fsck must
do a sync() at the end to make sure the disk gets changed.
This can cause problems. If there is a problem with the inode for the
console, fsck will fix it on the disk, but since it is using the console,
the modify time on the in-core copy of the inode gets changed, and so
the final sync() writes it out, putting you right back where you started!
Here at Callan, we changed fsck to NOT do the final sync when doing a
raw device. Then problems like the above can be fixed by using fsck
on the raw root.
--
Duty Now for the Future
Tim Smith
ihnp4!wlbr!callan!tim or ihnp4!cithep!tim
More information about the Comp.unix.wizards
mailing list