2 .\" Jordan Hubbard <jkh@FreeBSD.org>. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY Jordan Hubbard AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL Jordan Hubbard OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd system installation and configuration tool
41 utility is used for installing and configuring
44 It is the first utility invoked by the
47 floppy and is also available as
48 .Pa /usr/sbin/sysinstall
51 systems for use in later configuring the system.
55 utility is generally invoked without arguments for the default
56 behavior, where the main installation/configuration menu is presented.
58 On those occasions where it is deemed necessary to invoke a subsystem
59 of sysinstall directly, however, it is also possible to do so by
60 naming the appropriate function entry points on the command line.
61 Since this action is essentially identical to running an installation
62 script, each command-line argument corresponding to a line of script,
63 the reader is encouraged to read the section on scripting for more
64 information on this feature.
68 utility is essentially nothing more than a monolithic C program with
69 the ability to write MBRs and disk labels (through the services
72 library) and install distributions or packages onto new and
76 It also contains some extra intelligence
77 for running as a replacement for
79 when it is invoked by the
81 installation boot procedure.
83 assumes very little in the way of additional utility support and
84 performs most file system operations by calling the relevant syscalls
91 utility currently uses the
93 library to do user interaction with simple ANSI line graphics, color
94 support for which is enabled by either running on a syscons VTY or some
95 other color-capable terminal emulator (newer versions of xterm will support
100 This product is currently at the end of its life cycle and will
101 eventually be replaced.
105 utility may be either driven interactively through its various internal menus
106 or run in batch mode, driven by an external script.
108 be loaded and executed in one of 3 ways:
110 .It Sy "LOAD_CONFIG_FILE"
113 is compiled with LOAD_CONFIG_FILE set in the environment
114 (or in the Makefile) to some value, then that value will
115 be used as the filename to automatically look for and load
118 starts up and with no user interaction required.
119 This option is aimed primarily at large sites who wish to create a
120 single prototype install for multiple machines with largely identical
121 configurations and/or installation options.
125 is run interactively, that is to say in the default manner, it will
126 bring up a main menu which contains a "load config file" option.
127 Selecting this option will prompt for the name of a script file which
128 it then will attempt to load from a DOS or UFS formatted floppy.
129 .It Sy "COMMAND LINE"
130 Each command line argument is treated as a script directive
133 is run in multi-user mode.
134 Execution ends either by explicit request
137 directive), upon reaching the end of the argument list or on error.
141 /usr/sbin/sysinstall _ftpPath=ftp://ziggy/pub/ mediaSetFTP configPackages
146 for FTP installation media (using the server `ziggy') and then
147 bring up the package installation editor, exiting when finished.
150 A script is a list of one or more directives, each directive taking
162 is the assignment of some internal
164 variable, e.g.\& "ftpPass=FuNkYChiKn", and
166 is the name of an internal
168 function, e.g.\& "mediaSetFTP", and
170 is a single-line comment for documentation purposes (ignored by
172 Each directive must be by itself on a single line,
173 functions taking their arguments by examining known variable names.
174 This requires that you be sure to assign the relevant variables before
175 calling a function which requires them.
179 variable can be assigned before each directive: this will cause any error
180 detected while processing the directive itself to be ignored.
183 will automatically reset to the default "unassigned" every time a directive is
186 When and where a function depends on the settings of one or more variables
187 will be noted in the following table:
189 .Sy "Function Glossary" :
191 .Bl -tag -width indent
193 Invoke the Anonymous FTP configuration menu.
198 Select which routing daemon you wish to use, potentially
199 loading any required 3rd-party routing daemons as necessary.
202 .Bl -tag -width indent
204 can be set to the name of the desired routing daemon,
209 otherwise it is prompted for.
212 Configure host as an NFS server.
217 Configure host as a user of the Network Time Protocol.
220 .Bl -tag -width indent
224 that is to say the name of the server to sync from.
227 Configure host to support PC NFS.
230 .Bl -tag -width indent
232 The name of the PCNFSD package to load if necessary (defaults to hard coded
236 Bring up the interactive package management menu.
241 Add users and/or groups to the system.
245 .It diskPartitionEditor
246 Invokes the disk partition (MBR) editor.
249 .Bl -tag -width findx
251 The disk geometry, as a cyls/heads/sectors formatted string.
255 Set to disk partitioning type or size, its value being
257 in order to use only remaining free space for
260 to use the entire disk for
262 but maintain a proper partition
267 partition (first found),
270 .Dq dangerously dedicated
275 blocks of available free space to a new
278 Default: Interactive mode.
282 to signify the installation of a boot manager,
284 to signify installation of a "standard" non-boot MGR DOS
287 to indicate that no change to the boot manager is desired.
290 If set, bring up the interactive disk partition editor.
293 Note: Nothing is actually written to disk by this function, an explicit call to
294 .Ar diskPartitionWrite
295 being required for that to happen.
296 .It diskPartitionWrite
297 Causes any pending MBR changes (typically from the
298 .Ar diskPartitionEditor
299 function) to be written out.
304 Invokes the disk label editor.
305 This is a bit trickier from a script
306 since you need to essentially label everything inside each
308 (type 0xA5) partition created by the
309 .Ar diskPartitionEditor
310 function, and that requires knowing a few rules about how things are
312 When creating a script to automatically allocate disk space
313 and partition it up, it is suggested that you first perform the
314 installation interactively at least once and take careful notes as to
315 what the slice names will be, then and only then hardwiring them into
318 For example, let's say you have a SCSI disk on which you have created a new
320 partition in slice 2 (your DOS partition residing in slice 1).
321 The slice name would be
327 being your DOS primary
329 Now let's further assume that you have 500MB in this
330 partition and you want to sub-partition that space into root, swap,
331 var and usr file systems for
333 Your invocation of the
335 function might involve setting the following variables:
336 .Bl -tag -width findx
337 .It Li "da0s2-1=ufs 40960 /"
338 A 20MB root file system (all sizes are in 512 byte blocks).
339 .It Li "da0s2-2=swap 131072 /"
340 A 64MB swap partition.
341 .It Li "da0s2-3=ufs 204800 /var"
342 A 100MB /var file system.
343 .It Li "da0s2-4=ufs 0 /usr 1"
344 With the balance of free space (around 316MB) going to the /usr
345 file system and with soft-updates enabled (the argument following
346 the mount point, if non-zero, means to set the soft updates flag).
351 for mounting or erasing existing partitions as well as creating new
353 Using the previous example again, let's say that we also wanted
354 to mount our DOS partition and make sure that an
356 entry is created for it in the new installation.
359 function, we simply add an additional line:
364 This tells the label editor that you want to mount
367 and not to attempt to newfs it (not that
369 would attempt this for a DOS partition in any case, but it could just
370 as easily be an existing UFS partition being named here and the 2nd
371 field is non-optional).
375 variable to request that the disk label editor use an interactive dialog
376 to partition the disk instead of using variables to explicitly layout the
377 disk as described above.
379 Note: No file system data is actually written to disk until an
384 Writes out all pending disklabel information and creates and/or mounts any
385 file systems which have requests pending from the
392 Resets all selected distributions to the empty set (no distributions selected).
397 Allows the selection of a custom distribution set (e.g.\& not just one of the
398 existing "canned" sets) with no user interaction.
401 .Bl -tag -width indent
403 List of distributions to load.
404 Possible distribution values are:
405 .Bl -tag -width indentxx
407 The base binary distribution.
409 Miscellaneous documentation
413 Manual pages (unformatted)
415 Pre-formatted manual pages
417 Profiled libraries for developers.
419 Dictionary information (for tools like spell).
421 GNU info files and other extra docs.
424 32-bit runtime compatibility libraries.
426 The ports collection.
430 /usr/src/[top level files]
464 /usr/src/usr.sbin/sendmail/cf
466 X.Org client applications.
472 X.Org protocol and library documentation.
474 X.Org imake distribution.
478 X.Org nested X server.
482 X.Org virtual frame-buffer X server.
484 X.Org miscellaneous font set.
486 X.Org 75DPI font set.
488 X.Org 100DPI font set.
490 X.Org Cyrillic font set.
492 X.Org Type 1 font set.
494 X.Org TrueType font set.
500 Selects the standard Developer's distribution set.
504 .It distSetXDeveloper
505 Selects the standard X Developer's distribution set.
509 .It distSetKernDeveloper
510 Selects the standard kernel Developer's distribution set.
515 Selects the standard user distribution set.
520 Selects the standard X user's distribution set.
525 Selects the very minimum distribution set.
529 .It distSetEverything
530 Selects the full whack - all available distributions.
535 Interactively select source subcomponents.
540 Interactively select X.Org subcomponents.
545 Install all currently selected distributions (requires that
546 media device also be selected).
551 Install (if necessary) an HTML documentation browser and go to the
552 HTML documentation submenu.
555 .Bl -tag -width indent
557 The name of the browser package to try and install as necessary.
558 Defaults to latest links package.
560 The name of the browser binary itself (if overriding the
566 Commit any and all pending changes to disk.
568 is essentially shorthand for a number of more granular "commit"
574 Start an "express" installation, asking few questions of
580 Start a "standard" installation, the most user-friendly
581 installation type available.
586 Start an upgrade installation.
590 .It installFixitHoloShell
591 Start up the "emergency holographic shell" over on VTY4
593 This will also happen automatically
594 as part of the installation process unless
600 .It installFixitCDROM
601 Go into "fixit" mode, assuming a live file system CDROM
602 currently in the drive.
606 .It installFixitFloppy
607 Go into "fixit" mode, assuming an available fixit floppy
608 disk (user will be prompted for it).
612 .It installFilesystems
613 Do just the file system initialization part of an install.
617 .It installVarDefaults
618 Initialize all variables to their defaults, overriding any
624 Sort of like an #include statement, it allows you to load one
625 configuration file from another.
628 .Bl -tag -width indent
630 The fully qualified pathname of the file to load.
633 If a media device is set, mount it.
638 If a media device is open, close it.
645 CDROM as the installation media.
650 Select a pre-made floppy installation set as the installation media.
655 Select an existing DOS primary partition as the installation media.
656 The first primary partition found is used (e.g.\& C:).
661 Select a tape device as the installation media.
666 Select an FTP site as the installation media.
669 .Bl -tag -width indent
671 The name of the host being installed (non-optional).
673 The domain name of the host being installed (optional).
675 The default router for this host (non-optional).
677 Which host interface to use
684 If set, bring up the interactive network setup form even
685 if all relevant configuration variables are already set (optional).
687 The IP address for the selected host interface (non-optional).
689 The netmask for the selected host interface (non-optional).
691 The fully qualified URL of the FTP site containing the
693 distribution you are interested in, e.g.\&
694 .Ar ftp://ftp.FreeBSD.org/pub/FreeBSD/ .
696 .It mediaSetFTPActive
699 using "active" FTP transfer mode.
704 .It mediaSetFTPPassive
707 using "passive" FTP transfer mode.
721 .Bl -tag -width indent
723 The proxy to use (host:port) (non-optional).
726 Select an existing UFS partition (mounted with the label editor) as
727 the installation media.
730 .Bl -tag -width indent
732 full /path to directory containing the
740 .Bl -tag -width indent
742 The name of the host being installed (non-optional).
744 The domain name of the host being installed (optional).
746 The default router for this host (non-optional).
748 Which host interface to use
755 If set, bring up the interactive network setup form even
756 if all relevant configuration variables are already set (optional).
758 The IP address for the selected host interface (non-optional).
760 The netmask for the selected host interface (non-optional).
762 full hostname:/path specification for directory containing
765 distribution you are interested in.
767 .It mediaSetFTPUserPass
770 .Bl -tag -width indent
772 The username to log in as on the ftp server site.
775 The password to use for this username on the ftp
779 .It mediaSetCPIOVerbosity
782 .Bl -tag -width indent
784 Can be used to set the verbosity of cpio extractions to low, medium or
788 Interactively get the user to specify some type of media.
793 Invoke the interactive options editor.
798 Try to fetch and add a package to the system (requires
799 that a media type be set),
802 .Bl -tag -width indent
804 The name of the package to add, e.g.\& bash-1.14.7 or ncftp-2.4.2.
807 Invoke the interactive group editor.
812 Invoke the interactive user editor.
817 Stop the script and terminate sysinstall.
822 Execute an arbitrary command with
826 .Bl -tag -width indent
828 The name of the command to execute.
830 from a boot floppy, very minimal expectations should
831 be made as to what is available until/unless a relatively
832 full system installation has just been done.
835 Configure a network device.
844 .Sh DISTRIBUTION MEDIA
845 The following files can be used to affect the operation of
847 when used during initial system installation.
848 .Bl -tag -width ".Pa packages/INDEX"
850 A text file of properties, listed one per line, that describe the
851 contents of the media in use.
852 The syntax for each line is simply
853 .Dq Ar property No = Ar value .
854 Currently, only the following properties are recognized.
855 .Bl -tag -width ".Va CD_MACHINE_ARCH"
857 This property should be set to the
859 version on the current
862 .Dq Li "CD_VERSION = 5.3" .
863 .It Va CD_MACHINE_ARCH
864 This property should be set to the architecture of the contents on
866 This property is normally only used with
868 products that contain
869 CDs for different architectures, to provide better error messages if
870 users try to install Alpha packages on an i386 machine.
872 .Dq Li "CD_MACHINE_ARCH = alpha" .
874 In a multi-volume collection (such as the
878 file on each disc should contain the full package index for the set.
879 The last field of the
881 file denotes which volume the package
884 property here defines the volume ID of the current disc.
886 .It Pa packages/INDEX
887 The package index file.
888 Each package is listed on a separate line with additional meta-data
889 such as the required dependencies.
890 This index is generated by
895 When multi-volume support is enabled, an additional field should be
896 added to each line indicating which media volume contains the given
900 For information about building a full release of
905 This utility may edit the contents of
910 as necessary to reflect changes in the network configuration.
912 If you have a reasonably complete source tree online, take
914 .Pa /usr/src/usr.sbin/sysinstall/install.cfg
915 for a sample installation script.
922 .An Jordan K. Hubbard Aq jkh@FreeBSD.org
924 Editing slice and partition tables on disks which are currently mounted by
925 the system is not allowed.
926 This is generally only a problem when
928 is run on a system that is already installed.
935 This utility is a prototype which lasted several years past
936 its expiration date and is greatly in need of death.