NeXT Computers Forum Index NeXT Computers
www.NeXTComputers.org
 
Log in to check your private messagesLog in to check your private messages

Log inLog in  RegisterRegister


Profile  Search  Memberlist  FAQ  Usergroups
Using SCSI2SD - Help Needed

 
Post new topic   Reply to topic    NeXT Computers Forum Index -> Black Hardware
View previous topic :: View next topic  
Author Message
Retro_Mac_Ken



Joined: 29 Aug 2016
Posts: 12
Location: Madison, WI

PostPosted: Fri Oct 12, 2018 9:49 am    Post subject: Using SCSI2SD - Help Needed Reply with quote

Hello all,

Way back in 2016 I received a NeXT Cube from a retiring professor with the boxes and everything. The good news is I was able to recover all the data off the SCSI hard drive.

http://www.nextcomputers.org/forums/viewtopic.php?t=3931&highlight=

After a year in storage due to renovations, I finally got the opportunity to put it back on my desk.

I decided to purchase a SCSI2SD 5.1 to refurbish the Cube, but I quickly ran into some difficulty when trying to get it to work. My expertise is in vintage Macs, not necessarily NeXT hardware.

When I boot from the original SCSI hard drive everything works fine. I have a CD ROM drive on SCSI ID 3 that functions as expected.

I configured the SCSI2SD to be a single HD SCSI ID 0 with a 2gb partition. When I connect the SCSI2SD to the Cube and fire up the ROM Monitor I get the following message trying to boot from bsd(0,0,0).

Code:

bad version 0x0
bad version 0x0
bad version 0x0
bad version 0x0


I expected that because the SD card isn't formatted yet and has no files written to it. The plan was to use the CD ROM on SCSI ID 3 to install NeXTStep 3.3. But when I try to boot to bsd(3,0,0) I get the following.

Code:

no SCSI disk


Welp. I'm trying to figure this one out. But some professional insight would be appreciated. What can I check? Am I using the bsd command wrong?

Thanks![/code]
Back to top
View user's profile Send private message Visit poster's website
wa2flq



Joined: 18 Dec 2008
Posts: 39
Location: Chicagoland

PostPosted: Fri Oct 12, 2018 4:37 pm    Post subject: Reply with quote

A couple of things going on here.

When the machine starts it looks for a certain signature on the disk that indicates its a NS 68K volume. This error is seen when the include a disk doesn't have correct data (your case) OR that mapping of heads/sectors/cylinders is incorrect. For the SCSI2SD make certain you use its features to create a customized mapping (using an XML file) before you install the OS. You should be able to find a few threads in the forum that give more detail.

The critical bits are
<bytesPerSector>512</bytesPerSector>
<sectorsPerTrack>139</sectorsPerTrack>
<headsPerCylinder>4</headsPerCylinder>

This link gives a summary of the commands in the ROM monitor http://www.nextcomputers.org/NeXTfiles/Docs/NeXTStep/3.3/nsa/09_StartShut.htmld/index.html Also I believe you might need a floppy and a 68k bootstrap image if the ROM is v2. Otherwise the boot command seems correct for ID=3. Try the other numbers just to rule-out ID selector issues. If the CDROM rom works with the SCSI HD, but not the SCSI2SD then perhaps there is termination or other configuration problem. Note that sector size of the CDROM needs to be 512 byte.
Back to top
View user's profile Send private message
Retro_Mac_Ken



Joined: 29 Aug 2016
Posts: 12
Location: Madison, WI

PostPosted: Mon Oct 15, 2018 8:03 am    Post subject: Reply with quote

Thanks for the input!

I was able to grab that XML file in the other thread you referred to.

http://www.nextcomputers.org/forums/viewtopic.php?t=4215&highlight=codesrc

I loaded it onto the SCSI2SD without issue. I see that it loaded the bytesPerSector, sectorsPerTrack, and headsPerCylinder info. If I copy what was done in that thread, the next step is to DD a NeXTStep ISO on over to the CD portion.

But what isn't quite clear to me is how to do that. And there is either an ambiguity or it isn't quite opaque in the SCSI2SD documentation how the SD card is formatted. Is that something that is accomplished by the SCSI2SD with the SD card in it? Or is that something I can do in Terminal? If I'm struggling to get NeXTStep files onto the SD card to boot from... this is kind of a chicken or the egg situation.

I do have ROM Monitor 2.1 (v59). So I'll have to look up how to bootstrap if what you say is true.


Last edited by Retro_Mac_Ken on Mon Oct 15, 2018 12:26 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
wa2flq



Joined: 18 Dec 2008
Posts: 39
Location: Chicagoland

PostPosted: Mon Oct 15, 2018 9:42 am    Post subject: Reply with quote

Retro_Mac_Ken wrote:
Thanks for the input!

I was able to grab that XML file in the other thread you referred to.

http://www.nextcomputers.org/forums/viewtopic.php?t=4215&highlight=codesrc

I loaded it onto the SCSI2SD without issue. I see that it loaded the bytesPerSector, sectorsPerTrack, and headsPerCylinder info. If I copy what was done in that thread, the next step is to DD a NeXTStep ISO on over to the CD portion.

But what isn't quite clear to me is how to do that. And there is either an ambiguity or it isn't quite opaque in the SCSI2SD documentation how the SD card is formatted. Is that something that is accomplished by the SCSI2SD with the SD card in it? Or is that something I can do in Terminal?

I do have ROM Monitor 2.1 (v59). So I'll have to look up how to bootstrap if what you say is true.


You have several options here depending on your overall goal.

If you want to be able to install a fresh OS copy on the SCSI drive, then I believe you need a floppy that works withe cube. I've never done this myself, so perhaps others can chime in. You will need the CDROM installation media present either on an external CDROM or using a SCS2SD substitute if you do not have a compatible drive (and a bit more XML configuration). This has the highest degree of difficulty, but most rewarding.

If the original disk (HD) drive you have in the cube is working (and you have imaged this disk and saved it offline correct?), then you could use BuildDisk to create a new system disk to build onto the SCSI2SD drive. Install media still needed. Medium degree of difficulty.

Alternatively, just size the SCSI2SD drive the same as the original HD* and use 'dd' to copy the image to the new SCSI2SD SCSI ID# under terminal. If you don't have a functional OS/good HD drive on the cube then getting a disk image from someone who has a basic installation already done.

I myself try to keep it simple at first, then go back and try the more complex methods later.

Additional advice:

Be careful when you use 'dd' to copy images, both to different devices and to/from different areas of the same disk. Make sure you have multiple good backups of EVERYTHING. 'dd' is usually run under root (sudo dd if=/dev/xxxx ) so all takes is a simple mistype of drive name or number to turn an important disk into a pile of useless bits. Measure twice and cut once.

One item to understand is that Nextstep/Openstep booting requires the that external SCSI id's and configuration file /etc/fstab match for the root '/' device to get a clean bootstrap. In many threads you will see instructions to disconnect completely the original disk and set the new disk to the SCSI ID of the old one. The detail about /etc/fstab is not consistently mentioned, but this is the reason you cannot just boot immediately off the new disk after the copy is complete.

* If the HD disk has some bad spots, using the DD method requires some careful handling. I have some additional pointers on copying media with defects using the dd command if you need it.
Back to top
View user's profile Send private message
Retro_Mac_Ken



Joined: 29 Aug 2016
Posts: 12
Location: Madison, WI

PostPosted: Mon Oct 15, 2018 9:53 am    Post subject: Reply with quote

I'll have to pick up a 50-PIN SCSI cable with another connector on it to copy the OS directly from the original HD > SCSI2SD partition. The one in the Cube only has two. I may have one in storage from long ago, but eBay will be able to save me if I go that route.
Back to top
View user's profile Send private message Visit poster's website
Retro_Mac_Ken



Joined: 29 Aug 2016
Posts: 12
Location: Madison, WI

PostPosted: Wed Oct 17, 2018 1:14 pm    Post subject: Reply with quote

Thanks to some helpful input from evolver56k in another thread I was able to get my SCSI2SD to work.

http://www.nextcomputers.org/forums/viewtopic.php?t=4215&start=15

So here is a step by step on how things worked... and didn't... for me. I am NOT AN EXPERT as to whether or not all these steps are necessary or how they work. I'll leave that to other more knowledgeable people on this forum.

STEP 1: PREPPING SCSI2SD

Prepare the SCSI2SD device. Here is what I am using the scsi2sd-util to allocate.

SCSI ID 0 - HD set to be 2gb
SCSI ID 1 - HD set to be 2gb
SCSI ID 2 - Floppy Drive set to be 1.4mb
SCSI ID 3 - CDROM - 650mb

Pay attention to the SD CARD START SECTOR for each device. This will be important later.

SECTOR SIZE for each should be 512 bytes.

Here is the XML file if you want to copy my settings.


Code:


<SCSI2SD>
<BoardConfig>
   <!-- ********************************************************
   Enable the onboard active terminator (v5.1 or greater).
   Both ends of the SCSI chain should be terminated. Disable
   only if the SCSI2SD is in the middle of a chain with other
   devices.
   ********************************************************* -->
   <enableTerminator>true</enableTerminator>
   <unitAttention>false</unitAttention>
   <parity>false</parity>
   <!-- ********************************************************
   Only set to true when using with a fast SCSI2 host
    controller. This can cause problems with older/slower
   hardware.
   ********************************************************* -->
   <enableScsi2>false</enableScsi2>
   <!-- ********************************************************
   Setting to 'true' will result in increased performance at the
   cost of lower noise immunity.
   Only set to true when using short cables with only 1 or two
   devices. This should remain off when using external SCSI1 DB25
   cables.
   ********************************************************* -->
   <disableGlitchFilter>false</disableGlitchFilter>
   <enableCache>false</enableCache>
   <enableDisconnect>false</enableDisconnect>
   <!-- ********************************************************
   Respond to very short duration selection attempts. This supports
   non-standard hardware, but is generally safe to enable.
   Required for Philips P2000C.
   ********************************************************* -->
   <selLatch>false</selLatch>
   <!-- ********************************************************
   Convert luns to IDs. The unit must already be configured to respond
   on the ID. Allows dual drives to be accessed from a
   XEBEC S1410 SASI bridge.
   eg. Configured for dual drives as IDs 0 and 1, but the XEBEC will
   access the second disk as ID0, lun 1.
   See ttp://bitsavers.trailing-edge.com/pdf/xebec/104524C_S1410Man_Aug83.pdf
   ********************************************************* -->
   <mapLunsToIds>false</mapLunsToIds>
   <!-- ********************************************************
   Delay (in milliseconds) before responding to a SCSI selection.
   255 (auto) sets it to 0 for SCSI2 hosts and 1ms otherwise.
   Some samplers need this set to 1 manually.
   ********************************************************* -->
   <selectionDelay>255</selectionDelay>
   <!-- ********************************************************
   Startup delay (in seconds) before responding to the SCSI bus
   after power on. Default = 0.
   ********************************************************* -->
   <startupDelay>0</startupDelay>
   <!-- ********************************************************
   Speed limit the SCSI interface. This is the -max- speed the
   device will run at. The actual spee depends on the capability
   of the host controller.
   0   No limit
   1   Async 1.5MB/s
   ********************************************************* -->
   <scsiSpeed>0</scsiSpeed>
</BoardConfig>
<SCSITarget id="0">
   <enabled>true</enabled>

   <!-- ********************************************************
   Space separated list. Available options:
   apple      Returns Apple-specific mode pages
   omti      OMTI host non-standard link control
   xebec      XEBEC ignore step options in control byte
   ********************************************************* -->
   <quirks></quirks>


   <!-- ********************************************************
   0x0    Fixed hard drive.
   0x1    Removable drive.
   0x2    Optical drive  (ie. CD drive).
   0x3    1.44MB Floppy Drive.
   ********************************************************* -->
   <deviceType>0x0</deviceType>


   <!-- ********************************************************
   Device type modifier is usually 0x00. Only change this if your
   OS requires some special value.

   0x4C    Data General Micropolis disk
   ********************************************************* -->
   <deviceTypeModifier>0x0</deviceTypeModifier>


   <!-- ********************************************************
   SD card offset, as a sector number (always 512 bytes).
   ********************************************************* -->
   <sdSectorStart>0</sdSectorStart>


   <!-- ********************************************************
   Drive geometry settings.
   ********************************************************* -->

   <scsiSectors>4194304</scsiSectors>
   <bytesPerSector>512</bytesPerSector>
   <sectorsPerTrack>139</sectorsPerTrack>
   <headsPerCylinder>4</headsPerCylinder>


   <!-- ********************************************************
   Drive identification information. The SCSI2SD doesn't
   care what these are set to. Use these strings to trick a OS
   thinking a specific hard drive model is attached.
   ********************************************************* -->

   <!-- 8 character vendor string -->
   <!-- For Apple HD SC Setup/Drive Setup, use ' SEAGATE' -->
   <vendor> codesrc</vendor>

   <!-- 16 character produce identifier -->
   <!-- For Apple HD SC Setup/Drive Setup, use '          ST225N' -->
   <prodId>         SCSI2SD</prodId>

   <!-- 4 character product revision number -->
   <!-- For Apple HD SC Setup/Drive Setup, use '1.0 ' -->
   <revision> 6.0</revision>

   <!-- 16 character serial number -->
   <serial>1234567812345678</serial>

   <!-- Custom mode pages, base64 encoded, up to 1024 bytes.-->
   <modePages>

   </modePages>

   <!-- Custom inquiry VPD pages, base64 encoded, up to 1024 bytes.-->
   <vpd>

   </vpd>
</SCSITarget>
<SCSITarget id="1">
   <enabled>true</enabled>

   <!-- ********************************************************
   Space separated list. Available options:
   apple      Returns Apple-specific mode pages
   omti      OMTI host non-standard link control
   xebec      XEBEC ignore step options in control byte
   ********************************************************* -->
   <quirks></quirks>


   <!-- ********************************************************
   0x0    Fixed hard drive.
   0x1    Removable drive.
   0x2    Optical drive  (ie. CD drive).
   0x3    1.44MB Floppy Drive.
   ********************************************************* -->
   <deviceType>0x0</deviceType>


   <!-- ********************************************************
   Device type modifier is usually 0x00. Only change this if your
   OS requires some special value.

   0x4C    Data General Micropolis disk
   ********************************************************* -->
   <deviceTypeModifier>0x0</deviceTypeModifier>


   <!-- ********************************************************
   SD card offset, as a sector number (always 512 bytes).
   ********************************************************* -->
   <sdSectorStart>4194304</sdSectorStart>


   <!-- ********************************************************
   Drive geometry settings.
   ********************************************************* -->

   <scsiSectors>4194304</scsiSectors>
   <bytesPerSector>512</bytesPerSector>
   <sectorsPerTrack>63</sectorsPerTrack>
   <headsPerCylinder>255</headsPerCylinder>


   <!-- ********************************************************
   Drive identification information. The SCSI2SD doesn't
   care what these are set to. Use these strings to trick a OS
   thinking a specific hard drive model is attached.
   ********************************************************* -->

   <!-- 8 character vendor string -->
   <!-- For Apple HD SC Setup/Drive Setup, use ' SEAGATE' -->
   <vendor> codesrc</vendor>

   <!-- 16 character produce identifier -->
   <!-- For Apple HD SC Setup/Drive Setup, use '          ST225N' -->
   <prodId>         SCSI2SD</prodId>

   <!-- 4 character product revision number -->
   <!-- For Apple HD SC Setup/Drive Setup, use '1.0 ' -->
   <revision> 6.0</revision>

   <!-- 16 character serial number -->
   <serial>1234567812345678</serial>

   <!-- Custom mode pages, base64 encoded, up to 1024 bytes.-->
   <modePages>

   </modePages>

   <!-- Custom inquiry VPD pages, base64 encoded, up to 1024 bytes.-->
   <vpd>

   </vpd>
</SCSITarget>
<SCSITarget id="2">
   <enabled>true</enabled>

   <!-- ********************************************************
   Space separated list. Available options:
   apple      Returns Apple-specific mode pages
   omti      OMTI host non-standard link control
   xebec      XEBEC ignore step options in control byte
   ********************************************************* -->
   <quirks></quirks>


   <!-- ********************************************************
   0x0    Fixed hard drive.
   0x1    Removable drive.
   0x2    Optical drive  (ie. CD drive).
   0x3    1.44MB Floppy Drive.
   ********************************************************* -->
   <deviceType>0x3</deviceType>


   <!-- ********************************************************
   Device type modifier is usually 0x00. Only change this if your
   OS requires some special value.

   0x4C    Data General Micropolis disk
   ********************************************************* -->
   <deviceTypeModifier>0x0</deviceTypeModifier>


   <!-- ********************************************************
   SD card offset, as a sector number (always 512 bytes).
   ********************************************************* -->
   <sdSectorStart>8388608</sdSectorStart>


   <!-- ********************************************************
   Drive geometry settings.
   ********************************************************* -->

   <scsiSectors>2880</scsiSectors>
   <bytesPerSector>512</bytesPerSector>
   <sectorsPerTrack>63</sectorsPerTrack>
   <headsPerCylinder>255</headsPerCylinder>


   <!-- ********************************************************
   Drive identification information. The SCSI2SD doesn't
   care what these are set to. Use these strings to trick a OS
   thinking a specific hard drive model is attached.
   ********************************************************* -->

   <!-- 8 character vendor string -->
   <!-- For Apple HD SC Setup/Drive Setup, use ' SEAGATE' -->
   <vendor> codesrc</vendor>

   <!-- 16 character produce identifier -->
   <!-- For Apple HD SC Setup/Drive Setup, use '          ST225N' -->
   <prodId>         SCSI2SD</prodId>

   <!-- 4 character product revision number -->
   <!-- For Apple HD SC Setup/Drive Setup, use '1.0 ' -->
   <revision> 6.0</revision>

   <!-- 16 character serial number -->
   <serial>1234567812345678</serial>

   <!-- Custom mode pages, base64 encoded, up to 1024 bytes.-->
   <modePages>

   </modePages>

   <!-- Custom inquiry VPD pages, base64 encoded, up to 1024 bytes.-->
   <vpd>

   </vpd>
</SCSITarget>
<SCSITarget id="3">
   <enabled>true</enabled>

   <!-- ********************************************************
   Space separated list. Available options:
   apple      Returns Apple-specific mode pages
   omti      OMTI host non-standard link control
   xebec      XEBEC ignore step options in control byte
   ********************************************************* -->
   <quirks></quirks>


   <!-- ********************************************************
   0x0    Fixed hard drive.
   0x1    Removable drive.
   0x2    Optical drive  (ie. CD drive).
   0x3    1.44MB Floppy Drive.
   ********************************************************* -->
   <deviceType>0x2</deviceType>


   <!-- ********************************************************
   Device type modifier is usually 0x00. Only change this if your
   OS requires some special value.

   0x4C    Data General Micropolis disk
   ********************************************************* -->
   <deviceTypeModifier>0x0</deviceTypeModifier>


   <!-- ********************************************************
   SD card offset, as a sector number (always 512 bytes).
   ********************************************************* -->
   <sdSectorStart>8391488</sdSectorStart>


   <!-- ********************************************************
   Drive geometry settings.
   ********************************************************* -->

   <scsiSectors>1331200</scsiSectors>
   <bytesPerSector>512</bytesPerSector>
   <sectorsPerTrack>63</sectorsPerTrack>
   <headsPerCylinder>255</headsPerCylinder>


   <!-- ********************************************************
   Drive identification information. The SCSI2SD doesn't
   care what these are set to. Use these strings to trick a OS
   thinking a specific hard drive model is attached.
   ********************************************************* -->

   <!-- 8 character vendor string -->
   <!-- For Apple HD SC Setup/Drive Setup, use ' SEAGATE' -->
   <vendor> codesrc</vendor>

   <!-- 16 character produce identifier -->
   <!-- For Apple HD SC Setup/Drive Setup, use '          ST225N' -->
   <prodId>         SCSI2SD</prodId>

   <!-- 4 character product revision number -->
   <!-- For Apple HD SC Setup/Drive Setup, use '1.0 ' -->
   <revision> 6.0</revision>

   <!-- 16 character serial number -->
   <serial>1234567812345678</serial>

   <!-- Custom mode pages, base64 encoded, up to 1024 bytes.-->
   <modePages>

   </modePages>

   <!-- Custom inquiry VPD pages, base64 encoded, up to 1024 bytes.-->
   <vpd>

   </vpd>
</SCSITarget>
</SCSI2SD>



STEP 2: WRITING INSTALL MEDIA

I used a Mac for the following steps. My SD card is 8gb.

Insert the SD card into your computer. Make sure it is FAT32 formatted.

Open Terminal and type:

Code:
 diskutil list


You should get a list of attached disks. Make note of which device is the SD card. For the sake of my example I'm going to list it as /dev/disk3.

In terminal type:

Code:
diskutil unmountDisk /dev/disk3


Now we need to transfer the install floppy disk image to the SD card where the SCSI2SD is going to look for the block allocation for SCSI ID 2, which is the Floppy Disk.

/installfloppy.img can be any path to where the disk image is. On a Mac you can just drag and drop that in.

The seek=8388608 command will write to the SD card where SCSI2SD expects to find data for SCSI ID 2. The number should match what scsi2sd-util lists for that device. (Please correct me if I'm wrong in my understanding of this.)

For your device if you use /dev/rdisk3 instead of /dev/disk3 it will write faster. That's what I was told and it worked.

Code:
sudo dd if=/installfloppy.img of=/dev/rdisk3 conv=notrunc seek=8388608 bs=512


On my Mac /dev/disk3 remounted after the floppy disk image was written. So we have to unmount it again.

Code:
diskutil unmountDisk /dev/disk3


Now we have to write the NeXTStep 3.3 ISO to where the SCSI2SD is going to look for the block allocation for SCSI ID 3, which is the CDROM.

The seek=8391488 command will write to the SD card where SCSI2SD expects to find data for SCSI ID 3. The number should match what scsi2sd-util lists for that device.

Code:
sudo dd if=/nextstep.iso of=/dev/rdisk3 conv=notrunc seek=8391488 bs=512


The SD card may automatically mount again. If you open it with Finder, it LOOKS like there is nothing written to the SD card. However...

Step 3: FIRE IT UP

I connected my SCSI2SD to the cube and fired it up.

In the monitor I had to set which SCSI device to boot to.

Code:
bsd(2,0,0)


It then started looking for an attached CDROM, which we fortunately have on SCSI ID 3.

NeXTStep 3.3 started installing! It asked to configure the SCSI ID 0 hard drive, which I proceeded to do.

After a few minutes NeXTStep finished installing. Upon booting for the first time it recognized the HD in SCSI ID 1 and asked to initialize it.

Surprised
Back to top
View user's profile Send private message Visit poster's website
wa2flq



Joined: 18 Dec 2008
Posts: 39
Location: Chicagoland

PostPosted: Wed Oct 17, 2018 3:26 pm    Post subject: Reply with quote

Nicely organized! Congratulations.

Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NeXT Computers Forum Index -> Black Hardware All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2017 phpBB Group