Problem
I want to add a USB hard disk to SCO OpenServer 5.0.7.
How do I do this? Solution
USB pen hard drives are small devices most of which have a generic SCSI hard disk emulation.
These pens are not certified under SCO OpenServer 5.0.x.
SCO OpenServer5 only supports the UHCI interface.
Some HP (Compaq) machines use the OHCI interface, and are therefore not supported.
The following steps detail how to install the device under 5.0.7 only.
When I plugged in the USB pen drive, the following messages were reported to the /var/adm/messages file;
Sept 25 13.05:45 servername %Sdsk-add - - - type=S ha=0 id=0 lun=0 bus=0 ht=usb_msto unit=0
or use the "usbprobe" command.To add a hard disk, run `mkdev hd` and select "4) Add a hard disk to a USB controller".Select "0" as the USB Device ID. Select "0" as the LUN.
When asked "Update USB configuration?", select "yes".
You may be asked to relink your kernel and reboot, which you should do as required. You will also be prompted to invoke "mkdev hd" after the server reboots to continue with hard disk initialization.
After the server has rebooted run "mkdev hd" again, selecting 4) Add a hard disk to a USB controller as before. USB Device ID and LUN are still both "0".
You will now see a message warning you that "during installation you may choose to overwrite all or part of the present contents of your hard disk. Do you wish to continue?" - Yes
You will then be taken into the fdisk program where you should select "2. Use entire disk for UNIX".
You will be warned that all data on your disk will be lost, and do you want to continue? - Yes.
Any existing partitions will be deleted automatically, and new active UNIX partition created.
Select "q"uit to leave fdisk.You will then be prompted to check for bad blocks on the disk. Usually you would select "q"uit to continue.
Press return to accept the suggested bad black space allocation.
Press return to get the default creation of one filesystem for the entire hard disk.
Make any manual adjustments to the filesystem as necessary, after which the filesystem will be created on the new hard disk.
This filesystem can be mounted using the mount command i.e. "mount /dev/filesystem_name /mnt".
It can be automounted by running "mkdev fs".
Worked Example:
--------------
Mounting a USB Stick Pen for DOS access:Hardware: SCO OpenServer 5.0.7 with 2 IDE drives in it. /dev/hd0* & hd1*.
SanDisk micro cruzer 512MB (packaged)Opened the SanDisk package and plugged it into USB port.
Ran "mkdev hd"- At controller menu selected option 4 USB - USB device ID, used 0 - Asks for LUN, used default 0
Created device nodes and "divvy" aborted./dev/hd2* created as well as /dev/dsk/2* and /dev/rdsk/2*Ran "fdisk -f /dev/rdsk/2s0"- At menu select 1 to display partition table
DISPLAY's:Partition Status Type Start End Size
4 Inactive DOS (32) 7 30964 30958I'm after the partition number which is 4.
- enter q to quit "fdisk"# fstyp /dev/hd24
DOS# mount /dev/hd24 /mntSystem mounts USB no errors no problems.
# ls /mntI get listing of files on the USB SanDisk.
# cp /etc/inittab to /mnt# umount /mntRemoved SanDisk USB Pen from 507 server and put on XP system and can access all files..
TROUBLESHOOTING:
---------------
- If you do not see an Sdsk entry or are getting the error below:The hard disk installation program will now invoke /etc/fdisk. Entering 'q' at the following menu will exit /etc/fdisk, and the hard disk installation will continue.
If you wish to exit the entire installation at this menu, press the <DEL> key.
/etc/fdisk: cannot open /dev/rdsk/1s0 for reading: No such device or address (error 6) /etc/fdisk failed.
then it's likely that SCO OpenServer 5.0.7 does not support your USB drive or controller
Check also that USB drive is also supported (USB v1.0 or v2.0) on your hardware platform.
- Some USB stick pens will show the fdisk correctly, as above, but the disk cannot be mounted still.
Any USB pen drive formatted on XP in FAT16/FAT32 does not get mounted on 507.
It gives the error:# mount /dev/dsk/1s1 /mntmount: /dev/dsk/1s1 not a valid file system or not type DOS: Invalid argument (error 22)Even though:# fstyp /dev/dsk/1s1
DOSThis is due to the fact that XP's FAT16 is actually FAT16 extended.
A work-around would be to use the UnixWare7 'dosformat' which will correctly format the USB stick pen for use as a DOS device under SCO OpenServer 5.0.7.
or download a fix for OpenServer 5.0.7 called "dos4mat" from:
ftp://ftpput.sco.com/tmp/support/fixes/507/dos4mat/dos4mat# chmod 700 dos4mat# ./dos4mat /dev/dsk/1s0
Insert new diskette for /dev/dsk/1s0
and press <RETURN> when readyFurther issues are detailed in:ftp://ftpput.sco.com/tmp/support/fixes/507/dos4mat/Readme_dos4mat.txtPlease note: A USB Floppy should be accessible with "/dev/rfd1" or "dosdir b:".NOTE: The limited USB stack in 5.0.6 may allow the above to work but
this platform is no longer supported and it is recommended to
upgrade to either the latest OpenServer5 or OpenServer6 version.Previous versions of OpenServer5 have no USB support.
See also
TA125441, "How to install a USB Pen Drive Hard Disk on SCO Unix?"