Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DellEMC: utility to set onie modes from NOS #3860

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

srideepDell
Copy link
Contributor

This common utility would set next boot option as onie mode and
when reboot is triggered it would reboot the box into that specific onie mode.

Current support modes are rescue/install/uninstall

- What I did

- How I did it

A new script added to DellEMC platforms which could support in setting onie modes from NOS and reboot into the mode once. This could help in installing NOS, firmware update etc. Helpful in automation with out any manual intervention.

- How to verify it

verified on DellEMC platforms.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

This common utility would set next boot option as onie mode and
when reboot is triggered it would reboot the box into that specific onie mode.

Current support modes are rescue/install/uninstall
@srideepDell
Copy link
Contributor Author

testing results

root@sonic:/# onie_mode_set -o rescue
next boot mode set to onie - rescue
root@sonic:/# onie_mode_set -o install
next boot mode set to onie - install
root@sonic:/# vim /usr/bin/onie_mode_set
root@sonic:/# onie_mode_set -o rescue
next boot mode set to onie - rescue
root@sonic:/#
root@sonic:/#reboot

...
...
Booting into ONIE rescue mode

Booting `ONIE: Rescue'

ONIE: Rescue Mode ...
Version : 3.42.1.9-5
Build Date: 2018-07-02T20:56-0700
Info: Mounting kernel filesystems... done.
[ 4.816838] random: fast init done
Info: Mounting ONIE-BOOT on /mnt/onie-boot ...
Info: Mounting EFI System on /boot/efi ...
Info: Using eth0 MAC address: 50:9a:4c:d3:86:70
Info: eth0: Checking link... up.
Info: Trying DHCPv4 on interface: eth0
Warning: Unable to configure interface using DHCPv4: eth0
ONIE: Using link-local IPv4 addr: eth0: 169.254.44.155/16

Starting: dropbear ssh daemon... done.
Starting: telnetd... done.
discover: Rescue mode detected. Installer disabled.

Please press Enter to activate this console.
To check the install status inspect /var/log/onie.log.
Try this: tail -f /var/log/onie.log

** Rescue Mode Enabled **
ONIE:/ #
ONIE:/ #
ONIE:/ # reboot

After reboot from ONIE. system falls back to SONiC NOS

@srideepDell srideepDell marked this pull request as ready for review December 9, 2019 22:21
@lguohan lguohan merged commit dd32227 into sonic-net:master Dec 10, 2019
@srideepDell srideepDell deleted the onie-reboot-mode branch December 2, 2020 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants