Subject: Supporting the SunOS (or Solaris) "format"?
To: None <port-sparc@netbsd.org>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: port-sparc
Date: 01/20/1999 14:37:39
Now that I'm running 1.3.3, I thought I'd fire up the SunOS 4.1.4 "format"
binary just for fun and see how far it got.  The answer is "not very":

[...]
 25734 format   CALL  write(0x1,0x39678,0x16)
 25734 format   GIO   fd 1 wrote 22 bytes
       "Searching for disks..."
 25734 format   RET   write 22/0x16

[... opens of /dev/rxy* elided ...]

 25734 format   CALL  open(0xeffff068,0x6,0x63)
 25734 format   NAMI  "/emul/sunos/dev/rsd0c"
 25734 format   NAMI  "/dev/rsd0c"
 25734 format   RET   open 4
 25734 format   CALL  ioctl(0x4,_IOR('d',0x7e,0x3c),0xeffff3f4)
 25734 format   RET   ioctl -1 errno 25 Inappropriate ioctl for device
 25734 format   CALL  close(0x4)
 25734 format   RET   close 0
 25734 format   CALL  open(0xeffff068,0x6,0x63)
 25734 format   NAMI  "/emul/sunos/dev/rsd1c"
 25734 format   NAMI  "/dev/rsd1c"
 25734 format   RET   open -1 errno 16 Device busy
 25734 format   CALL  open(0xeffff068,0x6,0x63)
 25734 format   NAMI  "/emul/sunos/dev/rsd2c"
 25734 format   NAMI  "/dev/rsd2c"
 25734 format   RET   open -1 errno 16 Device busy
 25734 format   CALL  open(0xeffff068,0x6,0x63)
 25734 format   NAMI  "/emul/sunos/dev/rsd3c"
 25734 format   NAMI  "/dev/rsd3c"
 25734 format   RET   open -1 errno 6 Device not configured
 25734 format   CALL  open(0xeffff068,0x6,0x63)
 25734 format   NAMI  "/emul/sunos/dev/rsd4c"
 25734 format   NAMI  "/dev/rsd4c"
 25734 format   RET   open -1 errno 6 Device not configured
 25734 format   CALL  getuid
 25734 format   RET   getuid 0
 25734 format   CALL  write(0x2,0xefffec18,0x10)
 25734 format   GIO   fd 2 wrote 16 bytes
       "No disks found!

So it either gets EBUSY or emits an ioctl that the SunOS emulation doesn't
like very much.  Any chance of getting this working?  Or, failing that, using
some other program to do low-level formats and bad block remapping (I'm pretty
sure I remember the i386 platform having one?)?  I have a few older 1.2 Gb
disks that haven't failed yet, but are old enough to make me nervous ...

	- Greg

P.S. Curt, I tried to run "uugetty" but it spawned an immediate "login -p d/"
     process that I can't kill (the famous "babbling getty vs. modem").  :-)