Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Motorola System V 88k Release 3.2 Version 1.2C

Media Vault

Software Library

Restoration Projects

Artifacts Sought



  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



  NAME
       sledit - slice table editor

  SYNOPSIS
       sledit [ -q -n -r -v -p -l -sfile -wfile ] rawdev

  DESCRIPTION
       sledit allows editing of the slice table, sizes and offsets,
       including the size of the file system, the file system name
       and the volume id.  The following options are interpreted by
       sledit:

       -q    Quiet warning messages.

       -n    Non-interactive mode (used with the -s option).

       -v    Questions are asked when making a file system.

       -r    The slice table is accessed read-only.

       -l    Allow editing of the last slice (the slice
             representing the entire disk).

       -p    The slice table information is displayed on standard
             output. The information is the slice number, slice
             offset, slice size and file system size, name and
             volume id. Each line displayed corresponds to one
             slice.

       -s    The slice table is taken from file where file is
             either another disk device with a slice table or a
             file that was copied from another disk device with a
             slice table.

       -w    The slice table information for rawdev is take from
             file.  file must contain one entry for each slice,
             with one entry per line.  Each entry must consist of
             the slice number, slice offset, and slice size. These
             fields must be separated by spaces and or tabs.  This
             option is supported only for the MVME323 CDC 182Mb


  Page 1                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



             devices and it is assumed that there are eight slices
             for the device. A consistency check is made on the
             data read from the file and if the data is found to be
             correct, the slice table information is written to the
             device. If a slice is not going to contain a file
             system, the slice size and offset fields must be zero.
             The entry for slice 7 must have a slice size of 313632
             (512-byte blocks). This represents the total number of
             block available on the entire disk.

       The rawdev argument specifies the raw disk device.  sledit
       must be used on the slice representing the entire raw disk,
       e.g., slice 7, slice 15, slice 31.  The name of the raw
       device must be in the form /dev/rdsk/controller_XsY where X
       denotes the device number and Y denotes the slice number.
       For example:
            sledit /dev/rdsk/m3200s7
       In addition, the raw device must have a corresponding block
       device, /dev/dsk/controller_XsY, with the same minor number
       as the raw device.

       sledit checks the disk device being edited for mounted file
       systems. If a file system is mounted, the slice where the
       file system resides will be marked as read-only.

       sledit uses a subset of vi(1) commands for cursor movement
       and file manipulation.  The following movement commands are
       interpreted by sledit.

                       ____________________________
                      | Command      Movement     |
                      ||
                      | h or ^H      left         |
                      | l or ^L      right        |
                      | j or ^J      down         |
                      | k or ^K      up           |
                      | arrow keys    same as hljk|
                      | w            word forward |
                      |___________________________|



  Page 2                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



                      | b            word backward|
                      | e            end of word  |
                      |___________________________|

       The cursor is allowed to move only in and to the predefined
       fields on the table.

       The following commands allow changing the slice table.

                 _______________________________________
                | Command   Manipulation               |
                ||
                | :s file   save slice table in file   |
                | ^F        next screen                |
                | ^B        previous screen            |
                | O         open a new slice           |
                | C         compress two slices        |
                | :q        quit                       |
                | ZZ        quit                       |
                | :q!       quit (no disk write)       |
                | :cw        change word               |
                | :dw        delete word               |
                | i         insert before              |
                | a         append after               |
                | ESC       end change                 |
                | x         delete single character    |
                | r         replace single character   |
                | .         insert last inserted string|
                | u         undo last change           |
                | :!        shell escape               |
                |______________________________________|

       The size and offset fields have a ten-character maximum
       length and the file system name and volume id fields have a
       six-character maximum length.  Only decimal values are
       allowed in the size and offset fields.

       The offset and size fields for the slice table and file
       systems are in units of blocks where blocks are 512 bytes.



  Page 3                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



       Eight slices are displayed at one time.  If the disk device
       has been configured with more slices [see dinit(1M)], more
       screens may be edited.

       The :s file command saves the slice table, as it appears on
       the screen, to the regular file file.  This command is handy
       for saving a slice table prior to editing or creating data
       files for the -s option.

       The O (open) command allows easy allocation of the next
       non-overlapped slice.  Check to make sure there is a
       previous slice with a slice size greater than its file
       system size.  Then position the cursor in the slice to be
       opened.  The size of the previous slice is reduced to its
       file system size and the remaining space is given to the new
       slice.

       The C (compress) command salvages unused space. Check to
       make sure that the previous slices are non-overlapped and
       continuous.  Then position the cursor in the slice that is
       to be compressed.  The file system (if any) is destroyed and
       the space salvaged is given to a previous slice.  The last
       slice cannot be compressed.

       sledit writes to disk only when doing a quit, :q, or ZZ.  A
       :q! leaves the disk untouched.

       sledit uses curses(3X) to provide the editing capabilities.
       To produce terminal dependent output, the type of terminal
       being used has to be specified.  The usual convention for
       doing this is setting the TERM variable in the shell's
       environment [see sh(1)].  If the terminal is a VT100, then
       TERM could be set to vt100.  When the environment variable
       TERMINFO is set, a local terminal definition will be checked
       before checking in the standard place,
       /usr/lib/terminfo/v/vt100.  A local definition of the
       terminal will allow sledit to edit the usr file system.

       If the size of a file system is changed or the offset of the
       slice where a file system is located is changed, sledit


  Page 4                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



       calls mkfs(1M) on quitting to make file systems on each
       changed slice.  If the -v option is specified on the command
       line, the number of inodes, gap size, and blocks per cycle
       can be altered; otherwise, the default values are used.

       The -s option can be used to copy a slice table from another
       disk device or a data file.  Data files may be created using
       the :s file command.

       The -n option may be used with the -s option to simply copy
       a slice table without using the editor.  The -p and -w
       options do not use the editor.

  DIAGNOSTICS
       sledit issues various diagnostic messages.  Some of them are
       concerned with the editing process and are self-explanatory.


























  Page 5                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



         _______________________________________________________
        | MESSAGE                  |  POSSIBLE CAUSE           |
        |__________________________|___________________________|
        | Can't open file          |  File inaccessible, either|
        |                          |  denied access permissions|
        |                          |  or file doesn't exist.   |
        |__________________________|___________________________|
        | Can't split field        |  Attempt was made to      |
        |                          |  insert white space while |
        |                          |  inserting text with i, a |
        |                          |  or r commands.           |
        |__________________________|___________________________|
        | File system greater than |  Making file system size  |
        | slice size               |  larger than slice.       |
        |__________________________|___________________________|
        | Missing device file      |  Raw device not given     |
        |__________________________|___________________________|
        | No slice table           |  Disk not formatted with  |
        |                          |  slice table; see         |
        |                          |  dinit(1M).               |
        |__________________________|___________________________|
        | Only one screen          |  Slice table has only 8   |
        |                          |  slices; see dinit(1M).   |
        |__________________________|___________________________|
        | Values are in decimal    |  Inserting non-digit in   |
        |                          |  the size or offset       |
        |                          |  fields.                  |
        |__________________________|___________________________|
        | Slice beyond end of disk |  Slice size is larger than|
        |                          |  the end of the disk.     |
        |__________________________|___________________________|
        | Slice table ioctl error  |  Disk driver unable to    |
        |                          |  change slicing.          |
        |__________________________|___________________________|
        | Slice table read error   |  Can't read slice table,  |
        |                          |  possibly corrupted.      |
        |__________________________|___________________________|
        | Slice table seek error   |  Volume id header         |
        |__________________________|___________________________|



  Page 6                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



 |                          |         corrupted; slice ta
|
ble | | location wrong. | |__________________________|___________________________| | Super block read error | Slice table corrupted; | | | file system offset wrong.| |__________________________|___________________________| Page 7 May 1989


  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



                          DIAGNOSTICS (Cont'd.)
    __________________________________________________________________
   | Unknown or missing field            |  Size or offset field     |
   |                                     |  blank, if empty must be  |
   |                                     |  0.                       |
   |_____________________________________|___________________________|
   | No space for slice table            |  malloc(3X) fails.        |
   |_____________________________________|___________________________|
   | Can't compress slice 0              |  Trying to compress while |
   |                                     |  on slice 0.              |
   |_____________________________________|___________________________|
   | Can't stat file                     |  Same as ``Can't open''.  |
   |                                     |  File inaccessible, either|
   |                                     |  denied access permissions|
   |                                     |  or it doesn't exist.     |
   |_____________________________________|___________________________|
   | Filename missing                    |  using :s command without |
   |                                     |  filename.                |
   |_____________________________________|___________________________|
   | Not a regular file: file            |  File is a special file.  |
   |                                     |                           |
   |_____________________________________|___________________________|
   | No slices to compress with.         |  Previous slices zero     |
   |                                     |  length.                  |
   |_____________________________________|___________________________|
   | Can't compress, no size             |  Trying to compress a zero|
   |                                     |  length slice.            |
   |_____________________________________|___________________________|
   | Can't compress, overlapped          |  Trying to compress to a  |
   |                                     |  slice that is overlapped |
   |                                     |  with the slice being     |
   |                                     |  compressed.              |
   |_____________________________________|___________________________|
   | Can't compress, noncontinuous slices|  Slice being compressed is|
   |                                     |  not equal to slice offset|
   |                                     |  of previous slice.       |
   |_____________________________________|___________________________|
   | Last slice unavailable              |  Trying to allocate space |
   |_____________________________________|___________________________|



  Page 8                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



 |                                     |    from the last slice.   |
 |_____________________________________|___________________________|
 | No available space to allocate      |  Last previous slice has  |
 |                                     |  no unused space          |
 |                                     |  remaining.               |
 |_____________________________________|___________________________|
 | Previous slice has size             |                           |
 |_____________________________________|___________________________|
 | but no file system                  |  sledit can't allocate    |
 |                                     |  space from a slice unless|
 |                                     |  it knows the size of the |
 |                                     |  file system.             |
 |_____________________________________|___________________________|
 | Unknown TERM, TER.INFO or can't find|  Environment variables not|
 | terminfo file.                      |  set properly or the      |
 |                                     |  terminfo file for        |
 |                                     |  terminal can't be found. |
 |_____________________________________|___________________________|
























  Page 9                                                   May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



                          DIAGNOSTICS (Cont'd.)
       ____________________________________________________________
      |                               |                           |
      |_______________________________|___________________________|
      | Volume id read error          |                           |
      |_______________________________|___________________________|
      | Volume id header corrupted or |                           |
      | sledit being used on a slice  |                           |
      | not representing entire disk, |                           |
      | e.g., slice 7.                |                           |
      |_______________________________|___________________________|
      | Slice offset overlap          |  Two slices overlap.      |
      |_______________________________|___________________________|
      | Mounted file system, Read only|  Volume id header         |
      |                               |  corrupted or the slice   |
      |                               |  that is being changed has|
      |                               |  a mounted file system.   |
      |                               |  Unmount the file system  |
      |                               |  to change.               |
      |_______________________________|___________________________|

  WARNINGS
       Use of the -l option to edit the slice representing the
       entire disk is dangerous.  Changing the slice offset or the
       size may prevent the device driver from opening that device
       again. If that should occur, shut down and reboot the system
       to solve the problem.  If the problem persists, reformat the
       device.

       sledit allows the entire disk to be used for slicing,
       including those areas reserved for other uses [refer to
       ddefs(1M)]. If these areas are allocated by sledit,
       unpredictable results may occur.

       On some installations, slice 0 contains the swap area. If
       this is the case, do not allocate this space to another
       slice.

       sledit allows slices to be overlapped.  If this is done,
       care must be taken not to overlap the file systems on those


  Page 10                                                  May 1989


















  SLEDIT(1M)         (Board Software Extensions)         SLEDIT(1M)



       slices or unpredictable results may occur.

  SEE ALSO
       mkfs(1M), dinit(1M), ddefs(1M).
       dd(1) in the User's Reference Manual.
       curses(3X) in the Programmer's Reference Manual.




































  Page 11                                                  May 1989
















Typewritten Software • bear@typewritten.org • Edmonds, WA 98026