ONIE provides an environment for a network operating system (NOS) to perform system provisioning and maintainance operations, including:
This environment forms an interface between ONIE and the NOS.
ONIE puts a small number of requirements on the NOS installer.
First, the installer must update the boot environment so that the NOS boots at the next reboot.
How this is done depends on the specific CPU architecture. See these sections for the corresponding CPU architectures:
Second, at the conclusion of a successful NOS install, the install
should call onie-nos-mode -s
. This allows ONIE to be more “user
friendly” on subsequent boots. See onie-nos-mode.
Other than that, the NOS installer can do whatever is necessary to persistently install the operating system into the hardware; the installer has a lot of flexibility.
Some examples of what an installer could do:
Within the running ONIE context, an installer often needs to know
various information about the running system. ONIE provides the
onie-sysinfo
command for this purpose.
For details, see onie-sysinfo.
From the running NOS, it is possible to instruct ONIE to return to the initial discovery and installation phase. This could be used to reinstall the current NOS or to install a different NOS.
How to invoke the install operation depends on the specific CPU architecture. See these sections for the corresponding CPU architectures:
ONIE has an uninstall operation that wipes out the unused portions of the attached mass storage devices (like an mSATA card or USB NAND flash). The only thing untouched is ONIE itself. This is a “reset to factory defaults”-like operation.
How to invoke the uninstall operation depends on the specific CPU architecture. See these sections for the corresponding CPU architectures:
Following the uninstall process, the system returns to the discovery and installation phase.
ONIE provides a rescue and recovery mode, which is useful mostly during development, but is potentially useful when trying to recover a broken system.
The rescue mode is the same as the discovery and installation phase, but the discovery mechanism is disabled. ONIE does not try to locate and install an image; it simply sits there allowing you to troubleshoot the system.
In this mode you can connect to ONIE via the serial console or via telnet. You can use the available BusyBox tools to try and fix a problem. Or use wget to download more tools and files.
A few useful commands included with ONIE are:
onie-nos-install
– It takes one argument, a URL to a NOS installer. This
command downloads and installs from the URL, just as if it had been
discovered.onie-self-update
– It takes a URL to an ONIE updater image.
This command downloads and runs the updater, just as if it had been
discovered. See the Updating ONIE section for more about
updating ONIE.onie-discovery-stop
– Stop the discovery process. This can be
useful in debugging cases where the discovery process is interfering
with the debug. With the discovery process disabled the system is
quiet and you can poke around.How to invoke the rescue operation depends on the specific CPU architecture. See these sections for the corresponding CPU architectures:
ONIE provides a way to update itself, including the boot loader and Linux kernel. In many ways, this behaves similarly to the discovery and installation phase, except that ONIE is looking for a different kind of image.
The update operation comes in two flavors: update
and embed
.
The update
operation will upgrade ONIE and is not destructive
to the currently installed NOS.
The embed
operation, on the other hand, is destructive. This
operation will wipe out everything (including any installed NOS) and
install a new version of ONIE.
Note
At this time, the embed
operation is available only on the x86
platform.
For more details on the update
and embed
operations see
x86 Updating and Embedding ONIE and U-Boot platform Updating and Embedding ONIE for the
corresponding CPU architectures.
See the Updating ONIE section for more about updating ONIE.
How to invoke the update
and embed
operations depends on the
specific CPU architecture. See these sections for the corresponding
CPU architectures: