Skip to content

DellEMC: utility to set onie modes from NOS#3860

Merged
lguohan merged 1 commit intosonic-net:masterfrom
srideepDell:onie-reboot-mode
Dec 10, 2019
Merged

DellEMC: utility to set onie modes from NOS#3860
lguohan merged 1 commit intosonic-net:masterfrom
srideepDell:onie-reboot-mode

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
mssonicbld added a commit that referenced this pull request Jul 23, 2025
…atically (#22686)

#### Why I did it
src/sonic-utilities
```
* e18640e - (HEAD -> master, origin/master, origin/HEAD) Switchport mode update for 'show interfaces status' (#3788) (3 hours ago) [Shivashankar C R]
* 809646a - Revert "Addition of prober_type in config and show commands for muxcable (#3884)" (#3979) (17 hours ago) [Xin Wang]
* 3db35d5 - `vnet_route_check.py` should not report VNET routes in APP DB but not in STATE DB and ASIC DB as mismatches (#3990) (26 hours ago) [mramezani95]
* 8647356 - [show][config][plugin] add processing of ModuleNotFoundError with log_warning (#3832) (32 hours ago) [Maksym Kovalchuk]
* 20976de - fix show bgp cli on multiple asic device (#3981) (5 days ago) [Liping Xu]
* 46c82ab - [db_migrator] Fix parse_xml fails when minigraph has SonicQosProfile (#3972) (6 days ago) [Xin Wang]
* 1c3f789 - Fix route_check.py to ignore local p2p IP prefixes (#3882) (7 days ago) [prabhataravind]
* 898a037 - Make 'show interface errors' lookup the correct oper_error_status count published by OA (#3956) (8 days ago) [Bobby McGonigle]
* eda6ada - [sonic-package-manager] Save tag that was used to install the application (#3917) (8 days ago) [DavidZagury]
* c409594 - [SPM] Add support for configuring systemd service Type in package manifests (#3946) (8 days ago) [DavidZagury]
* 09b4292 - [trim]: Add Packet Trimming Asym DSCP CLI (#3920) (9 days ago) [Nazarii Hnydyn]
* f751730 - Lodoga-Prime: lodogaprime platform support (#3954) (13 days ago) [NobutomoNakano]
* 0424ae0 - Add GCU Support for SKU Mellanox-SN4280-C48/O8C40/O8V40 (#3964) (13 days ago) [Sai Rama Mohan Reddy S]
* 57b9846 - fix issue #22476 remove quagga in show bgp cmd (#3947) (2 weeks ago) [Liping Xu]
* 5d11fc5 - Fix comparison error when replace (#3941) (3 weeks ago) [jingwenxie]
* f6d6d9a - Fix for 22138: Chassisd does not wait for the execution to complete for previous admin state change requests - Replaces PR: #3845 (#3937) (4 weeks ago) [rameshraghupathy]
* be72304 - [YANG] remove uses clause handling, now part of sonic-yang-mgmt (#3814) (4 weeks ago) [Brad House]
* 19a6b3c - Switch to using chrony instead of ntpd : gcu - services_validator.py (#3929) (4 weeks ago) [Anukul Verma]
* 5db9c27 - Fixed cli command for ECN config on voq switch (#3928) (4 weeks ago) [saksarav-nokia]
* 020f9d0 - Improved GCU's field validation logic for the WRED_PROFILE table (#3910) (4 weeks ago) [mramezani95]
* f15e2d0 - feat: support specific BP port info for show int (#3926) (4 weeks ago) [Chenyang Wang]
* 5a59f19 - [multi-asic] Fix the 'config reload' flow in case when multiple golden_config.json files provided (#3895) (5 weeks ago) [Vadym Hlushko]
* 82ec8f4 - fix show cmd for bgp (#3922) (5 weeks ago) [Liping Xu]
* e0f9da4 - Skip checking offload flags for static routes/sids in route check and add check_sids (#3919) (5 weeks ago) [Changrong Wu]
* 5ea861d - [copp]: Added CoPP show configuration commands (#3863) (6 weeks ago) [Ravi Minnikanti(Marvell)]
* 9fd8c3c - [sfputil] Use host lane mask as part of rx-output enable/disable (#3911) (6 weeks ago) [mihirpat1]
* 3e157a2 - Support reboot cause: Kernel Panic - Out of memory (#3918) (6 weeks ago) [byu343]
* 49d36ff - [gcu]: Add marvell-teralynx platform to gcu field validator (#3881) (6 weeks ago) [Ravi Minnikanti(Marvell)]
* 8415aee - [Mellanox] Collect sai.xml to sysdump (#3903) (6 weeks ago) [Sai Rama Mohan Reddy S]
* 6e26c8d - [intfstat] Align output format between cached/non-cached scenarios (#3902) (6 weeks ago) [Yair Raviv]
* 57d825e - Add version_202411_02 function (#3864) (6 weeks ago) [Ben Levi]
* d5051cd - [Smartswitch][reboot] Addition of pre shutdown and post startup function calls (#3900) (7 weeks ago) [Gagan Punathil Ellath]
* b3509b9 - Add CLI show commands to view bgp network, neighbors and summary on per-vrf basis (#3866) (7 weeks ago) [Navdha Jindal]
* dfa51d3 - Upgrade portstat to support nonzero option and sort heterogeneous interfaces names (#3894) (7 weeks ago) [Changrong Wu]
* ba255b6 - Issue #22407: ConfigReload fails when RADIUS statistics is enabled (#3860) (8 weeks ago) [Anders Linn]
* 7116edf - Fix warm-reboot script so it can be run via reboot DBus service (#3872) (8 weeks ago) [jkmar]
* 2f1c4e0 - config: Modify AAA config commands to use pass_db decorator (#3755) (8 weeks ago) [Anders Linn]
* d6d866f - show command for icmp echo offload sessions (#3889) (8 weeks ago) [manamand2020]
* 1b3498c - add TH5-512 hwsku into gcu support list (#3896) (8 weeks ago) [Dashuai Zhang]
* b106a82 - Addition of prober_type in config and show commands for muxcable (#3884) (9 weeks ago) [harjotsinghpawra]
* 733bdde - [smartswitch] Fix incorrect reboot status check and improve debug logging in reboot scripts (#3888) (9 weeks ago) [Vasundhara Volam]
* 60110fa - feat: support namespace arg for show mac (#3873) (9 weeks ago) [Chenyang Wang]
* aeba823 - feat: support namespace arg for show bfd (#3885) (9 weeks ago) [Chenyang Wang]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this pull request Nov 12, 2025
…lly (#24420)

#### Why I did it
src/sonic-swss
```
* 50544954 - (HEAD -> master, origin/master, origin/HEAD) With ZMQ enabled between fpmsyncd to orchagent, default routes are se… (#3979) (34 minutes ago) [venkit-nexthop]
* 6b976e94 - [swss] Support FIPS MACSec POST (#3836) (4 hours ago) [Song Yuan]
* d0b25613 - [fpmsyncd]: Fix SRv6 SID List sharing among prefixes (#3860) (6 hours ago) [Carmine Scarpitta]
* 98198d08 - [Mellanox] Update buffer calculation for platform SN6600 (#3948) (3 days ago) [Jianyue Wu]
* 0e1558e3 - [mclag]: Added marvell-teralynx to port isolation grp support list (#3946) (8 days ago) [Ravi Minnikanti(Marvell)]
```
#### How I did it
#### How to verify it
#### Description for the changelog
ashutosh-agrawal pushed a commit to AnantKishorSharma/sonic-buildimage that referenced this pull request Nov 30, 2025
…lly (sonic-net#24420)

#### Why I did it
src/sonic-swss
```
* 50544954 - (HEAD -> master, origin/master, origin/HEAD) With ZMQ enabled between fpmsyncd to orchagent, default routes are se… (sonic-net#3979) (34 minutes ago) [venkit-nexthop]
* 6b976e94 - [swss] Support FIPS MACSec POST (sonic-net#3836) (4 hours ago) [Song Yuan]
* d0b25613 - [fpmsyncd]: Fix SRv6 SID List sharing among prefixes (sonic-net#3860) (6 hours ago) [Carmine Scarpitta]
* 98198d08 - [Mellanox] Update buffer calculation for platform SN6600 (sonic-net#3948) (3 days ago) [Jianyue Wu]
* 0e1558e3 - [mclag]: Added marvell-teralynx to port isolation grp support list (sonic-net#3946) (8 days ago) [Ravi Minnikanti(Marvell)]
```
#### How I did it
#### How to verify it
#### Description for the changelog
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Dec 4, 2025
…lly (sonic-net#24420)

#### Why I did it
src/sonic-swss
```
* 50544954 - (HEAD -> master, origin/master, origin/HEAD) With ZMQ enabled between fpmsyncd to orchagent, default routes are se… (sonic-net#3979) (34 minutes ago) [venkit-nexthop]
* 6b976e94 - [swss] Support FIPS MACSec POST (sonic-net#3836) (4 hours ago) [Song Yuan]
* d0b25613 - [fpmsyncd]: Fix SRv6 SID List sharing among prefixes (sonic-net#3860) (6 hours ago) [Carmine Scarpitta]
* 98198d08 - [Mellanox] Update buffer calculation for platform SN6600 (sonic-net#3948) (3 days ago) [Jianyue Wu]
* 0e1558e3 - [mclag]: Added marvell-teralynx to port isolation grp support list (sonic-net#3946) (8 days ago) [Ravi Minnikanti(Marvell)]
```
#### How I did it
#### How to verify it
#### Description for the changelog

Signed-off-by: Feng Pan <[email protected]>
xwjiang-ms pushed a commit to xwjiang-ms/sonic-buildimage that referenced this pull request Dec 22, 2025
…lly (sonic-net#24420)

#### Why I did it
src/sonic-swss
```
* 50544954 - (HEAD -> master, origin/master, origin/HEAD) With ZMQ enabled between fpmsyncd to orchagent, default routes are se… (sonic-net#3979) (34 minutes ago) [venkit-nexthop]
* 6b976e94 - [swss] Support FIPS MACSec POST (sonic-net#3836) (4 hours ago) [Song Yuan]
* d0b25613 - [fpmsyncd]: Fix SRv6 SID List sharing among prefixes (sonic-net#3860) (6 hours ago) [Carmine Scarpitta]
* 98198d08 - [Mellanox] Update buffer calculation for platform SN6600 (sonic-net#3948) (3 days ago) [Jianyue Wu]
* 0e1558e3 - [mclag]: Added marvell-teralynx to port isolation grp support list (sonic-net#3946) (8 days ago) [Ravi Minnikanti(Marvell)]
```
#### How I did it
#### How to verify it
#### Description for the changelog

Signed-off-by: xiaweijiang <[email protected]>
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