System Bootstrap

Introduction

How a system boots is important to how it will actively operate. This document presents available options that govern system bootstrap.

SD-card and USB memory sticks are supported external storage types. Availability depends on the product make and model, not all products support all tupes of media.

The SD-card has higher priority than USB memory sticks. Meaning, if both an SD-card and a USB memory stick is present, the SD-card will be used.

Note: SD-cards must to be inserted before boot to be detected. Hot-plugging is not supported. USB memory sticks have hot-plug support and will be made available to the system, provided no SD-card is present.

For example use-cases see:

Configuration

This is the top level configuration in the boot context.

example:/#> boot
example:/boot/#>
[no] config-sync

Enable automatic sync of configuration and certificates from external media to built-in flash before system bootstrap commences.

With this feature the system can be set up to always copy files from an external media, e.g. a USB stick, to built-in flash before the system proceeds to boot up with built-in flash. I.e., the USB stick would only need to be inserted once at deployment.

Default: Disabled.

no
Disable the automatic sync.
[no] config-order [MEDIA:TYPE] [, MEDIA:TYPE [, ...]]

Define the system boot configuration order. At startup the config-order is traversed in order, the first config option to be successfully applied will be used.

The config-order is specified with a media and file/mode to use. Multiple options can be specified. The specified media is what the system will attempt to mount when bootstrapping the system.

Note: If ext is used, the configuration files must be located on the external media. It will not use any builtin default files in the same manner as a int configuration would.

If no more options exist, the config-fallback will be used.

Default: int:startup.

example:/boot/#> config-order ext:startup, int:startup

no
Reset to the default config-order : int:startup.
MEDIA

int : Internal media (e.g. Flash).

ext : External meida (e.g. USB, SD-Card).

TYPE

startup : Boot using the standard startup config.

none : Boot to no config mode, a blank configuration state.

safe : Boot to safe config mode, a configuration that should make the device accessible and recoverable.

net : Boot using configuration file obtained over the net (e.g. DHCP, BOOTP).

[no] config-fallback [reboot|failsafe|none]

Specify the fallback option to config-order. The configured action is taken only if the above config-order fails. Should this happen an alarm is also triggered in the system.

Default: failsafe.

no
Reset to the default fallback, safe.
reboot
The device will restart.
failsafe
The device will boot with a safe configuration and an alarm will be triggered, indicating that the system booted on its fallback.
none
The device will boot with a no (blank) configuration and an alarm will be triggered, indicating that the system booted on its fallback.
[no|show] media internal|external

Enter a configuration context for the selected media type.

no
Resets all media configuration options to their defaults.
internal
Internal media (e.g. flash) specific settings.
external
External media (e.g. USB, SD-Card) specific settings.
[no|show] net

Enter a sub-configuration context handling net boot configuration options.

no
Resets all net specific settings to its defaults.
[no|show] loader

Enter the configuration context for the boot-loader, reset boot-loader settings to default, or show current settings.

no
Resets all boot-loader settings.

Internal Media Settings

Internal media configuration is a sub-context in the boot configuration.

example:/#> boot
example:/boot/#> media internal
example:/boot/media-int/#>
[no] read-only

Enable, or disable read-only mode.

Default: Disabled.

no
Disables read-only.

External Media Settings

External media configuration is a sub-context in the boot configuration.

example:/#> boot
example:/boot/#> media external
example:/boot/media-ext/#>
[no] read-only

Enable, or disable read-only mode.

Default: Disabled.

no
Disables read-only.
[no] timeout [1-60]

Set the media timeout, how long to wait for external media to “wake up” at power-on. Some USB stick controllers can take up to 30 sec. to start up.

Default: 30 seconds.

no
Resets the timeout to its default, 30 seconds.

Net Settings

Net configuration is a sub-context in the boot configuration.

example:/#> boot
example:/boot/#> net
example:/boot/net/#>
[no] sync

Sync the obtained net config to the startup of the selected media.

The media (int, ext) that the config will be synced to is determined by how net have been configured in the config-order. If it is configured:

  • net -> Internal startup.
  • int:net -> Internal startup.
  • ext:net -> External (usb, sd-card) startup.

Default: Disabled.

no
Disable sync.
[no] mode [dhcp]

Net boot mode to use if configured in the config-order.

Default: dhcp.

no
Resets to its default.
dhcp
Use DHCP option 66 and 67 to retrieve server location and the name of the configuration file to download and apply.
[no] timeout [0|1-2147483647]

Timeout, in seconds, for how long to attempt a net boot. When the timer expires, the next option in the config-order will be attempted.

If the timeout is set to 0, the timeout will be infinite.

Default: 300.

no
Reset to the default value.
[no] clientid [STRING]

Client ID to be used in the DHCP Discover message. This can be used to specify to the DHCP server any specific configuration file that this device wants.

Default: None.

no
Remove any configured Client ID.
STRING
A free form string, with a maximum length of 64 characters.
[no] password [STRING]

A password may be used to secure login during net boot when the console is accessible.

If left blank the net boot password will be the factory defaults until a the user configuration is recieved.

Default: None.

no
Remove any configured Password
STRING
A free form string, with a maximum length of 64 characters.

Boot-loader Settings

Boot-loader configuration is a sub-context in the boot configuration.

example:/#> boot
example:/boot/#> loader
example:/boot/loader/#>
[no] login password|hash STRING

Set the bootloader password.

no
Disable password.
STRING
The string representation of the password.
[no] rescue-address IPADDR

Set the rescue mode (netconsole) IP address.

Parameters

no
Reset the setting to its default value, 192.168.2.200.
IPADDR
IP address in standard quad-dotted notation, e.g. 192.168.1.1.
[no] rescue-netmask NETMASK

Set the rescue mode (netconsole) netmask.

no
Reset the setting to its default value, 225.255.255.0.
NETMASK
Size of the net in quad-dotted format, e.g. 255.255.255.0.
[no] rescue-port PORT

Set the rescue mode (netconsole) UDP port.

no
Reset the setting to its default value, 6000.
PORT
Port number in range 1-65535.
[no] rescue-peer IPADDR

Set the rescue mode (netconsole) peer IP.

no
Reset the setting to its default value, 192.168.2.1.
IPADDR
IP address in standard quad-dotted notation, e.g. 192.168.1.1.

Status

The currently configured boot settings can be viewed form the top level in the CLI:

example:/#> show boot
Bootstrap Configuration                                                       
Config-sync     : Disabled
Config-order    : int:net, int:startup
Config-fallback : failsafe

Media Configuration                                                           
Internal
    Read-only   : Disabled

External
    Read-only   : Disabled
    Timeout     : 30

Net Configuration                                                             
Sync            : Disabled
Timeout         : 300
Mode            : dhcp
Client ID       :

Bootloader Configuration                                                      
Login Password  : Disabled

Rescue Mode
    Address     : 192.168.2.200
    Netmask     : 255.255.255.0
    Peer        : 192.168.2.1
    Port        : 6000