Junos Recovery on QFX5100/EX4600

It’s possible that after a failed installation, the QFX5100 might not work properly and be left in a state that makes it inaccessible from remote and needs a new software installation by copying the software from the USB to the QFX5100 or by using the installation from USB.

There is another way to recover the device if you have console access and you are still able to reboot the device from CLI. From CLI, you will need to reboot completely the device, including the CentOS on top of which the Junos VM is running. This is done using “request system reboot hypervisor”. If the CLI is not working, then a power cycle will be needed.

A recovery image is created automatically on the switches. If a previously-running switch is powered on and unable to boot using a Junos OS image, you can boot the switch using the recovery Junos OS image by selecting one of the saved images.

Because the architecture of EX4600 is identical with the one of QFX5100, the same process applies to EX4600.

After the hypervisor reboot, monitor the console and you should see this screen:

boot_menuOnce you select “Junos Recovery” menu, you will be shown with the available images:

 

+------------------------------------------+
|         Junos Recovery                   |
+------------------------------------------+

Selected Junos instance 0

-------------------------------------------------
Current  : jinstall-qfabric-5-14.1X53-D16.1-domestic-201510161424.img
Previous : jinstall-qfx-5-14.1X53-D16.1-domestic-201510151740.img
Old      : jinstall-qfx-5-14.1X53-D16.2-domestic-201510151607.img
-------------------------------------------------

Select an image for recovery or cancel to continue:

Select a recovery image:
1) jinstall-qfabric-5-14.1X53-D16.1-domestic-201510161424.img
2) jinstall-qfx-5-14.1X53-D16.1-domestic-201510151740.img
3) jinstall-qfx-5-14.1X53-D16.2-domestic-201510151607.img
4) cancel
Pick an option[1-4]:

 

Once you choose your option, you will be asked for a confirmation immediately:

 

Do you really want to recover to
jinstall-qfx-5-14.1X53-D16.2-domestic-201510151607.img
Please confirm[y/n]:y
Recovering Junos image
Reverting to jinstall-qfx-5-14.1X53-D16.2-domestic-201510151607.img
This may take some time ...
Recovery of Junos image completed.
-------------------------------------------------
Modified Junos configuration:
-------------------------------------------------
Current  : jinstall-qfx-5-14.1X53-D16.2-domestic-201510151607.img
Previous : jinstall-qfx-5-14.1X53-D16.1-domestic-201510151740.img
Old      : jinstall-qfabric-5-14.1X53-D16.1-domestic-201510161424.img
-------------------------------------------------

 

Then you will be asked if you want to format the data disk and also config disk(that is, the device will boot using the factory default configuration):

 

Do you want to format Junos data disk?[y/n]y
Formatting Junos data disk.
This may take some time ...
Formatting of Junos data disk completed.
Do you want to format Junos config disk?[y/n]y
Formatting Junos config disk.
This may take some time ...
Formatting of Junos config disk completed.

 

After this, the device will boot and the ZTP process will start.

I hope this feature will save you the trouble of reinstalling the software again in case the device fails to boot correctly.

 

The following two tabs change content below.

Paris ARAU

Paris ARAU is a networking professional with strong background on routing and switching technologies. He is a holder of CCIE R&S and dual JNCIE(SP and ENT). The day to day work allows him to dive deeply in networking technologies. Part of the continuously training, he is focusing on Software Defined Network and cloud computing.

Comments

This post currently has 9 responses

  • This window comes up and before I can even make a selection it skips right past to the normal boot window.

    • There should be several seconds(I think 5 seconds) during which the menu is available.

      So you will need to monitor the boot process to make sure you will not skip it.

      Thanks,
      Paris

  • Hi Paris,

    nice how-to, thanks. But for some reason it is not working with one of our QFX5100-48T-AFO. We received it from Juniper with a root password we do not know and now we are trying to reset it. But even if we choose format config disk it comes up asking for a login and password. We also did not find any other password recovery method for the QFX5100 which is working, like e.g. boot -s.

    Any ideas?

    Best regards,
    Marc

  • Hello Paris,

    me and my mate using same method to upgrade junos on ACX router. i always do same for Do you want to format Junos config disk?[y/n]y
    due to which we requires to re-apply configs on router.
    my mate asks me that if we ” format Junos config disk?[y/n] n ” ? is this ok to do ? if not what is the reason

    in our upgradation we first take the required version image on the router and doing the partitioning to have as below.

    acx-1> show system storage | match /var/tmp
    /dev/ad1s1d 1.9G 16K 1.8G 0% /var/tmp

    • Hi Mekhala,

      You can proceed without formatting the config partition. There is no harm in that. The procedure shown in the post is when the device is not booting anymore.

      To upgrade, you can use the classic “request system …”.

      Thanks,
      Paris

    • You will need to create a recovery USB using ‘dd’ command using a install media image.

      The device will boot from it and perform a clean installation after formatting everything.

      Thanks,
      Paris

  • Error from Juniper EX4600:

    (hd0,0): Filesystem type is ext2fs, partition type 0x83
    ▒root=’/dev/ram0′
    rootfs=”
    fstype=’ramfs’
    initdebug=”
    NEWROOT=’/sysroot’
    Unpacking root filesystem….
    873251 blocks
    Mounted root filesystem on /dev/ram0
    Switching to newStarting udev: [ OK ]
    ERROR: expected SATA disks not found or not disk type.
    ERROR: Only found /dev/sda.
    ERROR: System cannot proceed without the disks
    ####################################################
    ERROR: Halting the system ….
    ####################################################
    Entering non-interactive startup
    Sending all processes the TERM signal… [ OK ]
    Sending all processes the KILL signal… [ OK ]
    Saving random seed: [ OK ]
    Syncing hardware clock to system time [ OK ]
    init: Re-executing /sbin/init
    tmc-fpga: TMC FPGA driver shutdown called.
    Halting system…
    Power down.

    Looks like the internal SATA disk are failed. Can you recover from this?

    -Chris

Leave a Reply

Your email address will not be published. Required fields are marked *

Sidebar



%d bloggers like this: