Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!mtxinu!ed From: ed@mtxinu.COM (Ed Gould) Newsgroups: comp.unix.wizards Subject: Re: inode #1 Keywords: file systems, root inode Message-ID: <824@mtxinu.UUCP> Date: 15 Apr 89 01:09:14 GMT References: <352@anvil.oz> <17278@dcatla.UUCP> Reply-To: ed@mtxinu.COM (Ed Gould) Organization: mt Xinu, Berkeley Lines: 33 >>Can anyone tell me why inode 1 is not used anywhere ? >I heard a terrific explanation of this at the Winter Usenix. During a >Sys5 tutorial, the speaker, who was from AT&T and apparantly very close >to the code, relayed the following story as an explanation for starting >everything at inode 2: >Back when Unix was being developed (while everyone else was banging rocks >together :-), one of the guys wanted to prove that there were no 'magic >cookies' in his code. At this time, inode 1 WAS the first inode used. To >prove his point, he changed the definition of the first inode to be '2'. >Well, he was right, everything worked fine. Problem is ... nobody set it >back to '1' !!! This is rediculous, and the stuff of which urban legends are made. In the Sixth Edition and before, inode 1 was indeed the root of the file system. When the file system was modified (one of the changes between the Sixth and Seventh edition), the root was moved to inode 2, and inode 1 was reserved for bad block handling. This method of bad block management was never widely implemented, if anyone ever actually did it at all. The notion that there were "no magic cookies" might be interestig, but does not relate to inode numbers. There are certainly constants in Unix that are difficult to change, even though they are always referenced by name. -- Ed Gould mt Xinu, 2560 Ninth St., Berkeley, CA 94710 USA ed@mtxinu.COM +1 415 644 0146 "I'll fight them as a woman, not a lady. I'll fight them as an engineer."