nstliveinst — NST script to customize the liveinst process.
nstliveinst [
-m
TEXT
| --mode TEXT
] [
-a
TEXT
| --anaconda-args TEXT
] [ --kickstart FILENAME
] [ --nuke TEXT
] [
-i
[true]|false
| --interactive [true]|false
] [
-f
[true]|false
| --firstboot [true]|false
] [ --passwd TEXT
] [ --desktop TEXT
] [ --server TEXT
] [ --server-baud INTEGER
] [ --xhost [true]|false
] [ --disallowtcp [true]|false
] [
-h
[true]|false
| --help [true]|false
] [
-H
[true]|false
| --help-long [true]|false
] [
-v
[true]|false
| --verbose [true]|false
] [ --version [true]|false
]
The nstliveinst command is used in a NST
distribution when you want to install the NST distribution onto a
hard disk after a "live" boot. This script has several modes of
operation which are selected via the: "--mode MODE"
command line argument.
Unless you are comfortable with the terms, "kickstart",
"liveinst", "%post", "chroot", and "anaconda", you should invoke this
script with a minimal number of command line arguments (you might want
to include "-i" and/or "--desktop
gnome").
This script invokes the anaconda installation utility during a installation. It is quite possible that your system will be rebooted after the installation. Make sure that you save all of your work prior to running this script.
Example 1. Minimum Interactive Graphical Install
The following example demonstrates how one would perform an installation with a minimal amount of human interaction. You will only need to decide on disk usage and partitioning.
[root@probe ~]# nstliveinst
Example 2. Interactive Graphical Install
To review all of the installation settings (go through all
of the anaconda panels), include
the "--interactive" (or
"-i" option) as shown in this example.
[root@probe ~]# nstliveinst -i
Example 3. Non-Interactive Install On Device: "/dev/sda" (Serial Console - NST Server)
The following scripts the entire installation (there will
be NO human interaction and the contents of disk
"/dev/sda" will be DESTROYED as the
entire disk will be used for the NST installation). The
"--server ttyS0" option was included to
enable a serial console on the system when it boots. This is
useful if installing the distribution from a serial console
onto a server where you plan to dedicate all of disk
"/dev/sda" to the NST distribution.
[root@probe ~]# nstliveinst -a " --cmdline" --nuke sda --server ttyS0
Example 4. VNC Interactive Remote Graphical Install
The anaconda installation utility supports many alternative installation methods. This example passes the "VNC" agrument to anaconda instructing it to startup a VNC server on display ":1". This allows one to complete the installation remotely by running a VNC viewer client and connecting to display ":1" on this NST system. The anaconda graphical installer will be presented. Complete the installation based on your desired need.
This example install also includes the desktop option
(--desktop) which will configure NST with a default
graphical desktop login (and GNOME will be
the default desktop manager). In
addition, TCP/IP connections will be
enabled to the X Window Server default
display running the GNOME Desktop
Manager. If X Window Server client access
is granted by using the xhost command,
then X Client Applications can be rendered
on the NST GNOME desktop.
[root@probe ~]# nstliveinst -a " --vnc" -i --desktop gnome --disallowtcp false
Example 5. VNC Connect Interactive Remote Graphical Install
This example passes the "VNC" and
"VNCCONNECT" agruments
to anaconda instructing it to
startup a VNC server on display ":1". Once
anaconda and
the VNC server has started, a connection to
a listening VNC client viewer on host:
"172.30.1.54", port:
"5500" will be made. (It is assumed that
a VNC client viewer is setup in
"listening" mode on host:
"172.30.1.54", port:
"5500" prior to starting the NST hard
disk installation.) This setup configuration allows one to
complete the installation by using the VNC
client viewer on the remote host:
"172.30.1.54". The anaconda
graphical installer will be presented. Complete the installation based
on your desired need.
A nice feature of this installation setup is that one could
execute the "nstliveinst" script from a serial
console and complete the NST hard disk installation
graphically. This example install also includes the desktop
option (--desktop) which will configure NST with a default
graphical desktop login (and Fluxbox will
be the default desktop manager). In
addition, TCP/IP connections will be
disabled to the X Window Server default
display running the Fluxbox Desktop
Manager. No X Window Server client access
can be granted since there will be
no TCP/IP connections allowed.
[root@probe ~]# nstliveinst -a " --vnc --vncconnect=172.30.1.54:5500" -i \
--desktop fluxbox --disallowtcp true
Example 6. Text Mode Install (Serial Console - NST Server)
This example uses anaconda's text mode for installation of NST. Interactive anaconda install mode, NST server mode (--server), console serial baud rate setting (--server-baud), and a preset NST password (--passwd) are also specified. Long argument format was also choosen for this example.
[root@probe ~]# nstliveinst --mode install --anaconda-args " --text" \
--interactive true --server ttyS0 --server-baud 57600 --password 'nst@123'
You will not be permitted to install the NST distribution to a disk which has a partition that is currently mounted.
The "install" mode of operation will
invoke the liveinst system command. This
will in turn start up anaconda to install
the NST distribution from the Live boot onto a hard disk. You may
want to include the: "--kickstart FILE" if you have
a custom kickstart file on the system which you would like to use
instead of the automatically generated option. If you don't include
the "--kickstart FILE" argument, then a kickstart
file will be generated for you (refer to the OPTIONS section for
additional command line options which can be used to adjust the values
in the generated kickstart file).
In addition, if you have some special installation needs,
you may also append additional anaconda
command line options using the: "--anaconda-args ' ARG0 ARG1
...'" command line argument. For example, if you want to
perform a text based installation, specify: "--anaconda-args
' --text'" (it is required that you quote and include a
leading space to the list of anaconda
arguments).
The "template" mode of operation is used
to generate a kickstart template file to the standard output
device. This can be a useful starting point if you want to create your
own custom kickstart file. Refer to the OPTIONS
section below for the various parameters which can be used to
adjust the template file generated.
The "post-chroot" mode of operation is
meant to be used within a %post section of a
kickstart file. This allows the script to do some post installation
configuration which is typically desired on a NST system after a
hard disk installation. You should NEVER run this mode of operation
directly from the command line (only from within a kickstart
file).
The "post-nochroot" mode of operation is
meant to be used within a "%post --nochroot"
section of a kickstart file. This allows the script to do some post
installation configuration which is typically desired on a NST
system after a hard disk installation. You should NEVER run this mode
of operation directly from the command line (only from within a
kickstart file).
The "post-update" mode of operation is
meant to be used after a major "update" of
an NST system. Currently, this mode will run
the nstpasswd command to reapply the administrative
password to all relavant applications that may have been updated. It
will next regenerate all NST menus for discovery of
any new applications that may have been
added. Finally, it will run all "NST Tweak" scripts
found in directory: "/etc/nst/tweaks" to complete
final adjustments. Follow any instructions prompted by this mode of
operation.
The "post-minimal" mode of operation is
meant to be used after an "NST Live Minimal" hard
disk installation followed by the "yum install
nst-live" RPM package install. It will
perform various post setup scripts to configure NST
as if one did the full "NST Live" hard disk
installation. Follow any instructions prompted by this mode of
operation.
The following command line options are available:
-m TEXT] | [--mode TEXT]
This option controls the mode of operation of the
script. If omitted, it defaults to "install". The
recognized modes of operation include: "install",
"template", "post-chroot",
"post-nochroot", "post-update" and
"post-minimal". See the script documentation for
more details about the various modes of operation and how they are
used.
-a TEXT] | [--anaconda-args TEXT]
This command line argument allows you to specify
command line argument(s) which should be passed
to anaconda when performing the
installation. This option may be omitted (in which case no extra
arguments will be passed to anaconda). Run
the command: "anaconda --help" to see a list of all
of the possible arguments. Some common choices are:
"--text", " --graphical",
"--serial" and " --cmdline". Do NOT
include the "--kickstart KS" option as this
argument is automatically appended by this script. ALSO, You MUST
QUOTE and include a LEADING SPACE when specifying your anaconda
arguments. For example: -a
" --text --serial".
--kickstart FILENAME]
By default, this option defaults to:
"AUTO", indicating that we should automatically
determine the kickstart configuration to use for the installation. If
you have your own custom kickstart file you would rather use, then you
may use this option to specify its fully qualified path.
--nuke TEXT]
If you want to use an entire hard disk for the
installation, you can use this option to specify the disk to be
used. For example, if you specify: "--nuke sda",
then ALL of the partitions found on: "/dev/sda"
will be removed, the disk will be re-partitioned and formatted. If you
omit this option, you will be able to customize your installation
using the standard anaconda interface. This
option is applicable in both the "--mode install"
and "--mode template" modes. The disk specified
must exist under "/dev".
-i [true]|false] | [--interactive [true]|false]
By default interactive mode is disabled. This means
that anaconda will skip installation panels
if there is sufficient information in the kickstart file. If you would
like to review ALL of the installation panels, include the:
"--interactive" option on the command line. This
option is applicable in both the "--mode install"
and "--mode template" modes.
-f [true]|false] | [--firstboot [true]|false]
By default, the kickstart file generated for the
installation will disable the "firstboot" stage of the installation
process. This means the system will skip the
normal anaconda post boot setup steps and
come up ready to use. If you would like to enable the post boot setup
stage, then include this command line argument. This option is
applicable in both the "--mode install" and
"--mode template" modes.
--passwd TEXT]
By default, this script will use the default
password of "nst2003" for the hard disk
installation. You may use this command line argument to specify a
different system password for the initial install. Alternatively, if
you use the "--interactive" command line option,
you will have the option of setting the root
account password while going through
the anaconda installation screens. It
should be noted that using this option invokes
the nstpasswd script during the installation stage
(which changes many passwords) whereas
the anaconda installation screen only
changes the password for the root account. This
option is applicable in both the "--mode install"
and "--mode template" modes (though it isn't
recommended that you use this in a template file you plan to keep
around).
--desktop TEXT]
You may use this argument to specify either:
"--desktop console" or "--desktop
gnome". If omitted, "console" will be
assumed and the system will boot in text mode. If you would like to
boot to a graphical desktop login, specify: "--desktop
gnome". This option is applicable in both the
"--mode install" and "--mode
template" modes (though it isn't recommended that you use
this in a template file you plan to keep around
permanently).
--server TEXT]
If you are installing the distribution to a
"server" and would like a serial console configured, you may
use this option to specify the serial device ID. For example,
if you wanted to use serial device "ttyS0",
you would specify "--server ttyS0" on the
command line. This option is applicable when included with
"--mode install".
--server-baud INTEGER]
You may use this argument to specify the baud rate
for the serial port when installing to a "server". If omitted, the
default value will be used (57600). Some common
baud rates
include: 9600, 19200, 38400, 57600,
and 11200. This option is applicable when included with
"--mode install". The minimum value permitted is 300.
--xhost [true]|false]
This option is provided as an aid to adding desktop
icons and menu launching commands. When specified, the command:
"xhost +" will be run prior to
launching anaconda and a "xhost
-" will be run at exit. This allows one to add a
menu item to the fluxbox window manager's
menu system. This option is applicable only in the "--mode
install" mode of operation.
--disallowtcp [true]|false]
This option is used to disable the
TCP/IP transport associated with the
X Window Server default display for the just
installed NST distribution. If disabled, the X Window
Server will not bind a
TCP/IP port (Typically Port: 6000) to its
process, thus not allowing a TCP/IP
connection to be established. For example, one would not be able
to render the display of an X Client
Application to this X Window
Server. Set this option to: "false"
to allow for TCP/IP connections to
the X Window Server default display. This
option actually inserts the variable
"DisallowTCP" in the file:
"/etc/gdm/custom.conf" and sets it value
accordingly.
-h [true]|false] | [--help [true]|false]
When this option is specified, nstliveinst will display a short one line description of nstliveinst, followed by a short description of each of the supported command line options. After displaying this information nstliveinst will terminate.
-H [true]|false] | [--help-long [true]|false]
This option will attempt to pull up additional
nstliveinst documentation within a text based
web browser. You can force which browser we use setting the
environment variable TEXTBROWSER, otherwise,
we will search for some common ones.
-v [true]|false] | [--verbose [true]|false]
When you set this option to true, nstliveinst will produce additional output. This is typically used for diagnostic purposes to help track down when things go wrong.
--version [true]|false]
If this option is specified, the version number of the script is displayed.