Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix,net.unix-wizards Subject: Re: Null in directory name Message-ID: <4416@umcp-cs.UUCP> Date: Fri, 29-Mar-85 03:24:29 EST Article-I.D.: umcp-cs.4416 Posted: Fri Mar 29 03:24:29 1985 Date-Received: Tue, 2-Apr-85 00:15:31 EST References: <32@wcom.UUCP> <4415@umcp-cs.UUCP> Distribution: net Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 29 Xref: watmath net.unix:4076 net.unix-wizards:12662 On rereading my reply, I notice I forgot the most important piece of information: how to use adb to fix directories. Well, it ain't easy. If you need to fix the /usr directory, then first you have to find out the file system name and inode number of /usr. Then you run "adb -w /dev/rxxns" (where xx is the disk, n is the unit number, and s is the partition name) and take a look at the inode for /usr (the method for finding this is different from Unix to Unix, but for most non-4.2's is a matter of adding an offset to the result of multiplying the inode number the size of a disk inode. In 4.2 you'd have to find the right cylinder group, which is another matter....) Anyway, dump out that inode (in whatever format it's in; look at ) and somewhere in there will be the list of blocks that /usr occupies. Track those down and you'll find a bunch of "struct direct" entries (hopefully) which represent the contents of /usr. In there will be the "b^@n" entry (or other corrupted entry), which is then easily patched. ---------- Oh yes, before I forget (I did last time): there's a fourth alternative that may be easier than any of the others. If you "clri" the inode for /usr, fsck will pick up all the directories that used to be under it and deposit them in /usr/lost+found. Then it's just a matter of figuring out which directory is which, and "mv"ing them back into place. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland