Subject: file system annoyances and such...
To: macbsd general list <macbsd-general@NetBSD.ORG>
From: Erik Vogan <>
List: macbsd-development
Date: 07/09/1995 23:11:45
Hello all,

	This message is getting cross posted for a somewhat legitimate 
reason, so if you don't like drivel and you are:
	A) a general macBSD user with some knowledge of silverlining 
	partitioning software, please read the end of the message

 or     B) a macBSD developer with some understanding of the file system 
	and it's intricacies, please read the whole message.

	Now, on to the question and the details.  I've got a fully (sort 
of) functional install of macBSD 1.0B, and I was happily compiling 
-current for personal use and gratification.  I have a 60 meg root, a 230 
meg /usr, and a 180 meg /home.  All -current work takes place on the 
/home partition.  I decided to mess around with a custom config file, 
config'ed, make'd depends, make'd, and then copied my -current to the 
root to test.  I've done this all before, so I expected this to work.
	The kernel booted with booter 1.6, and then immediately crashed 
because I'd not defined KTRACE or DEBUG (I forget which was not actually 
defined!).  I hit the debug switch, got no response, hit the hard reboot 
switch, got back to macOS, booted into 1.0B kernel, and proceeded to 
recompile with KTRACE and DEBUG enabled.
	So what ??  Well, during the compile I received a panic and dropped to 
the kernel debugger.  I don't remember the initial panic, but I rebooted, 
and had to run fsck manually.  I got many dupped inodes, many pathnames 
that were to be removed, many dup/bad inodes to be cleared, and all the 
tables needed to be rebuilt.  These errors were all reported on the /home 
partition where the compile had been taking place.  No matter how many 
times I ran fsck manually, it complained that there were missing bits in 
the allocation table, did I want to fix them ? [ I ran it twelve times in 
a row to be sure! ].
	I rebooted, recopied the -current sources files from the mac 
side, and the copied died with a panic: trying to free free block.  More 
fsck manually, more dups, pathnames to clear, dups/bad to clear, tables 
to be rebuilt, etc.  Repeat five to six times.  Suspicion starting to 
dawn - something is wrong here!  Then, the problem spread to the /usr 
	So ... I did what any person who has sold himself on an 
experimental OS would do - I punted.  I brought up the macOS mkfs, did a 
mkfs on all three volumes (/, /usr, /home, but NOT swap), and set to 
reinstalling all the base distribution binaries + X11.  Half way through 
installing misc.tgz the installer bails with a panic: trying to free free 
block !!!!
	Why would this happen if I've remade the file systems ??  Haven't 
I obliterated the table that should point to this information ??  Haven't 
I essential reformated this partition ??  Why am I still getting the 
panic ??  Can this be eradicated by re-initializing (note: not 
formatting!) ??  Please read on ...

------------------- begin silly thoughts on mac formatting SW -----------

	For those of you just joining us ... assume I want to totally 
wipe a unix partition with mac formatting tools.  Can I simply select 
reinitialize in my drive formatting package (silverlining 5.6/23) ?? Or 
must I change the partition type to macOS, reinitialize, change the 
partition type back to AU/X, and the re-mkfs ?? Will this have any nasty 
side effects on partition order (i don't think so) or other partitions on 
the drive ??

	Any help and explanation would really be most appreciated.  As 
well, the next time I see a panic: freeing free block - is there a 
special fsck mode for dealing with this ??


							erik vogan

~ Of all the races in all of the Galaxy who could have come and said a big
hello to the planet Earth, he thought, didn't it just have to be the Vogons.
							- HHGttG