Subject: MacBSD file system is corrupted after starting X11R6.
To: None <macbsd-general@NetBSD.ORG>
From: John C. Pingel <pingel@metronet.com>
List: macbsd-general
Date: 02/26/1995 00:27:11
I have a MacII with a PMMU and HD Floppy upgrade kit and have
successfully installed/booted MacBSD 1.0 into multi-user mode. I
was even able to use dt-1.0 just fine.  However, when I reinstalled
MacBSD 1.0 with the X11R6 and run X-Windows, the file system seems to
have been corrupted.

I have been able to get a xterm session with Tom's Window Manager
going just fine for a while... then I start getting error messages
about no inodes free.  I also can't get any of the commands to execute
(Exec format error: Wrong Architecture).  After rebooting the system,
MacBSD will not boot!

I have reinstalled MacBSD 1.0 patched w/ X11R6 three times and get just
about the same type of problems each time.  The first time or two I
accidently booted MacBSD while in 24-bit addressing mode, so I thought
maybe its because X11's server and apps are big enough that the kernel
has to start swapping.  The PMMU may not have been in the correct state
to handle swapping. This last time I did make sure that I had 32bit
addressing on (after selecting that memory option and rebooting the MacOS).

I've seen other comments on this list that mention that the order of my
partitions may be important.  Could it be that when netbsd starts
swapping, it corrupts the Root & Usr Slice 0???

Any ideas Allen or Brad as to what's wrong with my instalation of
MacBSD?  On a closing note, I'm very impressed with what you guys have
slaved over! (:->) However, I'm stumpped by my current problem  (:-{).

Thanks for the help,
John Pingel
Email: pingel@metronet.com

P.S. I appologize for the length of this message, however I hope that
the following log helps

--------------------------------------------------------------------------------

CPU: Mac II with PMMU and 1.4M HD Floppy Drive upgrade kit
RAM: 8MBytes
HardDisks:
   SCSI#0: 80 MByte Quantum Hard Disk
   SCSI#3: 1 GByte Fujitsu M2694ES-512
Monitor: Apple 13" RGB
Video card: original Apple 8bit color
MacOS: 7.1 w/ Mode32-7.5
   32bit-addressing turned on
   Monitor in B/W mode with 1bit per pixel

1. Created the partitions in the following order using APS v2.3.7
   a. 789 MBytes: MacOS partition (already existed; Apple_HFS)
   b. 215 MBytes: UNIX Root & Usr slice 0 (Apple_UNIX_SVR2)
   c.  21 MBytes: Swap slice 1 (Apple_UNIX_SVR2)
2. Created UFS on the "UNIX Root & Usr slice 0" partition using "Mkfs"
   Mkfs reported the following:
   ...
   inquiry (3)
   inquiry (4)
   inquiry (5)
   inquiry (6)
   modesense page 4(3)
   Error on SCSIRead(), #5
   Probably just a phase error, ignore the error -- this time.
   Num Heads 15
   Num Cylinders = 1819
   modesense page 3(3)
   Bytes_Sector is 512
   Sectors Track is 77
   Partition read, SCSIID = 3
   optimization space formatting.....
   nsectors 77, ntracks 15, cylspares 0
   Warning: 475 sector(s) in last cylinder
   unallocated disk:
      441890 sectors in 383 cylinders of 15 tracks, 77 sectors
      226.2MB in 24 cyl groups (16 c/g, 9.46MB/g, 2176 i/g)
      super-block backups (for fsck -b #) at:
      32, 18592, .... 167072,
      .... 332832, ....
   I don't remember any errors

3. Installed MacBSD 1.0 w/ X11R6 using "MacBSD Install Utility 1.0"
   a. Installed main packages:
      base10, etc10, comp10, man10, misc10, netbsd.patched
   b. created device files
   c. selected the Minishell and cpin'ed:
      dt-1.0.tar.gz, bash-1.14.2.tar.gz
   d. cd'ed to /usr and zinstalled: X.122094.tgz
   e. cd'ed back to / and typed sync (but no disk lights?)
   f. typed quit at the Minishell prompt and quit the Installer app.

4. Lauched the booter "MacBSD_Booter_1.4" and selected:
   Multi-user mode, RootSCSIID = 3 RAM #MB = 8,
   x AutoSized RAM Kernel Location = MacBSD/Mac,
   Partition Name= BS Root, x Errors, x verbose

5. Booted MacBSD... It booted just fine and started all the daemons
   just fine, and it let me login as root.  I entered mac for the
   terminal type.

6. As root I gunzipped and untarred both dt-1.0 and bash-1.14.2
   (I used "clear" before any of the command outputs went past the
   bottom of the screen).

7. Editted .cshrc and .profile to include "/usr/X11R6/bin" in root's
   path.

8. Started up X11 by typing "startx":
   a. 2 or three lines were displayed mentioning the grf...;
      however there were no error or warning messages.
   b. the standard X11 background bitmap was displayed with the
      standard X11 cursor.
   c. Then all of a sudden text error messages started to be
      displayed ontop of the background bitmap:

Warning: translation table syntax error: Unknown keysym name: Prior
Warning: ... found while parsing 'Shift <KeyPress> Prior:
   scroll-back(1,halfpage) '
Warning: translation table syntax error: Unknown keysym name: Next
Warning: ... found while parsing 'Shift<KeyPress> Next:
   scroll-forw(1, halfpage) '
Warning: translation table syntax error: Unknown keysym name: Select
Warning: ... found while parsing 'Shift <KeyPress> Select:
   select-cursor-start() and select-cursor-end(PRIMARY, CUT_BUFFER0) '
Warning: translation table syntax error: Unknown keysym name: Insert
Warning: ... found while parsing 'Shift <KeyPress> Insert:
   insert-selection(PRIMARY, CUT_BUFFER0) '

/: create/symlink failed, no inodes free Feb 25 03:18:18 myname
/netbsd: uid0 on /: out of inodes

/: create/symlink failed, no inodes free
grfunmap (141): dev a00 addr 0
grfunlock (141): dev 0 flags 3 lockpid -1
xinit: connection to X server lost.
myname#Feb 25 03:18:18 myname /netbsd: uid0 on /: out of inodes
/: bad dir ino26115 at offset 1024: mangled entry
/: bad dir ino26115 at offset 0: mangled entry
/: bad dir ino26115 at offset 512: mangled entry
...
I entered Ctl-C to abort
...
myname# clear /usr/bin/clear: Exec format error. Wrong Architecture.
...
At this point none of the commands worked so I hit the programmers
switch to go into debugger mode.  I then typed 'call synch' but nothing
happened!  So, I manually rebooted the machine and verified that my
MacOS partions were still readable.

--------------------------------------------------------------------------------