Command: sys

  SYS makes a floppy disk or hard disk or another writable medium
  bootable. SYS CONFIG configures the FreeDOS KERNEL.
  SYS's standard behavior is very similar (though in my opinion
  improved) to that of other DOSes. At floppies, FORMAT has to
  be executed before, at hard disks FDISK AND FORMAT.
  SYS /? (or no options) should provide a general usage,
  SYS CONFIG /help (or SYS CONFIG /?) should provide usage for the
  new configuration options.

Syntax:

  SYS [source] drive: [bootsect] [{option}]
  SYS [/?]
      source    = A:,B:,C:\FREEDOS\BIN\,etc., The (optional) location of
                the system files. If not given, the current directory
                is assumed.
      drive     = A,B,C etc. The drive to install system to (make
                bootable).
      bootsect  The name of the 512-byte boot sector file image for
                drive: to write to *instead* of real boot sector.

  SYS CONFIG
  SYS CONFIG [drive][path]kernel.sys [option=value...]
  SYS CONFIG [/help][/?]

  SYS CONFIG
    This will simply display the current settings for the file
    KERNEL.SYS in the current directory. It is useful to see what
    the options are currently set to, what options are supported,
    and should show valid values along with defaults (defaults are
    the valid values with a '*' next to them).

  SYS CONFIG [drive][path]KERNEL.SYS
    This form behaves as above, except will display the settings
    for the kernel file you specify. Drive and path are optional,
    and generally just a '\' will be used to indicate root directory
    of current drive. KERNEL.SYS specifies the filename of the
    kernel, which may not be "KERNEL.SYS", for example when testing
    you want to alter KERNTEST.SYS and later copy (or rename) this
    to KERNEL.SYS for booting.

Options:

  SYS OPTIONS:
  /BOTH           The new boot sector will be written to "both" the
                  image file and to the actual drive boot sector.
  /BOOTONLY       The boot sector (or image) will be updated, but the
                  KERNEL and COMMAND.COM will not be copied to the
                  destination.
  /UPDATE         Copy KERNEL and update boot sector (do *not* copy
                  shell, e.g. "COMMAND.COM".
  /OEM            Indicates boot sector, filenames, and load segment
                  to use.
    /OEM[:AUTO]   Select DOS based on existing files (default).
    /OEM:FD       Use FreeDOS compatible settings.
    /OEM:DR       Use DR DOS 7+ compatible settings (same as /OEM).
    /OEM:PC       Use PC-DOS compatible settings (still in use?).
    /OEM:MS       Use MS-DOS compatible settings (still in use?).
    /OEM:W9x      Use MS Win9x DOS compatible settings (still in use?).
    /OEM:DE       Use DEll Real Mode Kernel settings (still in use?).
    /OEM:EDR      Use Enhanced DR DOS 7+ compatible settings.
    /OEM:Rx       Use RxDOS compatible settings (still in use?).
  /K name         Name of the kernel to use in boot sector instead of
                  KERNEL.SYS. This option is only required when another
                  kernel shall be used.
  /L segm         The hex load segment to use in boot sector instead of
                  0x60 (default).
  /B btdrv :      hex BIOS # of boot drive set in bs, 0=A:, 80=1st hd,...
  /FORCE          Override automatic selection of BIOS related settings.
    /FORCE:BSDRV    Use boot drive # set in bootsector.
    /FORCEDRV       Use boot drive # set in bootsector.
    /FORCE:BIOSDRV  Use boot drive # provided by BIOS.
    /FORCE:AUTO     Select LBA or CHS depending on BIOS availability.
    /FORCE:LBA      Always use LBA.
    /FORCE:CHS      Always use CHS.
  /NOBAKBS        Skips copying boot sector to backup bs, FAT32 only
                  else ignored.
  /SKFN filename  Copy from filename to KERNEL.SYS; settings
                  same as /OEM:FD.
  /SCFN filename  Copy from filename to COMMAND.COM.
  /BACKUPBS [path]filename  Save current bs before overwriting.
  /DUMPBS   [path]filename  Save current bs and exit.
  /RESTORBS [path]filename  Overwrite bs and exit.
  /VERBOSE                  Display additional (debug) output.
  /help          Shows the help.
  /?             Shows the help.

  SYS CONFIG OPTIONS:
  /help          Shows the help.
  /?             Shows the help.
  Current options are:
  DLASORT=0|1 OR:
  DLA=0|1
    This option is for specifying whether Drive Letter Assignment
    should follow the normal MSDOS way of all primary partitions
    across drives and then extended partitions, or the more logical
    all partitions (primary and extended) on the 1st drive, then
    repeat for all following drives (all primary and extended, then
    try next drive). 0 corresponds to MS way and 1 corresponds to
    first drive completely, then next ...
  SHOWDRIVEASSIGNMENT=0|1 OR:
  SHO=0|1
    If 1 then the normal drive assignment information is displayed
    upon booting. If 0 then this information is suppressed (not shown).
  SKIPCONFIGSECONDS=# which maybe -128 to 127 (still in use?)
  SKI=#
    A negative value ( < 0 ) indicates that F5/F8 processing will
    be skipped (the kernel won't check if you pressed these keys,
    so you can't skip config file (CONFIG.SYS) processing).  A 0
    means you must have pressed the key precisely for when the
    kernel checks for it - essentially skipping, though a well timed
    finger will still get to use it.  And any value greater than 0
    is the number of seconds the kernel will display the prompt and
    wait for you to press the key before assuming you didn't.
    Example: To set the kernel in the current directory to have a
    timeout of 5 seconds (default is 2) run
      SYS CONFIG SKI=5
  FORCELBA=0|1
    If 1 then the kernel will use LBA (extended INT13) techniques
    to address all partitions if possible, even if these have a
    non-LBA partition type and are completely below cylinder 1023
    (usually the 8GB boundary). This is 0 by default, for compati-
    bility reasons. Setting this to 1 may bypass some buggy
    BIOSes and gives slightly better performance.
  GLOBALENABLELBASUPPORT=0|1
    If 0 then LBA will be completely disabled, irrespective of the
    FORCELBA setting. You need this if FreeDOS thinks you have LBA
    available, but in reality you do not. This setting is set to
    1 by default.
  BootHarddiskSeconds=0|seconds to wait
  For more information about SYS CONFIG see:
  http://www.fdos.org/kernel/ OR sys.txt at:
  https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/kernel/

Comments:

  The SYS command creates a bootsector on sector 0 of the diskette or
  harddrive. Then it copies KERNEL.SYS and COMMAND.COM to the medium.
  After this the computer is able to boot FreeDOS from this medium.
  SYS CONFIG:
  If no options are given, the current values are shown. /help or /?
  displays the usage information. [drive][path]kernel.sys specifies the
  kernel file to modify, if not given defaults to KERNEL.SYS.
  Option=value ... specifies one or more options and the values to
  set each to. If an option is given multiple times, the value set will
  be the rightmost one.

Examples:

  Example 1:
  Making a diskette bootable version 1:
  From an existing bootable HD or CD:
    fdisk      (is not needed!)
    format a:  (Formats the diskette so that files can be written).
    sys a:     The KERNEL (KERNEL.SYS) and COMMAND.COM
               will be copied from your bootable HD or CD to A:; after
               the execution the diskette will be bootable.
  Example 2:
  Making a diskette bootable version 2:
  From an booted diskette (in drive A:):
    fdisk      (is not needed!)
    format b:  (Formats the diskette so that files can be written).
               Depending on if you have two floppy drives or not the
               format command formats at drive B: or asks you to enter
               a new floppy into drive A: and formats from there.
               When this is done, insert the original diskette again,
               then enter:
    sys b:     The KERNEL (KERNEL.SYS) and COMMAND.COM
               will be copied from your bootable diskette A: to B:,
               (same procedure as format b:) after the execution
               the diskette will be bootable.
  Example 3:
  Making a HD bootable:
  From an existing bootable diskette or CD:
    fdisk      (This allows you to create ONE or MORE partitions, see
               FDISK; up to FOUR primary
               partitions can be created. (If you create four primary
               partitions the remaining space of your HD can not be
               used!) Do not forget to reboot!
    fdisk      Set ACTIVE PARTITION (only THIS ONE partition can boot,
               but you can change this by making one of the three other
               primary partitons ACTIVE (there is NO boot manager) with
               fdisk. Do not forget to reboot!
    format c:  Prepares the HD to so that files can be written on it.
    sys c:     The KERNEL (KERNEL.SYS) and COMMAND.COM
               will be copied from your bootable diskette or CD to C:

See also:

  command.com
  format
  fdisk
  kernel
  label
  sys
  vol

  Copyright © 1998 Jim Hall, updated 2007 and 2022 by W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.