Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (1N) — Commercial Networking Extensions 1.02

Media Vault

Software Library

Restoration Projects

Artifacts Sought



          SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



          NAME
               sledit, msledit - slice table editor

          SYNOPSIS
               sledit [ -q -n -r -v -l -s file ] rawdev
               msledit [ -c -d file -D dir -r -u -e file -o file -m -p -s
               dev -v -w ] rawdev

          DESCRIPTION
               sledit allows editing of the slice table, sizes and offsets,
               including the size, logical block size, name, and the volume
               id of the file system.  msledit is the stripped down version
               of sledit that allows editing of the slice table without the
               usr file system mounted.  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).

               -s file 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.

               The following are msledit options:

               -c      Check for slice table.

               -d file Create slicetable using ddefs filename.

               -D dir  Use ddefs directory dir.

               -r      Make root only slice table from ddefs entry.

               -u      Make root and usr slice table from ddefs entry.

               -e file Input slice table from ASCII file.

               -o file Output slice table to ASCII file.

               -m      Do not make file systems.

               -p      Print slice table to stdout.




          Page 1                                          (printed 8/25/90)





          SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



               -s dev  Slice table from device.

               -v      Ask questions during mkfs.

               -w      Write slice table to device (no edit).

               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/m320_0s7
               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, then the slice where
               the file system resides will be marked as read-only.

               msledit uses the same method as ddefs(1M) for editing the
               slice table.  Each slice is broken into a series of lines
               containing information about the slice.  To modify the
               information, move the cursor to the appropriate line and
               enter the new value.  To obtain information about commands,
               enter help on any line; for detailed information about a
               specific line, enter a question mark (?).  To print the
               slice table, enter t.

               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  |
                     |b          | word backward |
                     |___________|_______________|

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







          Page 2                                          (printed 8/25/90)





          SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



               The following commands allow changing the slice table:

               _______________________________________
               |________|_____________________________|
               |: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 char          |
               |r       | replace single char         |
               |.       | 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.  The file system information    |
               field has a maximum length of four characters.  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 a block is 512 bytes.   |

               The file system information field can contain data in two     |
               different forms:                                              |

               A single numeric digit                                             ||
                    This digit specifies the logical block size, in          |
                    kilobytes, of a System V file system.  Acceptable        |
                    values are 1, 2, 4, or 8.                                |

               The string lhc                                                     ||
                    This string specifies information for an HPFS.  l        |
                    specifies the logical block size, in kilobytes;          |
                    acceptable values are 1, 2, 4, or 8.  c specifies the    |
                    number of logical blocks in the cluster.                 |

               The cluster must have an aggregate byte size of less than or  |
               equal to 64 kilobytes.  Therefore, if the logical block size  |
               is one kilobyte (l=1), then acceptable values for c are 1     |
               through 64.  However, if l=4, the maximum acceptable value    |
               for c is 16.                                                  |



          Page 3                                          (printed 8/25/90)





          SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



               By default, ten percent of the space in an HPFS is reserved   |
               for system administrator use. To change the percentage of     |
               reserved space, use tunefs(1M).                               |

               Eight slices are displayed at one time. If the disk device
               has been configured with more slices (see dinit(1M)), then
               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 an EXORterm
               155, then the TERM could be set to 155.  If the environment
               variable TERMINFO is set, then a local terminal definition
               will be checked before checking in the standard place,
               /usr/lib/terminfo/1/155.  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 and
               msledit will call mkfs(1M) on quitting to make file systems
               on each changed slice.  If the -v option is specified on the
               command line, then the number of inodes, gap size, and
               blocks per cylinder can be altered; otherwise, the default
               values are used.  These default values may not reflect the
               optimum parameters for the disk drive, but they will not      |
               cause any problems.                                           |




          Page 4                                          (printed 8/25/90)





          SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



               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 (with sledit) or the w file command
               (with msledit).

               The -n option may be used with the -s option to simply copy
               a slice table without using the editor.

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

     ___________________________________________________
     |        Message          |     Possible Cause     |
     |_________________________|________________________|
     |Can't open xxx           | File xxx 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 size greater | Making file system     |
     |than slice size          | 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.        |
     |_________________________|________________________|




Page 5                                          (printed 8/25/90)





SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



     |_________________________|________________________|
     |Slice table read error   | Can't read slice       |
     |                         | table, possibly        |
     |                         | corrupted.             |
     _____________________________________________________
     |         Message           |     Possible Cause     |
     |___________________________|________________________|
     |Slice table seek error     | Volume id header       |
     |                           | corrupted; slice table |
     |                           | location wrong.        |
     |___________________________|________________________|
     |Super block read error     | Slice table corrupted; |
     |                           | file system offset     |
     |                           | wrong.                 |
     |___________________________|________________________|
     |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 xxx             | Same as Can't open.    |
     |                           | File xxx inaccessible, |
     |                           | either denied access   |
     |                           | permissions or file    |
     |                           | doesn't exist.         |
     |___________________________|________________________|
     |Filename missing           | Using :s command       |
     |                           | without filename.      |
     |___________________________|________________________|
     |Not a regular file: xxx    | File xxx 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, non-       | Slice being compressed |
     |continuous slices          | is not equal to slice  |
     |___________________________|________________________|




Page 6                                          (printed 8/25/90)





SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



|                           |      slice.            |
|___________________________|________________________|
|Last slice unavailable     | Trying to allocate     |
|                           | space from the last    |
|                           | slice.                 |
|_____________________________________________________
     |       Message         |     Possible Cause     |
     |_______________________|________________________|
     |No available space to  | Last previous slice    |
     |allocate               | has no unused space    |
     |                       | remaining.             |
     |_______________________|________________________|
     |Previous slice has     | sledit cannot allocate |
     |size but no file       | space from a slice     |
     |system                 | unless it knows the    |
     |                       | size of the file       |
     |                       | system.                |
     |_______________________|________________________|
     |Unknown TERM, TERMINFO | Environment variables  |
     |or cannot find         | not set properly or    |
     |terminfo file          | the terminfo file for  |
     |                       | terminal cannot be     |
     |                       | found.                 |
     |_______________________|________________________|
     |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,   | The slice that is      |
     |Read only              | being changed has a    |
     |                       | mounted file system.   |
     |                       | Unmount the file       |
     |                       | system to change.      |
     |_______________________|________________________|            |
     |Illegal block size     | A non-numeric block    |            |
     |                       | size was entered.      |            |
     |_______________________|________________________|            |
     |Illegal file system    | The data entry is not  |            |
     |info field             | recognizable.  It is   |            |
     |                       | not a single numeric   |            |
     |                       | digit, nor does it     |            |
     |                       | take the format of the |            |
     |                       | string lhc.            |            |
     |_______________________|________________________|            |
     |Block size must be 1,  | The logical block size |            |
     |_______________________|________________________|            |




Page 7                                          (printed 8/25/90)





SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



|     2, 4, or 8        |      must be set to 1, |,                |||
|                       |      4, or 8K.         |                 ||
|_______________________|________________________|                 |
|Illegal cluster size   | The cluster size is    |                 |
|                       | less than 1 or greater |                 |
|                       | than 64, or the        |                 |
|                       | aggregate size of the  |                 |
|                       | cluster is greater     |                 |
|                       | than 64K bytes.        |                 |
|_______________________|________________________|                 |













































          Page 8                                          (printed 8/25/90)





          SLEDIT(1N)SYSTEM V/88 (System Administration Utilities)SLEDIT(1N)



          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
               slices or unpredictable results may occur.

               sledit has been altered to support Long Name File Systems.    |
               A Long Name file system is identified by an 'L' at the        |
               beginning of the file system information field.  Adding       |
               an 'L' to the beginning will cause the file system to         |
               be wiped out and built from scratch.                          |

          SEE ALSO
               mkfs(1M), dinit(1M), ddefs(1M), tunefs(1M)                    |
               dd(1) in the SYSTEM V/88 User's Reference Manual
               curses(3X) in the SYSTEM V/88 Programmer's Reference Manual





























          Page 9                                          (printed 8/25/90)



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