Install, Upgrade, and Recover SONiC
This section describes how to install, upgrade, and recover Open Network Install Environment (ONIE) and SONiC on the Juniper Networks’ PTX10008 router. Open Network Installation Environment (ONIE) is an open source installation environment for installing and booting all the software components.
The Juniper Networks’ PTX10008 router is shipped with SONiC images pre-installed.
The SONiC installation and recovery process on PTX10008 router are the same and the installation results in clean installation, which means all the prior configurations are removed, including that of the network management port. Access to the console port is required before beginning the installation and recovery process.
For SKUs supporting SONiC, see the PTX10008 Packet Transport Router datasheet at https://www.juniper.net/us/en/products-services/routing/ptx-series/ptx10000/.
Install SONiC on PTX10008 Router
This section describes how to install SONiC on the Juniper Networks’ PTX10008 router.
The install, upgrade, and recovery of SONiC happens in the Primary SSD, as defined by the BIOS.
To install SONiC on the Juniper Networks’ PTX10008 router, you need to:
- Download the install image juniper-sonic-ptx10k-media-usb-<version>.img (for example juniper-sonic-ptx10k-media-usb-201911-R1.7.img), from https://support.juniper.net/support/downloads/?p=ptx10008 by selecting the operating system as SONiC.
Note The juniper-sonic-ptx10k-media-usb-<version>.img image installs both ONIE and SONiC on the PTX10008 router.
Note This installation procedure uses the 201911-R1.7 version as an example. If you are installing any subsequent releases, only the Sonic version string is different, for example, 202106-R1 in the image path and the outputs.
- Copy the juniper-sonic-ptx10k-media-usb-<version>.img install image to a USB memory drive and then insert the USB memory drive to the router’s USB port.
- Power on the router and access the console.
$ telnet console-port Trying 10.9.187.145... Connected to console-port. Escape character is '^]'. +----------------------------------------------------------------------------+ Booting from Flash A FPGA Reset Reason = 0x80 Primary BIOS version CBEP_P_VAL1_00.15.01 Total Memory Size = 64GB Checking Primary BIOS code integrity...Passed! ME is in normal operational state Press Esc for boot options ME is in normal operational state
- Go to the boot options in the BIOS configuration by pressing the Esc key, as displayed in the console screen.
- Select Setup Utility option from menu.
Enter Select SubMenu > Continue > Boot Manager > Device Management > Setup Utility > Administer Secure Boot
- Select Boot from the Setup Utility menu.
Go to Setup Utility. InsydeH2O Setup Utility Rev. 5.0 Main Advanced Security Power >Boot Exit
- Select UEFI Boot Order option from the InsydeH20 Setup Utility menu.
InsydeH2O Setup Utility Rev. 5.0 Main Advanced Security Power >Boot Exit Quick Boot Enabled Quiet Boot Enabled Network Stack Enabled PXE Boot capability UEFI:IPv4 Power Up In Standby Disabled Add Boot Options Auto ACPI Selection Acpi5.0 USB Boot Enabled UEFI OS Fast Boot Enabled USB Hot Key Support Disabled Timeout 5 Automatic Failover Enabled Juniper Boot Mode UEFI Boot Order >EFI
- Press F10 to exit and save the changes.
- Select Boot Manager option from the menu and
then select USB media for boot.
Secure boot is not enforced Welcome to GRUB! GNU GRUB version 2.02 +----------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line. +----------------------------------------------------------------------------+ ONIE: Rescue *ONIE: Embed ONIE ONIE: Embedding ONIE ...
- Select ONIE: Embed ONIE option to proceed with
ONIE boot.
Platform : x86_64-juniper_ptx10k-r0 Version : 2020.02.0.1-dirty Build Date: 2020-02-25T15:12+00:00 Info: Mounting kernel filesystems... done. Info: Mounting ONIE-BOOT on /mnt/onie-boot ... Info: Mounting EFI System on /boot/efi … […] ONIE: Build Date : 2020-02-25T15:12+00:00 Installing ONIE on: /dev/sda ONIE: Success: Firmware update URL: file:///lib/onie/onie-updater ONIE: Success: Firmware update version: 2020.02.0.1-dirty ONIE: Rebooting... discover: ONIE embed mode detected. Stopping: discover...start-stop-daemon: warning: killing process 1300: No such process done. Stopping: dropbear ssh daemon... done. Stopping: telnetd... done. Stopping: klogd... done. Stopping: syslogd... done. Info: Unmounting kernel filesystems umount: can't unmount /: Invalid argument The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system reboot reboot: Restarting system +----------------------------------------------------------------------------+ Booting from Flash A FPGA Reset Reason = 0x1 Primary BIOS version CBEP_P_VAL1_00.15.01 Total Memory Size = 64GB Checking Primary BIOS code integrity...Passed! Press Esc for boot options ME is in normal operational state […] Booting ONIE: Open Network Install Environment... Secure boot is not enforced Welcome to GRUB! GNU GRUB version 2.02 +----------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line. *ONIE: Install OS <--- Select this option, or wait 5 seconds ONIE: Rescue ONIE: Uninstall OS ONIE: Update ONIE
- After ONIE boots up, select ONIE: Install OS to install ONIE. After ONIE is installed, the ONIE installer proceeds
to install SONiC operating system.
Platform : x86_64-juniper_ptx10k-r0 Version : 2020.02.0.1-dirty Build Date: 2020-02-25T15:12+00:00 Linux version 4.9.95-onie+ (build@e587f490cd3e) (gcc version 6.3.0 (crosstool-NG 25ed25f - ONIE-2020.02.0.1-dirty) ) #1 SMP Tue Feb 25 16:17:49 UTC 2020 Command line: BOOT_IMAGE=/onie/vmlinuz-4.9.95-onie console=tty0 console=ttyS0,9600n8 boot_reason=install KERNEL supported cpus: Intel GenuineIntel AMD AuthenticAMD Info: BIOS mode: UEFI Info: Making NOS install boot mode persistent. Info: Using eth0 MAC address: 94:f7:ad:ce:c0:20 Info: Using eth1 MAC address: 94:f7:ad:ce:c0:21 Info: Using eth2 MAC address: 94:f7:ad:ce:c0:22 Info: Using eth3 MAC address: 94:f7:ad:ce:c0:23 Info: eth0: Checking link... down. ONIE: eth0: link down. Skipping configuration. Info: eth1: Checking link... up. Info: Trying DHCPv4 on interface: eth1 ONIE: Using DHCPv4 addr: eth1: 10.9.168.253 / 255.255.255.0 Info: eth2: Checking link... down. ONIE: eth2: link down. Skipping configuration. Info: eth3: Checking link... down. ONIE: eth3: link down. Skipping configuration. ONIE: Failed to configure eth0 interface ONIE: Failed to configure eth2 interface ONIE: Failed to configure eth3 interface Starting: klogd... done. Starting: dropbear ssh daemon... done. Starting: telnetd... done. discover: installer mode detected. Running installer. Starting: discover... done. Please press Enter to activate this console. Info: eth0: Checking link... down. ONIE: eth0: link down. Skipping configuration. Info: eth1: Checking link... up. Info: Trying DHCPv4 on interface: eth1 ONIE: Using DHCPv4 addr: eth1: 10.9.168.253 / 255.255.255.0 Info: eth2: Checking link... down. ONIE: eth2: link down. Skipping configuration. Info: eth3: Checking link... down. ONIE: eth3: link down. Skipping configuration. ONIE: Failed to configure eth0 interface ONIE: Failed to configure eth2 interface ONIE: Failed to configure eth3 interface ONIE: Starting ONEXT4-fs (sdc7): couldn't mount as ext3 due to feature incompatibilities IE Service Discovery […]
- After the SONiC OS is installed successfully, the system
reboots, and loads the SONiC OS automatically.
Info: Attempting file://dev/sda/onie-installer ... ONIE: Executing installer: file://dev/sda/onie-installer Verifying image checksum ... OK. Preparing image archive ... OK. Installing SONiC in ONIE ONIE Installer: platform: x86_64-juniper-r0 onie_platform: x86_64-juniper_ptx10k-r0 Partition #1 is in use. Partition #2 is in use. Partition #3 is available Creating new SONiC-OS partition /dev/sdb3 ... Warning: The kernel is still using the old partition table. The new table will be used at the next reboot. The operation has completed successfully. mke2fs 1.42.13 (17-May-2015) Discarding device blocks: 4096/8388608 528384/83886087344128/8388608 done Creating filesystem with 8388608 4k blocks and 2097152 inodes Filesystem UUID: 9fdb43cf-35fa-4e1d-b403-a3bffacb7a9e Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624 Allocating group tables: 0/256 done Writing inode tables: 0/256 done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: 0/256 done Installing SONiC to /tmp/tmp.4GacD0/image-201904.0-dirty-20200226.091.. Archive: fs.zip creating: boot/ inflating: boot/vmlinuz-4.9.0-9-2-amd64 inflating: boot/config-4.9.0-9-2-amd64 inflating: boot/bzImage-ptx10k-rcb.dtb inflating: boot/initrd.img-4.9.0-9-2-amd64 inflating: boot/System.map-4.9.0-9-2-amd64 creating: platform/ inflating: platform/firsttime creating: platform/x86_64-grub/ inflating: platform/x86_64-grub/grub-pc-bin_2.02~beta3-5+deb9u2_amd64.deb inflating: fs.squashfs Success: Support tarball created: /tmp/onie-support-juniper_ptx10k.tar.bz2 Installed SONiC base image SONiC-OS successfully ONIE: NOS install successful: file://dev/sda/onie-installer ONIE: Rebooting... discover: installer mode detected. Stopping: discover...start-stop-daemon: warning: killing process 1379: No such process done. Stopping: dropbear ssh daemon... done. Stopping: telnetd... done. Stopping: klogd... done. Stopping: syslogd... done. Info: Unmounting kernel filesystems umount: can't unmount /: Invalid argument The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system reboot reboot: Restarting system +----------------------------------------------------------------------------+ Booting from Flash A FPGA Reset Reason = 0x81 Primary BIOS version CBEP_P_VAL1_00.15.01 Total Memory Size = 64GB Checking Primary BIOS code integrity...Passed! Press Esc for boot options ME is in normal operational state Booting SONiC-OS... <--- Confirmation that we are booting correctly Secure boot is not enforced Welcome to GRUB! GNU GRUB version 2.02 +----------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line. *SONiC-OS-201904.0-dirty-20200226.091601 ONIE Loading SONiC-OS OS kernel ... Loading SONiC-OS OS initial ramdisk ... […] Debian GNU/Linux 9 sonic ttyS0
- When the SONiC login prompt appears, use the standard
SONiC login user ID admin and the password YourPaSsWoRd.
sonic login: admin Password: YourPaSsWoRd Linux sonic 4.9.0-9-2-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2015-12-19) x86_64 You are on ____ ___ _ _ _ ____ / ___| / _ \| \ | (_)/ ___| \___ \| | | | \| | | | ___) | |_| | |\ | | |___ |____/ \___/|_| \_|_|\____| -- Software for Open Networking in the Cloud -- Unauthorized access and/or use are prohibited. All access and/or use are subject to monitoring.
Upgrade SONiC on PTX10008 Router
This section describes how to upgrade SONiC on the Juniper Networks’ PTX10008 router. Software upgrade is the procedure of updating the SONiC to a latest release without losing any of the existing configuration. While console access is always preferred, it is not mandatory for this procedure.
The install, upgrade, and recovery of SONiC happens in the Primary SSD, as defined by the BIOS.
To upgrade the SONiC OS on the Juniper Networks’ PTX10008 router to a later release, you need to:
- Download the SONiC image juniper-sonic-ptx10k-<version>.bin (for example, juniper-sonic-ptx10k-201911-R1.6.bin) from https://support.juniper.net/support/downloads/?p=ptx10008 by selecting the operating system as SONiC.
- Copy the SONiC installer image to the /usr/bin/ directory in the existing SONiC system.
- You must be logged in as a root user to proceed with the
upgrade. If you are logged in to SONiC as a non-root user, you will
need to switch to the root user by entering the following command:admin@ptx10k8:~$sudo -i
- Navigate to the directory /usr/bin/ where the juniper-sonic-ptx10k-<version>.bin file
is located.root@ptx10k8:~# cd /usr/bin/
- Install the juniper-sonic-ptx10k-<version>.bin file.root@ptx10k8:/usr/bin/# sonic-installer install ./juniper-sonic-ptx10k-<version>.bin
- When prompted to install the new image, enter Y to continue the upgrade installation.
New image will be installed, continue? [y/N]: y Installing image SONiC-OS-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528 and setting it as default... Command: bash ./juniper-sonic-ptx10k-201911-R1.6.bin Verifying image checksum ... OK. Preparing image archive ... OK. Installing SONiC in SONiC ONIE Installer: platform: x86_64-juniper-r0 onie_platform: x86_64-juniper_ptx10k-r0 Removing old SONiC installation /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201110.103709 Installing SONiC to /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528 Archive: fs.zip creating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/boot/ inflating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/boot/bzImage-ptx10k-rcb.dtb inflating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/boot/initrd.img-4.9.0-11-2-amd64 inflating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/boot/System.map-4.9.0-11-2-amd64 inflating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/boot/config-4.9.0-11-2-amd64 inflating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/boot/vmlinuz-4.9.0-11-2-amd64 creating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/platform/ extracting: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/platform/firsttime creating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/platform/x86_64-grub/ inflating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/platform/x86_64-grub/grub-pc-bin_2.02~beta3-5+deb9u2_amd64.deb inflating: /host/image-juniper-sonic-ptx10k-jnpr_201911-0-20201113.123528/fs.squashfs Installed SONiC base image SONiC-OS successfully Command: grub-set-default --boot-directory=/host 0 Command: rm -rf /host/old_config Command: cp -ar /etc/sonic /host/old_config Command: sync;sync;sync Command: sleep 3 Done
- Reboot the system to activate the new software.root@ptx10k8:/usr/bin/# reboot