NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Knowledge > HowToFormatVxWorksSCSI (r1.1 vs. r1.5)
   Readme | Changes | Index | Search | Go
 <<O>>  Difference Topic HowToFormatVxWorksSCSI (r1.5 - 13 Sep 2007 - JoeBrandt)
Changed:
<
<

This command should return a non-zero pointer on success.

>
>

This command should return a non-zero pointer on success.

If That Doesn't Work

I have had mixed luck with the above procedure. However, I do have a 64MB sized partition image attached to this page. (See spareDsk.img.gz below.)

To initialize a disk on a Linux machine:

  • download the image from this page to a local file
  • uncompress the image using gunzip
  • The image should now be about 62MB, with an md5sum of:
    • 879502887a452c0896332f0020ea0b8d spareDsk.img
  • Write the image directly to the disk:
    • dd if=spareDsk.img of=/dev/sda bs=512 count=125184
  • Note that the disk will not be mountable on linux.

Note: This procedure is specific to our 5.3.1 kernel, and is not for general non-NRAO use. Also see caveats below.

Added:
>
>

%META:FILEATTACHMENT{name="spareDsk.img.gz" attr="" comment="A compressed image of a bootable SCSI disk" date="1189720094" path="spareDsk.img.gz" size="1850903" user="JoeBrandt" version="1.1"}%


 <<O>>  Difference Topic HowToFormatVxWorksSCSI (r1.4 - 04 Feb 2005 - JoeBrandt)
Changed:
<
<

On most SCSI kernels, there is a global variable pSbd0, check for it:

>
>

To format (i.e to re-write the filesystem, destroying the existing contents) run:

Changed:
<
<

-> pSbd0

>
>

-> dosFsMkfs("/sd0/", scsiPhysDevIdGet(0, 0, 0))

Changed:
<
<

_pSbd0 = 0xea648: value = 8199748 = 0x7d1e44

Good it is not null either. To format (i.e to re-write the filesystem, destroying the existing contents) run:

-> dosFsMkfs("/sd0/", pSbd0)

value = 8378768 = 0x7fd990

Note this should return a non-zero pointer on success.

>
>

This command should return a non-zero pointer on success.

Added:
>
>

Other Stuff

In order to support the use of hard disks, I've added a routine:

scsi_DelayedSpinDown(int delay_minutes)

Which can be called from a startup script. The routine will send a SCSI command after a delay to spin down the disk. Useful for the CCU, because it only needs the disk spining during booting.


 <<O>>  Difference Topic HowToFormatVxWorksSCSI (r1.3 - 03 Feb 2005 - JoeBrandt)
Added:
>
>

or for the hard disk (spare): ID LUN VendorID? ProductID? Rev. Type Blocks BlkSize? pScsiPhysDev -- --- -------- ---------------- ---- ---- -------- ------- ------------ 0 0 SEAGATE ST51080N 0958 0 2109840 512 0x003d1eb4


 <<O>>  Difference Topic HowToFormatVxWorksSCSI (r1.2 - 07 Jan 2005 - JoeBrandt)
Added:
>
>

Boot Configuration

The boot configuration magic should be:

boot device :scsi=0,00
processor number :0
host name :leeloo
file name :/sd0/vxWorks5.3
inet on ethernet (e) :172.24.1.20
host inet (h) :172.24.1.17
gateway inet (g) :172.24.1.17
user (u) :wriver
ftp password (pw) :*******
flags (f) :0xa2
target name (tn) :ccu
startup script :/sd0/loadccu.ini
other flags :ei

  • Note the ei in the 'other flags' field is important, otherwise the network will not be initialized.
  • The above information is for the CCU. For the SCU the address should be .21; and the startup script should be /sd0/loadscu.ini.

 <<O>>  Difference Topic HowToFormatVxWorksSCSI (r1.1 - 06 Jan 2005 - JoeBrandt)
Added:
>
>

%META:TOPICINFO{author="JoeBrandt" date="1105052400" format="1.0" version="1.1"}% %META:TOPICPARENT{name="MnCKnowledge"}%

Problem

How to initialize a VxWorks SCSI disk .

Solution

Using a SCSI-enabled VxWorks kernel, boot the system and run the command:

-> scsiShow

You should see something like:
ID LUN VendorID    ProductID     Rev. Type  Blocks  BlkSize pScsiPhysDev
-- --- -------- ---------------- ---- ---- -------- ------- ------------
 0  0  ADTRON   S35CF R14011_012 2b06   0   125184    512    0x007d1eb4

Then try:

-> scsiPhysDevIdGet(0, 0, 0)

and you should get a non-null pointer:

value = 8199860 = 0x7d1eb4

On most SCSI kernels, there is a global variable pSbd0, check for it:

-> pSbd0

_pSbd0 = 0xea648: value = 8199748 = 0x7d1e44

Good it is not null either. To format (i.e to re-write the filesystem, destroying the existing contents) run:

-> dosFsMkfs("/sd0/", pSbd0)

value = 8378768 = 0x7fd990

Note this should return a non-zero pointer on success.

Caveats

  • This will only work on the 64MB Adtron SCSI disks we have for the SCU/CCU because sysScsi.c and usrScsi.c have hard-coded partition information. (VxWorks does not bother with any stink'n partition tables!)
  • In order to boot from the disk, the name "/sd0/" must contain the trailing slash.
  • In order to boot from scsi disk, special scsi-enabled bootroms are required.
  • I have had trouble with the scsi termination on disk #2. Placing or removing the termination inhibit jumper (pin TD) seems to help.

-- JoeBrandt - 06 Jan 2005 %META:FORM{name="WebForm"}% %META:FIELD{name="TopicClassification" title="TopicClassification" value="NoDisclosure"}% %META:FIELD{name="OperatingSystem" title="OperatingSystem" value=""}% %META:FIELD{name="OsVersion" title="OsVersion" value=""}%


Topic HowToFormatVxWorksSCSI . { View | Diffs | r1.5 | > | r1.4 | > | r1.3 | More }
Revision r1.1 - 06 Jan 2005 - 23:00 GMT - JoeBrandt
Revision r1.5 - 13 Sep 2007 - 21:50 GMT - JoeBrandt
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.