2022-12-05 17:58:23 +00:00
|
|
|
|
!! ------ THIS FILE IS AUTO_GENERATED! DO NOT MANUALLY UPDATE!!!
|
2023-10-15 06:38:15 +00:00
|
|
|
|
!! ------ The native file is piscsi.1. Re-run 'make docs' after updating\n\n
|
|
|
|
|
piscsi(1) General Commands Manual piscsi(1)
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
NAME
|
|
|
|
|
piscsi - Emulates SCSI devices using the Raspberry Pi GPIO pins
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
2023-10-15 06:38:15 +00:00
|
|
|
|
piscsi [-F FOLDER] [-L LOG_LEVEL[:ID:[LUN]]] [-P ACCESS_TOKEN_FILE] [-R
|
|
|
|
|
SCAN_DEPTH] [-h] [-n VENDOR:PRODUCT:REVISION] [-p PORT] [-r RE‐
|
|
|
|
|
SERVED_IDS] [-n TYPE] [-v] [-z LOCALE] [-IDn:[u] FILE] [-HDn[:u]
|
|
|
|
|
FILE]...
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
piscsi emulates SCSI devices using the Raspberry Pi GPIO pins.
|
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
In the arguments to PiSCSI, one or more SCSI (-IDn[:u]) devices can be
|
|
|
|
|
specified. The number (n) after the ID or HD identifier specifies the
|
|
|
|
|
ID number for that device. The optional number (u) specifies the LUN
|
|
|
|
|
(logical unit) for that device. The default LUN is 0. For SCSI: The ID
|
|
|
|
|
is limited from 0-7. However, typically SCSI ID 7 is reserved for the
|
|
|
|
|
"initiator" (the host computer). The LUN is limited from 0-31.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
PiSCSI will determine the type of device based upon the file extension
|
|
|
|
|
of the FILE argument.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
hd1: SCSI Hard Disk image (generic, non-removable, SCSI-1)
|
|
|
|
|
hds: SCSI Hard Disk image (generic, non-removable)
|
|
|
|
|
hdr: SCSI Hard Disk image (generic, removable)
|
2023-10-15 06:38:15 +00:00
|
|
|
|
hdn: SCSI Hard Disk image (NEC compatible - only used with PC-98
|
|
|
|
|
computers)
|
|
|
|
|
hdi: SCSI Hard Disk image (Anex86 proprietary - only used with
|
|
|
|
|
PC-98 computers)
|
|
|
|
|
nhd: SCSI Hard Disk image (T98Next proprietary - only used with
|
|
|
|
|
PC-98 computers)
|
|
|
|
|
hda: SCSI Hard Disk image (Apple compatible - typically used with
|
|
|
|
|
Macintosh computers)
|
|
|
|
|
mos: SCSI Magneto-Optical image (generic - typically used with
|
|
|
|
|
NeXT, X68000, etc.)
|
2022-12-05 17:58:23 +00:00
|
|
|
|
iso: SCSI CD-ROM or DVD-ROM image (ISO 9660 image)
|
2023-02-27 02:52:19 +00:00
|
|
|
|
is1: SCSI CD-ROM or DVD-ROM image (ISO 9660 image, SCSI-1)
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
For example, if you want to specify an Apple-compatible HD image on ID
|
|
|
|
|
0, you can use the following command:
|
2022-12-05 17:58:23 +00:00
|
|
|
|
sudo piscsi -ID0 /path/to/drive/hdimage.hda
|
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Note: PiSCSI is a fork of RaSCSI. The two cannot be run in parallel on
|
|
|
|
|
the same system.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Once PiSCSI starts, it will open a socket (default port is 6868) to al‐
|
|
|
|
|
low external management commands. If another process is using this
|
|
|
|
|
port, PiSCSI will terminate, since it is likely another instance of
|
|
|
|
|
PiSCSI or RaSCSI. Once PiSCSI has initialized, the scsictl utility can
|
|
|
|
|
be used to send commands.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
To quit PiSCSI, press Control + C. If it is running in the background,
|
|
|
|
|
you can kill it using an INT signal.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
|
-b BLOCK_SIZE
|
2023-10-15 06:38:15 +00:00
|
|
|
|
The optional block size, either 512, 1024, 2048 or 4096 bytes.
|
|
|
|
|
Default size is 512 bytes.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-F FOLDER
|
2023-10-15 06:38:15 +00:00
|
|
|
|
The default folder for image files. For files in this folder no
|
|
|
|
|
absolute path needs to be specified. The initial default folder
|
|
|
|
|
is '~/images'.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-L LOG_LEVEL[:ID:[LUN]]
|
2023-10-15 06:38:15 +00:00
|
|
|
|
The piscsi log level (trace, debug, info, warning, error, off).
|
|
|
|
|
The default log level is 'info' for all devices unless a partic‐
|
|
|
|
|
ular device ID and an optional LUN was provided.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-P ACCESS_TOKEN_FILE
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Enable authentication and read the access token from the speci‐
|
|
|
|
|
fied file. The access token file must be owned by root and must
|
|
|
|
|
be readable by root only.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-R SCAN_DEPTH
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Scan for image files recursively, up to a depth of SCAN_DEPTH.
|
|
|
|
|
Depth 0 means to ignore any folders within the default image
|
|
|
|
|
filder. Be careful when using this option with many sub-folders
|
|
|
|
|
in the default image folder. The default depth is 1.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-h Show a help page.
|
|
|
|
|
|
|
|
|
|
-n VENDOR:PRODUCT:REVISION
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Set the vendor, product and revision for the device, to be re‐
|
|
|
|
|
turned with the INQUIRY data. A complete set of name components
|
|
|
|
|
must be provided. VENDOR may have up to 8, PRODUCT up to 16, RE‐
|
|
|
|
|
VISION up to 4 characters. Padding with blanks to the maxium
|
|
|
|
|
length is automatically applied. Once set the name of a device
|
|
|
|
|
cannot be changed.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-p PORT
|
|
|
|
|
The piscsi server port, default is 6868.
|
|
|
|
|
|
|
|
|
|
-r RESERVED_IDS
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Comma-separated list of IDs to reserve. Pass an empty list in
|
|
|
|
|
order to not reserve anything. -p TYPE The optional case-insen‐
|
|
|
|
|
sitive device type (SAHD, SCHD, SCRM, SCCD, SCMO, SCBR, SCDP,
|
|
|
|
|
SCLP, SCHS). If no type is specified for devices that support an
|
|
|
|
|
image file, piscsi tries to derive the type from the file exten‐
|
|
|
|
|
sion.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-v Display the piscsi version.
|
|
|
|
|
|
|
|
|
|
-z LOCALE
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Overrides the default locale for client-faces error messages.
|
|
|
|
|
The client can override the locale.
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
-IDn[:u] FILE
|
2023-10-15 06:38:15 +00:00
|
|
|
|
n is the SCSI ID number (0-7). u (0-31) is the optional LUN
|
|
|
|
|
(logical unit). The default LUN is 0.
|
|
|
|
|
|
|
|
|
|
FILE is the name of the image file to use for the SCSI device.
|
|
|
|
|
For devices that do not support an image file (SCBR, SCDP, SCLP,
|
|
|
|
|
SCHS) the filename may have a special meaning or a dummy name
|
|
|
|
|
can be provided. For SCBR and SCDP it is an optioinal priori‐
|
|
|
|
|
tized list of network interfaces, an optional IP address and
|
|
|
|
|
netmask, e.g. "interface=eth0,eth1,wlan0:inet=10.10.20.1/24".
|
|
|
|
|
For SCLP it is the print command to be used and a reservation
|
|
|
|
|
timeout in seconds, e.g. "cmd=lp -oraw %f:timeout=60".
|
2022-12-05 17:58:23 +00:00
|
|
|
|
|
|
|
|
|
FILE is the name of the image file to use for the SCSI device.
|
|
|
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
|
Launch PiSCSI with no emulated drives attached:
|
|
|
|
|
piscsi
|
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Launch PiSCSI with an Apple hard drive image as ID 0 and a CD-ROM as ID
|
|
|
|
|
2
|
2022-12-05 17:58:23 +00:00
|
|
|
|
piscsi -ID0 /path/to/harddrive.hda -ID2 /path/to/cdimage.iso
|
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
Launch PiSCSI with a removable SCSI drive image as ID 0 and the raw de‐
|
|
|
|
|
vice file /dev/hdb (e.g. a USB stick) and a DaynaPort network adapter
|
|
|
|
|
as ID 6:
|
2022-12-05 17:58:23 +00:00
|
|
|
|
piscsi -ID0 -t scrm /dev/hdb -ID6 -t scdp daynaport
|
|
|
|
|
|
|
|
|
|
To create an empty, 100MiB HD image, use the following command:
|
|
|
|
|
dd if=/dev/zero of=/path/to/newimage.hda bs=512 count=204800
|
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
In case the fallocate command is available a much faster alternative to
|
|
|
|
|
the dd command is:
|
2022-12-05 17:58:23 +00:00
|
|
|
|
fallocate -l 104857600 /path/to/newimage.hda
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
|
scsictl(1), scsimon(1), scsidump(1)
|
|
|
|
|
|
|
|
|
|
Full documentation is available at: <https://www.piscsi.com>
|
|
|
|
|
|
2023-10-15 06:38:15 +00:00
|
|
|
|
piscsi(1)
|