Enter ONIE bootloader without interacting with serial console


Hello,
I would like to be able to reboot my Quanta and Edgecore switches into ONIE mode, and provide an updated Cumulus Linux image via ONIE.

I would like to do this from remote without interaction with the serial console.

If this is possible I will write a Foreman patch to provision the switches with the operating system directly with Foreman.

At the moment I found that the only way to install a operating system image with ONIE, requires some interaction with the serial console of the switch. Any idea how to avoid that ?

thanks

7 replies

Userlevel 1
It's not possible to directly interact with the ONIE bootloader without using the serial console.

However, it is possible to install CL without using the serial console. When ONIE boots in install mode and gets a DHCP address, it will automatically attempt to discover a Cumulus Linux image. You can also have ONIE download a Zero-touch Provisioning script to automatically run after the installation.

In my configuration, my ISC DHCP server is configured as follows:
subnet 192.168.0.0 netmask 255.255.255.0 {
pool
{
range 192.168.0.100 192.168.0.200;
}

option subnet-mask 255.255.255.0;
option routers 192.168.0.1;
next-server 192.168.0.1;
option default-url ="http://192.168.0.1/onie-installer";
option cumulus-provision-url "http://192.168.0.1/provision.sh";
}
192.168.0.1 is my DHCP server and web server that hosts my Cumulus Linux image (named onie-installer) and my ZTP script (provision.sh).

To make your switch boot back into ONIE if it already has CL installed, you can run cl-img-select -i, which reboots and runs the provisioning process again.
Userlevel 3
In addition to what Barry says, you can also use the cl-img-select command to cause the next reboot of the system to go into ONIE rescue mode. Once in ONIE rescue mode you can ssh to the box and install the OS.

cl-img-select -rf
reboot

ssh
Userlevel 1
Scott Emery wrote:

In addition to what Barry says, you can also use the cl-img-select command to cause the next rebo...

What is the username/password of ONIE's SSH? I think I tried that once but never managed to get through.
Userlevel 3
Scott Emery wrote:

In addition to what Barry says, you can also use the cl-img-select command to cause the next rebo...

I used "root" as the user name and no password was required.
Userlevel 1
Scott Emery wrote:

In addition to what Barry says, you can also use the cl-img-select command to cause the next rebo...

You may also be able to telnet into the switch in without needing to enter credentials. (I haven't tried it in rescue mode specifically, but this worked the last time I deleted the installed images from a S3048 and booted it into ONIE install mode.)
Userlevel 1
Scott Emery wrote:

In addition to what Barry says, you can also use the cl-img-select command to cause the next rebo...

I just tried it and confirmed telnet is available in rescue mode as well.
cumulus@wbench:~$ telnet 192.168.0.105 Trying 192.168.0.105... Connected to 192.168.0.105. Escape character is '^]'.  To check the install status inspect /var/log/onie.log. Try this:  tail -f /var/log/onie.log  ** Rescue Mode Enabled ** ONIE:/ #
Userlevel 1
Actually you can login to the ONIE prompt without the serial console. This is by design so that folks do not need to use the serial console.

If you know the IP address of the mgmt Ethernet port (usually by looking at the DHCP leases on your DHCP server) you can use ssh or telnet to connect. There is no password.

For ssh: "ssh root@"
For telnet: "telnet "

However, interacting with the ONIE prompt is also not very fun, nor easy to automate. Echoing@Barry's comments, it is much better to automate OS installs following the ONIE quick start guide:

https://github.com/opencomputeproject/onie/wiki/Quick-Start-Guide

Reply