Skip to content

[initramfs]: SSD firmware upgrade in initramfs#10748

Merged
sujinmkang merged 1 commit intosonic-net:masterfrom
ArunSaravananBalachandran:ssd_initramfs
May 12, 2022
Merged

[initramfs]: SSD firmware upgrade in initramfs#10748
sujinmkang merged 1 commit intosonic-net:masterfrom
ArunSaravananBalachandran:ssd_initramfs

Conversation

@ArunSaravananBalachandran
Copy link
Contributor

@ArunSaravananBalachandran ArunSaravananBalachandran commented May 5, 2022

Why I did it

To upgrade SSD firmware in initramfs while rebooting from SONiC to SONiC and during NOS to SONiC migration.

How I did it

  • New option 'ssd-upgrader-part’ is introduced in grub command line, to indicate the partition and its filesystem type in which the SSD firmware updater is present. ‘ssd-upgrader-part’ syntax is ssd-upgrader-part=<partition>,<filesystem type>. Example: ssd-upgrader-part=/dev/sda8,ext4

  • A new initramfs script ‘ssd-upgrade’ is included in init-premount and it invokes the SSD firmware updater (ssd-fw-upgrade) present in the partition indicated by the boot option 'ssd-upgrader-part'

How to verify it

  1. In SONiC, the SSD firmware updater is copied to “/host/” directory.
  2. Fast-reboot is to be initiated with the ‘-u’ option ([scripts/fast-reboot] Add option to include ssd-upgrader-part boot option with SONiC partition sonic-utilities#2150)
  3. After reboot, while booting into SONiC the SSD firmware updater will be executed in initramfs.

UT logs: Dell_S6100_SSD_upgrade_in_initramfs_logs.txt

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

[initramfs]: SSD firmware upgrade in initramfs

Link to config_db schema for YANG module changes

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

# remove nos-config-part from cmdline
sed -r -i.bak "s/nos-config-part=[^[:space:]]+//" /host/grub/grub.cfg

# remove ssd-upgrader-part from cmdline
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please add a comment here to show what exactly the string replacement is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this command, the ssd-upgrader-part option is completely removed from the command line (replaced with an empty string) similar to nos-config-part.
Please let me know if the comment has to updated with 'empty string' in place of 'remove'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, current comment matches the ode, then I am fine with it.

sujinmkang pushed a commit to sonic-net/sonic-utilities that referenced this pull request May 12, 2022
…tion with SONiC partition (#2150)

What I did
Add new option "-u" in ‘fast-reboot’ script, to add the “ssd-upgrader-part” boot option with SONiC partition and filesystem type.
Required by: sonic-net/sonic-buildimage#10748

How I did it
Included a new option "-u" in fast-reboot script.
If the option '-u' is specified, add "ssd-upgrader-part" with the SONiC partition and filesystem to the boot options to be used with kexec.
@sujinmkang sujinmkang merged commit f4b22f6 into sonic-net:master May 12, 2022
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
…tion with SONiC partition (#2150)

What I did
Add new option "-u" in ‘fast-reboot’ script, to add the “ssd-upgrader-part” boot option with SONiC partition and filesystem type.
Required by: sonic-net/sonic-buildimage#10748

How I did it
Included a new option "-u" in fast-reboot script.
If the option '-u' is specified, add "ssd-upgrader-part" with the SONiC partition and filesystem to the boot options to be used with kexec.
@ArunSaravananBalachandran ArunSaravananBalachandran deleted the ssd_initramfs branch December 8, 2023 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants