Compaq DeskPro EP C400 - FreeBSD

Hardware info on main page.

This machine runs the i386 version of FreeBSD.

The first internal hard drive (ad0) only has one partition on it.

slice 1 - 152 GB - FreeBSD (currently FreeBSD 7.0-stable, from 2008)

I set this machine up with a SCSI card and a SCSI ZIP drive (ZIP 100), to recover data from zip media.

Newest addition is a tape drive, to read old QIC tapes in (if it still works).

links

BlueSCSI,

Work log

2021-06-14: ad0s1 - from FreeBSD 7.0, run a test of the SCSI disk

root@music1# diskinfo -t /dev/da0
/dev/da0
    512             # sectorsize
    31138513408     # mediasize in bytes (29G)
    60817409        # mediasize in sectors
    3785            # Cylinders according to firmware.
    255             # Heads according to firmware.
    63              # Sectors according to firmware.

Seek times:
    Full stroke:      250 iter in   9.249849 sec =   36.999 msec
    Half stroke:      250 iter in  41.331536 sec =  165.326 msec
    Quarter stroke:      500 iter in  73.127137 sec =  146.254 msec
    Short forward:      400 iter in   1.064591 sec =    2.661 msec
    Short backward:      400 iter in  67.059171 sec =  167.648 msec
    Seq outer:     2048 iter in   1.344046 sec =    0.656 msec
    Seq inner:     2048 iter in   1.451291 sec =    0.709 msec
Transfer rates:
    outside:       102400 kbytes in  94.947473 sec =     1078 kbytes/sec
    middle:        102400 kbytes in  94.950814 sec =     1078 kbytes/sec
    inside:        102400 kbytes in  94.949670 sec =     1078 kbytes/sec

ok

2021-06-14: Unfortunately, the SCSI controller in the machine isn't bootable, so I can't test booting from BlueSCSI and running FreeBSD from it.

2021-06-14: try to install on BlueSCSI disk again, this time with power from the Berg connector too. The install goes further, extract phase finished, root password set, then panics with ufs problem (bad directory block) after configuring network interface. Perhaps the microSD card is of bad quality? Tried another microSD card (SanDisk 32 GB) and now install finishes without problems. So yes, the first microSD card was bad quality.

2021-06-14: ad0s1 - from FreeBSD 7.0, run a test of the SCSI disk I/O overhead test

root@music1# diskinfo -c /dev/da0
/dev/da0
    512             # sectorsize
    31138513408     # mediasize in bytes (29G)
    60817409        # mediasize in sectors
    3785            # Cylinders according to firmware.
    255             # Heads according to firmware.
    63              # Sectors according to firmware.

I/O command overhead:
    time to read 10MB block      9.657435 sec    =    0.472 msec/sector
    time to read 20480 sectors  29.440821 sec    =    1.438 msec/sector
    calculated command overhead            =    0.966 msec/sector

'diskinfo -t' test

root@music1# diskinfo -t /dev/da0
/dev/da0
    512             # sectorsize
    31138513408     # mediasize in bytes (29G)
    60817409        # mediasize in sectors
    3785            # Cylinders according to firmware.
    255             # Heads according to firmware.
    63              # Sectors according to firmware.

Seek times:
    Full stroke:      250 iter in  10.843134 sec =   43.373 msec
    Half stroke:      250 iter in  42.316571 sec =  169.266 msec
    Quarter stroke:      500 iter in  74.938228 sec =  149.876 msec
    Short forward:      400 iter in   1.380188 sec =    3.450 msec
    Short backward:      400 iter in  68.703409 sec =  171.759 msec
    Seq outer:     2048 iter in   1.353584 sec =    0.661 msec
    Seq inner:     2048 iter in   1.464794 sec =    0.715 msec
Transfer rates:
    outside:       102400 kbytes in  96.451117 sec =     1062 kbytes/sec
    middle:        102400 kbytes in  96.448370 sec =     1062 kbytes/sec
    inside:        102400 kbytes in  96.457956 sec =     1062 kbytes/sec

ok

2021-06-14: (via Plop) FreeBSD 10.3-release i386 boots. Install on the (Blue)SCSI disk fails during the base extraxt phase. Power problem?

2021-06-13: (via Plop Boot Manager on a CD) trying to boot FreeBSD 13.0-releease i386 install from a usb stick, unfortunately it stops while loading the kernel. Not enough memory? Trying FreeBSD 12.2-release i386 - stops in the same way. Tested other i386 FreeBSD: 11.4-release,

2021-05-30: ad0s1 - I connected a BlueSCSI to the SCSI controller card in the machine

root@music1# camcontrol devlist -v
scbus0 on ahc0 bus 0:
<QUANTUM FIREBALL1 1.0>            at scbus0 target 0 lun 0 (pass0,da0)
<QUANTUM FIREBALL1 1.0>            at scbus0 target 3 lun 0 (pass1,da1)
<  >                               at scbus0 target -1 lun -1 ()
scbus-1 on xpt0 bus 0:
<  >                               at scbus-1 target -1 lun -1 (xpt0)

root@music1# dmesg | grep da[01]
da0 at ahc0 bus 0 target 0 lun 0
da0: <QUANTUM FIREBALL1 1.0> Fixed Direct Access SCSI-CCS device
da0: 3.300MB/s transfers
da0: 126MB (129313 1024 byte sectors: 64H 32S/T 63C)
da1 at ahc0 bus 0 target 3 lun 0
da1: <QUANTUM FIREBALL1 1.0> Fixed Direct Access SCSI-CCS device
da1: 3.300MB/s transfers
da1: 100MB (204801 512 byte sectors: 64H 32S/T 100C)

root@music1# camcontrol tur da0
Unit is ready
root@music1# camcontrol tur da1
Unit is ready

root@music1# camcontrol inquiry da0
pass0: <QUANTUM FIREBALL1 1.0> Fixed Direct Access SCSI-CCS device
pass0: Serial Number
pass0: 3.300MB/s transfers
root@music1# camcontrol inquiry da1
pass1: <QUANTUM FIREBALL1 1.0> Fixed Direct Access SCSI-CCS device
pass1: Serial Number
pass1: 3.300MB/s transfers

nice

2021-05-30: ad0s1 - powered up the machine, it still works, and still runs FreeBSD 7.0-stable.

root@music1# uname -a
FreeBSD music1.kg4.no 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Aug 15 12:56:35 CEST 2008     root@music1.kg4.no:/usr/obj/usr/src/sys/GENERIC  i386

ok

2016-09-07: ad0s1a - write a known good image to the drive. First clear about 200 meg of the drive:

root@music1# dd if=/dev/zero of=/dev/da0 bs=1M count=200
200+0 records in
200+0 records out
209715200 bytes transferred in 65.793001 secs (3187500 bytes/sec)

Next, write the image

root@music1# dd if=/home/tingo/work/ND110-satellite-9883-21251-132MB.raw of=/dev/da0 bs=1M
126+1 records in
126+1 records out
132415488 bytes transferred in 48.066947 secs (2754814 bytes/sec)

verify with ndfs

root@music1# ndfs -i /dev/da0
Directory name            : PACK-ONE
Object file index pointer : 30716 SI: 0x1 (indexed)
User file index pointer   : 30718 SI: 0x1 (indexed)
Bit file pointer          : 30510 SI: 0x0 (contiguous)
No. of unreserved pages   : 616
Directory size: 60817 pages
Bit file size : 4 pages

looks good.

2016-09-07: ad0s1a - run ndfs on the image:

tingo@music1$ ndfs -V
ndfs: Sintran Filesystem tool version 1.2
tingo@music1$ ndfs -i work/sintran_iii_m05_st31200n.image
Directory name            : llllllllllllllll
Object file index pointer : 745303148 SI: 0x1 (indexed)
User file index pointer   : 745303148 SI: 0x1 (indexed)
Bit file pointer          : 745303148 SI: 0x1 (indexed)
No. of unreserved pages   : 1819044972
Error reading page 745303148: Unknown error: 0
tingo@music1$ ndfs -t work/sintran_iii_m05_st31200n.image
Directory name            : llllllllllllllll
Object file index pointer : 745303148 SI: 0x1 (indexed)
User file index pointer   : 745303148 SI: 0x1 (indexed)
Bit file pointer          : 745303148 SI: 0x1 (indexed)
No. of unreserved pages   : 1819044972
Error reading page 745303148: Unknown error: 0

ndfs is not happy with this image. The image sintran_iii_m05_st31200n.image (.gz) is available.

2016-09-07: ad0s1a - image the ST31200N drive (changed to 1024 byte block size) after I installed SINTRAN III M05 on it.

root@music1# dd if=/dev/da0 of=/home/tingo/work/sintran_iii_m05_st31200n.image bs=4M
262+1 records in
262+1 records out
1100381184 bytes transferred in 363.088677 secs (3030613 bytes/sec)

ok. Oh, and here is info from dmesg:

root@music1# dmesg | grep da0
da0 at ahc0 bus 0 target 0 lun 0
da0: <SEAGATE ST31200N 8008> Fixed Direct Access SCSI-2 device
da0: 10.000MB/s transfers (10.000MHz, offset 15)
da0: Command Queueing Enabled
da0: 1049MB (1074591 1024 byte sectors: 255H 63S/T 66C)

sg_format

root@music1# sg_format /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=1024 [0x400]
Read Capacity (10) results:
   Number of blocks=1074591
   Block size=1024 bytes
No changes made. To format use '--format'. To resize use '--resize'

sg_readcap

root@music1# sg_readcap /dev/da0
Read Capacity results:
   Last logical block address=1074590 (0x10659e), Number of blocks=1074591
   Logical block length=1024 bytes
Hence:
   Device size: 1100381184 bytes, 1049.4 MiB, 1.10 GB

just to be complete.

2016-09-04: ad0s1a - various info from inquiry: standard:

root@music1# sg_inq /dev/da0
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  version=0x02  [SCSI-2]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=0  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  BQue=0
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=1  Linked=0  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=148 (0x94)   Peripheral device type: disk
 Vendor identification: SEAGATE
 Product identification: ST31200N       
 Product revision level: 8008
 Unit serial number: 00695725
-d (descriptors)
root@music1# sg_inq -d /dev/da0
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  version=0x02  [SCSI-2]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=0  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  BQue=0
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=1  Linked=0  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=148 (0x94)   Peripheral device type: disk
 Vendor identification: SEAGATE
 Product identification: ST31200N       
 Product revision level: 8008
 Unit serial number: 00695725

  No version descriptors available

none. vpd:

root@music1# sg_inq -e /dev/da0
VPD INQUIRY, page code=0x00:
   [PQual=0  Peripheral device type: disk]
   Supported VPD pages:
     0x0    Supported VPD pages
     0x80    Unit serial number
     0x81    Implemented operating definitions (obsolete)
     0xc0    vendor: Firmware numbers (seagate); Unit path report (EMC)
     0xc1    vendor: Date code (seagate)
     0xc2    vendor: Jumper settings (seagate); Software version (RDAC)

ok, can I use a hex page number?

root@music1# sg_inq -e --page=0x80 /dev/da0
VPD INQUIRY: Unit serial number page
  Unit serial number: 00695725

yes, that works. Now try the rest:

root@music1# sg_inq -e --page=0x81 /dev/da0
 Only hex output supported
VPD INQUIRY, page code=0x81:
 00     00 81 00 04 03 83 81 83                             ........       
root@music1# sg_inq -e --page=0xc0 /dev/da0
VPD INQUIRY: Unit Path Report Page (EMC)
Unsupported page revision 48, decoding not possible.
root@music1# sg_inq -e --page=0xc1 /dev/da0
 Only hex output supported
VPD INQUIRY, page code=0xc1:
 00     00 c1 00 03 04 16 94                                .......        
root@music1# sg_inq -e --page=0xc2 /dev/da0
VPD INQUIRY: Software Version (RDAC)
Invalid page identifier ..œ., decoding not possible.

ok.

2016-09-04: ad0s1a - try a poweroff as well. After power off / on, the problem remains:

root@music1# sg_readcap -v /dev/da0
    read capacity (10) cdb: 25 00 00 00 00 00 00 00 00 00
read capacity (10):  Fixed format, current;  Sense key: Medium Error
 Additional sense: Medium format corrupted
  Field replaceable unit code: 1
root@music1# sg_format /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=512 [0x200]
No changes made. To format use '--format'. To resize use '--resize'

Hmm, try a format with --count=-1?

root@music1# sg_format -v --format --count=-1 /dev/da0
    inquiry cdb: 12 00 00 00 24 00
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
      PROTECT=0
    mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
    mode sense (10): requested 252 bytes but got 28 bytes
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=512 [0x200]
    mode select (10) cdb: 55 11 00 00 00 00 00 00 1c 00

A FORMAT will commence in 10 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
A FORMAT will commence in 5 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
    format cdb: 04 18 00 00 00 00
format unit:  Fixed format, current;  Sense key: Illegal Request
 Additional sense: Invalid field in parameter list
  Field replaceable unit code: 4
  Sense Key Specific: Error in Data byte 1 bit 1
Format command, illegal parameter
FORMAT failed

didn't work.

2016-09-04: ad0s1a - I rebooted the machine. after a reboot, I get this in dmesg:

da0 at ahc0 bus 0 target 0 lun 0
da0: <SEAGATE ST31200N 8008> Fixed Direct Access SCSI-2 device
da0: 10.000MB/s transfers (10.000MHz, offset 15)
da0: Command Queueing Enabled
da0: Attempt to query device size failed: MEDIUM ERROR, Medium format corrupted
(da0:ahc0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da0:ahc0:0:0:0): CAM Status: SCSI Status Error
(da0:ahc0:0:0:0): SCSI Status: Check Condition
(da0:ahc0:0:0:0): MEDIUM ERROR asc:31,0
(da0:ahc0:0:0:0): Medium format corrupted field replaceable unit: 1
(da0:ahc0:0:0:0): Retrying Command (per Sense Data)

uh oh, have I broken my drive now?

root@music1# sg_readcap /dev/da0
READ CAPACITY (10) failed [res=-1], try with '-v'
root@music1# sg_readcap -v /dev/da0
    read capacity (10) cdb: 25 00 00 00 00 00 00 00 00 00
read capacity (10):  Fixed format, current;  Sense key: Medium Error
 Additional sense: Medium format corrupted
  Field replaceable unit code: 1

sg_readcap doesn't want to talk to it.

root@music1# sg_format /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=512 [0x200]
No changes made. To format use '--format'. To resize use '--resize'

zero blocks? That can't be good. Try to resize

root@music1# sg_format --resize --count=-1 /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=512 [0x200]
Resize operation seems to have been successful

check with format

root@music1# sg_format /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=512 [0x200]
No changes made. To format use '--format'. To resize use '--resize'

and readcap

root@music1# sg_readcap -v /dev/da0
    read capacity (10) cdb: 25 00 00 00 00 00 00 00 00 00
read capacity (10):  Fixed format, current;  Sense key: Medium Error
 Additional sense: Medium format corrupted
  Field replaceable unit code: 1

nope, still broken.

2016-09-04: ad0s1a - try to reformat a Seagate ST31200N drive. First see what FreeBSD thinks about the drive:

root@music1# dmesg | grep da0
da0 at ahc0 bus 0 target 0 lun 0
da0: <SEAGATE ST31200N 8008> Fixed Direct Access SCSI-2 device
da0: 10.000MB/s transfers (10.000MHz, offset 15)
da0: Command Queueing Enabled
da0: 1006MB (2061108 512 byte sectors: 64H 32S/T 1006C)
root@music1# camcontrol devlist
<SEAGATE ST31200N 8008>            at scbus0 target 0 lun 0 (pass0,da0)

does sg_readcap work?

root@music1# sg_readcap /dev/da0
Read Capacity results:
   Last logical block address=2061107 (0x1f7333), Number of blocks=2061108
   Logical block length=512 bytes
Hence:
   Device size: 1055287296 bytes, 1006.4 MiB, 1.06 GB

it does. What about sg_format?

root@music1# sg_format /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=512 [0x200]
Read Capacity (10) results:
   Number of blocks=2061108
   Block size=512 bytes
No changes made. To format use '--format'. To resize use '--resize'

ok. Try a format:

root@music1# sg_format --format --size=1024 /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=512 [0x200]

A FORMAT will commence in 10 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
A FORMAT will commence in 5 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
Format command, illegal parameter
FORMAT failed
    try '-v' for more information

didn't work. Try with -v:

root@music1# sg_format -v --format --size=1024 /dev/da0
    inquiry cdb: 12 00 00 00 24 00
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
      PROTECT=0
    mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
    mode sense (10): requested 252 bytes but got 28 bytes
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=1024 [0x400]

A FORMAT will commence in 10 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
A FORMAT will commence in 5 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
    format cdb: 04 18 00 00 00 00
format unit:  Fixed format, current;  Sense key: Illegal Request
 Additional sense: Invalid field in parameter list
  Field replaceable unit code: 4
  Sense Key Specific: Error in Data byte 1 bit 1
Format command, illegal parameter
FORMAT failed

Hmm, what? try with -vvv

root@music1# sg_format -vvv --format --size=1024 /dev/da0
    inquiry cdb: 12 00 00 00 24 00
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
      PROTECT=0
    mode sense (10) cdb: 5a 00 01 00 00 00 00 00 fc 00
    mode sense (10): requested 252 bytes but got 28 bytes
    mode sense (10): response
        00 1a 00 00 00 00 00 08  00 00 00 00 00 00 04 00   
        81 0a 00 21 30 00 00 00  16 00 ff ff               
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=1024 [0x400]

A FORMAT will commence in 10 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
A FORMAT will commence in 5 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
    format cdb: 04 18 00 00 00 00
    format parameter list:
        00 02 00 00                                        
format unit:  Fixed format, current;  Sense key: Illegal Request
 Additional sense: Invalid field in parameter list
  Field replaceable unit code: 4
  Sense Key Specific: Error in Data byte 1 bit 1
 Raw sense data (in hex):
        70 00 05 00 00 00 00 0a  00 00 00 00 26 00 04 89   
        00 01                                              
Format command, illegal parameter
FORMAT failed

nope.

root@music1# sg_format /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=1024 [0x400]
No changes made. To format use '--format'. To resize use '--resize'

it still reports 1024 though. What happens if I try a simple format?

root@music1# sg_format --format /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=1024 [0x400]

A FORMAT will commence in 10 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
A FORMAT will commence in 5 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
Format command, illegal parameter
FORMAT failed
    try '-v' for more information

no. Can I format it to 512 byte sectors?

root@music1# sg_format --format --size=512 /dev/da0
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=1024 [0x400]

A FORMAT will commence in 10 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
A FORMAT will commence in 5 seconds
    ALL data on /dev/da0 will be DESTROYED
        Press control-C to abort
Format command, illegal parameter
FORMAT failed
    try '-v' for more information

no.

2016-09-04: ad0s1a - check if we have sg3_utils in ports:

root@music1# pinfo sg3
Port:    sg3_utils-1.25
Path:    /usr/ports/sysutils/sg3_utils
Info:    Set of utilities that send SCSI commands to devices
Maint:    dindin@dindin.ru
B-deps:    gettext-0.17_1 gmake-3.81_3 libiconv-1.11_1
R-deps:   
WWW:    http://sg.torque.net/sg/sg3_utils.html

aye - install it:

root@music1# portinstall -R sg3_utils
[...]
===>   Compressing manual pages for sg3_utils-1.25
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>   Registering installation for sg3_utils-1.25
===>  Cleaning for sg3_utils-1.25

ok. Now I have all the sg_ commands available:

root@music1# l /usr/local/bin/sg*
/usr/local/bin/sg_format*           /usr/local/bin/sg_rdac*             /usr/local/bin/sg_senddiag*
/usr/local/bin/sg_get_config*       /usr/local/bin/sg_read_buffer*      /usr/local/bin/sg_ses*
/usr/local/bin/sg_ident*            /usr/local/bin/sg_read_long*        /usr/local/bin/sg_start*
/usr/local/bin/sg_inq*              /usr/local/bin/sg_readcap*          /usr/local/bin/sg_stpg*
/usr/local/bin/sg_logs*             /usr/local/bin/sg_reassign*         /usr/local/bin/sg_sync*
/usr/local/bin/sg_luns*             /usr/local/bin/sg_requests*         /usr/local/bin/sg_turs*
/usr/local/bin/sg_modes*            /usr/local/bin/sg_rmsn*             /usr/local/bin/sg_verify*
/usr/local/bin/sg_opcodes*          /usr/local/bin/sg_rtpg*             /usr/local/bin/sg_vpd*
/usr/local/bin/sg_persist*          /usr/local/bin/sg_safte*            /usr/local/bin/sg_wr_mode*
/usr/local/bin/sg_prevent*          /usr/local/bin/sg_sat_identify*     /usr/local/bin/sg_write_buffer*
/usr/local/bin/sg_raw*              /usr/local/bin/sg_sat_set_features* /usr/local/bin/sg_write_long*

nice.

2016-09-04: ad0s1a - The machine is still running FreeBSD 7.0-stable from 2008:

root@music1# uname -a
FreeBSD music1.kg4.no 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Aug 15 12:56:35 CEST 2008     root@music1.kg4.no:/usr/obj/usr/src/sys/GENERIC  i386

ok.

2016-07-17: ad0s1a - going to try another drive, with another image. The image is about 132 MB in size:

root@music1# ll -h /home/tingo/work/*raw
-rw-r--r--  1 tingo  users   126M Jul 17 00:42 /home/tingo/work/ND110-satellite-9883-21251-132MB.raw

the drive in question is this:

root@music1# camcontrol devlist
<SEAGATE ST31200N 8008>            at scbus0 target 0 lun 0 (pass0,da0)

it is set for SCSI id 0 (good). This is a larger drive (about 1 GB) but I'm going to use it anyway. First, clear (zero out) about 200 megs on it:

root@music1# dd if=/dev/zero of=/dev/da0 bs=1M count=200
200+0 records in
200+0 records out
209715200 bytes transferred in 68.198596 secs (3075066 bytes/sec)

next, copy the image to the drive:

root@music1# dd if=/home/tingo/work/ND110-satellite-9883-21251-132MB.raw of=/dev/da0 bs=1M
126+1 records in
126+1 records out
132415488 bytes transferred in 49.011413 secs (2701728 bytes/sec)

verify with ndfs:

root@music1# ndfs -i /dev/da0
Directory name            : PACK-ONE
Object file index pointer : 30716 SI: 0x1 (indexed)
User file index pointer   : 30718 SI: 0x1 (indexed)
Bit file pointer          : 30510 SI: 0x0 (contiguous)
No. of unreserved pages   : 616
Directory size: 60817 pages
Bit file size : 4 pages

looks good.

2016-07-16: ad0s1a - I try to compile ndfs-tool:

tingo@music1$ cd work
tingo@music1$ tar xvf ndfs-tool-1.1.tar.gz
x ndfs-tool/
x ndfs-tool/ndfs.c
x ndfs-tool/Makefile.ndfs
x ndfs-tool/gpl.txt
tingo@music1$ cd ndfs-tool
tingo@music1$ gmake -f Makefile.ndfs
cc  -o ndfs ndfs.o

try it

tingo@music1$ ./ndfs -V
ndfs: Sintran Filesystem tool version 1.1
tingo@music1$ ./ndfs -h
Usage: ./ndfs [-t | -x [-d] | other options] <Sintran filesystem image>
Options:
-h    Print this help and exit
-i    Info mode: Show more info from directory entry
-t    List files in image
-u    List user entries (-v also sets this)
-x    Extract files from image
-d    If used with -x, also extract directories
-l    Convert names to lower case letters
    (This also changes ':' to '.' for extracted files)
-c    Ignore bytepointer for contiguous files
-v    Verbose output when extracting files
-V    Show version number and exit

it works.

2016-07-16: ad0s1a - I connected up the Quantum drive that I have installed SINTRAN III M-release (M05) on, I will attempt to image it. First a bit of checking:

root@music1# disktype /dev/da0

--- /dev/da0
Character device, unknown size
disktype doesn't know it.
root@music1# l /dev/da0*
/dev/da0

and it is only da0. Ok, image it:

root@music1# dd if=/dev/da0 of=/home/tingo/work/sintran_iii_m05_q_lps540.image bs=2048
264404+0 records in
264404+0 records out
541499392 bytes transferred in 409.213307 secs (1323269 bytes/sec)

abot 6 min 49 secs. size:

root@music1# ll -h /home/tingo/work/sintran_iii_m05_q_lps540.image
-rw-r--r--  1 root  users   516M Jul 16 23:15 /home/tingo/work/sintran_iii_m05_q_lps540.image

516 MB (probably with lots of unused space).ok.

2011-11-20: tape drive - testing the tape drive. The devices are there:

root@music1# ls /dev/*sa*
/dev/esa0    /dev/esa0.2    /dev/nsa0.0    /dev/nsa0.3    /dev/sa0.1    /dev/sa0.ctl
/dev/esa0.0    /dev/esa0.3    /dev/nsa0.1    /dev/sa0    /dev/sa0.2
/dev/esa0.1    /dev/nsa0    /dev/nsa0.2    /dev/sa0.0    /dev/sa0.3

and a quick test with tar on a random tape proves that it reads something from the tape:

root@music1# tar tvf /dev/sa0
drwxrwxrwx  0 19024  19024       0 Sep 15  1994 ./
drwxrwxrwx  0 19024  19024       0 Apr  7  1995 ./in.coming/
drwxr-xr-x  0 19024  19024       0 Feb 13  1995 ./in.coming/bad/
-rw-rw-r--  0 19024  19024   58199 Apr  7  1995 ./in.coming/1345478880.Z
-rw-rw-r--  0 19024  19024   18370 Apr  7  1995 ./in.coming/1345478900.Z
drwxrwxr-x  0 19024  19024       0 Feb 14  1994 ./out.going/
drwxr-xr-x  0 19024  19024       0 Feb 14  1994 ./out.going/hfkix/
drwxrwxr-x  0 19024  19024       0 Feb 26  1995 ./general/
drwxrwxr-x  0 19024  19024       0 Feb  2  1994 ./news/
drwxrwxr-x  0 19024  19024       0 Feb  2  1994 ./news/announce/
drwxrwxr-x  0 19024  19024       0 Apr  7  1995 ./news/announce/newusers/
-rw-rw-r--  0 0      19024   22321 Mar 31  1995 ./news/announce/newusers/740
-rw-rw-r--  0 0      19024   12567 Mar 31  1995 ./news/announce/newusers/741
even if it ended like this:
-rw-rw-r--  0 0      19024   23049 Mar 28  1995 ./news/answers/26205
-rw-rw-r--  0 0      19024   53337 Mar 28  1995 ./news/answers/26195
tar: Truncated input file (need to skip 27648 bytes)
tar: Error exit delayed from previous errors.

Looks like camcontrol eject doesn't work (I can' t remember if it worked on this drive at all):

root@music1# camcontrol eject sa0
Error received from stop unit command

but manual eject (simply push on the tape) works. For a working tape, the light on the drive stays on. If the light turns off, the drive is busy (and the tape might me broken). For a good tape (the one marked "Kildekode" in this case), you get this:

root@music1# camcontrol tur sa0
Unit is ready
root@music1# camcontrol readcap sa0
Last Block: 86507584, Block Length: 136871937 bytes

Doing a retension on the tape works:

root@music1# mt -f /dev/sa0 retension
root@music1#

Other mt commands also works:

root@music1# mt -f /dev/sa0 status
Mode      Density              Blocksize      bpi      Compression
Current:  0x10:QIC-150         512 bytes      10000    unsupported
---------available modes---------
0:        0x10:QIC-150         512 bytes      10000    unsupported
1:        0x10:QIC-150         512 bytes      10000    unsupported
2:        0x10:QIC-150         512 bytes      10000    unsupported
3:        0x10:QIC-150         512 bytes      10000    unsupported
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0    Record Number: 0    Residual Count 0
root@music1# mt -f /dev/sa0 errstat
Last I/O Residual: 0
 Last I/O Command: 08 01 00 00 14 00 00 00 00 00 00 00 00 00 00 00
   Last I/O Sense:

     F0 00 08 00 00 00 05 28 04 20 00 01 00 00 21 00
     33 10 11 00 74 C9 01 80 60 09 0C 00 4A 08 08 08

Last Control Residual: 0
 Last Control Command: 08 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00
   Last Control Sense:

     70 00 05 00 00 00 00 28 00 08 00 00 00 00 21 00
     33 10 11 00 00 00 00 80 60 19 08 00 00 12 12 03

That's it.

2011-11-20: various other info:

root@music1# uname -a
FreeBSD music1.kg4.no 7.0-STABLE FreeBSD 7.0-STABLE #0: Fri Aug 15 12:56:35 CEST 2008     root@music1.kg4.no:/usr/obj/usr/src/sys/GENERIC  i386
root@music1# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a    496M    249M    207M    55%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad0s1e    496M     78K    456M     0%    /tmp
/dev/ad0s1f    140G    2.6G    126G     2%    /usr
/dev/ad0s1d    1.3G     60M    1.1G     5%    /var

2011-11-20: I booted up this old machine again, after adding a tape drive to it (see main page). Relevant dmesg output for tape drive:

sa0 at ahc0 bus 0 target 3 lun 0
sa0: <WANGTEK 5150ES SCSI FA03 08> Removable Sequential Access SCSI-CCS device
sa0: 3.300MB/s transfers

and the zip drive:

da0 at ahc0 bus 0 target 5 lun 0
da0: <IOMEGA ZIP 100 E.08> Removable Direct Access SCSI-2 device
da0: 3.300MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present

output from camcontrol:

root@music1# camcontrol devlist -v
scbus0 on ahc0 bus 0:
<WANGTEK 5150ES SCSI FA03 08>      at scbus0 target 3 lun 0 (pass0,sa0)
<IOMEGA ZIP 100 E.08>              at scbus0 target 5 lun 0 (pass1,da0)
<  >                               at scbus0 target -1 lun -1 ()
scbus-1 on xpt0 bus 0:
<  >                               at scbus-1 target -1 lun -1 (xpt0)

That's it.

2008-08-16: smbus(4) is supported via the intpm(4) driver. From /var/log/messages:

Aug 16 19:13:14 music1 kernel: intsmb0: <Intel PIIX4 SMBUS Interface> port 0xfc00-0xfc0f at device 20.3 on pci0
Aug 16 19:13:14 music1 kernel: intsmb0: intr IRQ 9 enabled revision 0
Aug 16 19:13:14 music1 kernel: intsmb0: [GIANT-LOCKED]
Aug 16 19:13:14 music1 kernel: intsmb0: [ITHREAD]
Aug 16 19:13:14 music1 kernel: intsmb0: PM I/O mapped f800
Aug 16 19:13:14 music1 kernel: smbus0: <System Management Bus> on intsmb0

2008-08-15: I tried to mount a zip disk that was write protected without the '-r' flag (I didn't know that the zip disk was write protected). I got this in /var/log/messages:

Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): WRITE(06). CDB: a 0 0 21 8 0
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): CAM Status: SCSI Status Error
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): SCSI Status: Check Condition
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): DATA PROTECT asc:27,0
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): Write protected
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): Unretryable error
Aug 15 20:14:33 music1 kernel: g_vfs_done():da0s4[WRITE(offset=512, length=4096)]error = 13
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): WRITE(06). CDB: a 0 0 21 8 0
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): CAM Status: SCSI Status Error
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): SCSI Status: Check Condition
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): DATA PROTECT asc:27,0
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): Write protected
Aug 15 20:14:33 music1 kernel: (da0:ahc0:0:5:0): Unretryable error
Aug 15 20:14:33 music1 kernel: g_vfs_done():da0s4[WRITE(offset=512, length=4096)]error = 13
Aug 15 20:14:33 music1 kernel: fsync: giving up on dirty
Aug 15 20:14:33 music1 kernel: 0xc2988114: tag devfs, type VCHR
Aug 15 20:14:33 music1 kernel: usecount 1, writecount 0, refcount 27 mountedhere 0xc2617700
Aug 15 20:14:33 music1 kernel: flags ()
Aug 15 20:14:33 music1 kernel: v_object 0xc299707c ref 0 pages 25
Aug 15 20:14:33 music1 kernel:
Aug 15 20:14:33 music1 kernel: dev da0s4
Aug 15 20:14:34 music1 kernel: GEOM_LABEL: Label for provider da0s4 is msdosfs/DIPLOM.

and a few seconds later the machine got a page fault and panicked.

2008-08-15: use of zip disks under FreeBSD. I had to boot the machine with a zip disk in the drive (as described in this ZIP-FAQ) in order to get /dev/da0s4. If I boot without a zip disk, I only get /dev/da0. To use a zip disk:

    (physically) insert a zip disk in the drive
    camcontrol load da0
    camcontrol tur da0 (repeat until you get "unit ready")
    mount -r -t msdosfs /dev/da0s4 /mnt (leave out the '-r' if you want write)

After you are finished with the disk, perform these steps:

    umount /mnt
    camcontrol eject da0 (the disk will now be ejected)

2008-08-15: upgraded to latest FreeBSD 7.0-stable. Compiling world takes forver on this machine, but no problems. dmesg output: normal, verbose.

2008-08-14: installed FreeBSD 7.0-release (i386)on the machine (I selected the minimal install option). dmesg output: normal. The AVA-2904scsi card is detected like this in dmesg output:

ahc0: <Adaptec 2902/04/10/15/20C/30C SCSI adapter> port 0x1400-0x14ff mem 0x5c100000-0x5c100fff irq 10 at device 15.0 on pci0
ahc0: Host Adapter Bios disabled. Using default SCSI device parameters
ahc0: [ITHREAD]
aic7850: Single Channel A, SCSI Id=7, 3/253 SCBs

and 'pciconf lv' shows:

root@music1# pciconf -lv | grep -A 4 ahc0
ahc0@pci0:0:15:0: class=0x010000 card=0x78509004 chip=0x50789004 rev=0x03 hdr=0x00
vendor = 'Adaptec Inc'
device = 'AVA-2902I/E,AVA-2904,AVA-2910 (AIC-7850P) Fast/Wide SCSI II'
class = mass storage
subclass = SCSI

The zip drive is detected ike this in dmesg output:

root@music1# dmesg | grep da0
da0 at ahc0 bus 0 target 5 lun 0
da0: <IOMEGA ZIP 100 E.08> Removable Direct Access SCSI-2 device
da0: 3.300MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
and camcontrol lists it like this:
root@music1# camcontrol devlist -v
scbus0 on ahc0 bus 0:
<IOMEGA ZIP 100 E.08> at scbus0 target 5 lun 0 (pass0,da0)
< > at scbus0 target -1 lun -1 ()
scbus-1 on xpt0 bus 0:
< > at scbus-1 target -1 lun -1 (xpt0)