Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

Understanding new loader for EX2300 and EX3400 - Upgraded FreeBSD



Article ID: KB32642 KB Last Updated: 17 Aug 2020Version: 3.0

A new menu-based loader has been introduced from the upgraded FreeBSD release of Junos.

This article explains the function of each menu and differences between the loader in legacy EX switches compared to the new loader. The screen and CLI captures in this article are taken from an EX3400 switch with Junos 15.1X53.


I. Main Menu

  1. Boot [J]unos volume

    • Continue to boot from Junos volume in normal mode
    • This is the default
  2. Boot Junos volume in [S]afe mode

    • Continue to boot from Junos volume in safe mode.
    • One of the differences between normal mode and safe mode in EX3400 is SMP (Symmetric Multiprocessing) support.
    • In normal mode it uses dual core, while in safe mode it uses single core.
    • NOTE: Please do not use this unless engineering requests it for troubleshooting purposes.
  3. [R]eboot

    • For rebooting


II. '4. [B]oot menu' from the Main Menu

  1. Boot [P]revious installed Junos packages

    • The system will boot with the previous Junos version
    • It works only if there’s an old image available.
    • Old image files can be found in the '/packages/sets/previous' directory.
    • This is similar to a non-recovery snapshot on Junos volume. There will be a previous package set that links to the packages
    • Some platforms do not keep an older image due to storage space limitations (EX2300 and EX3400 do not have '/packages/sets/previous' directory).
    • The following is a sample output from EX9200:

      root@:/ # ls -al /packages/sets/previous/
      total 20
      drwxr-xr-x  4 root  wheel  1536 Mar 30 15:45 .
      drwxrwxrwx  4 root  wheel   512 Mar 30 18:47 ..
      drwxr-xr-x  2 root  wheel   512 Mar 30 15:45 boot
      lrwxr-xr-x  1 root  wheel    66 Mar 30 15:44 jail-runtime -> /packages/db/jail-runtime-x86-32-20171012.356211_builder_stable_10
      lrwxr-xr-x  1 root  wheel    62 Mar 30 15:44 jdocs -> /packages/db/jdocs-x86-32-20171121.225603_builder_junos_161_r6
      lrwxr-xr-x  1 root  wheel    63 Mar 30 15:44 jpfe-X -> /packages/db/jpfe-X-x86-32-20171121.225603_builder_junos_161_r6
  2. Boot Junos in [S]ingle user mode

    • Boot from single user mode
    • Note: This is not for password recovery
  3. Boot from [R]ecovery snapshot

    • If Junos volume is corrupt, you may choose this menu.
    • If you made a recovery snapshot in the past and select this menu, it will boot up from OAM volume.
    • Once system boots up from OAM volume, you will see the 'Note' below.
    • To recover Junos volume, use the 'request system recover junos-volume' command.

      FreeBSD/arm (Amnesiac) (ttyu0)
      login: root
      --- JUNOS 
      Note: Junos is currently running in recovery mode on the OAM volume
      root@:RE:0% CLI
      root> request system recover junos-volume
      NOTICE: Recovering the Junos volume ...
      warning: unable to create volume: swap
      warning: the storage device that holds it is not present
      da0p2 deleted
      da0p2 added
      /dev/gpt/junos: 1410.0MB (2887592 sectors) block size 32768, fragment size 4096
              using 4 cylinder groups of 352.50MB, 11280 blks, 45184 inodes.
      super-block backups (for fsck_ffs -b #) at:
       192, 722112, 1444032, 2165952
      root> request system reboot junos 
  4. Boot from [U]SB

    • To Install JUNOS from USB with format
    • How to create USB memory
    (1) This is different from Legacy EX switch
    (2) Download the USB install media image from Juniper website
    (3) Copy it to JUNOS machine
    (4) Insert USB memory stick and check out device name (let’s assume it’s da1 here)
    (5) Decompress image file of which extension is “.gz” in shell mode

    gzip -d junos-install-media-usb-arm-32-15.1X53-D58.3.img.gz
    (6) Copy media image into USB memory using 'dd' command in shell mode
    dd if=junos-install-media-usb-ex-arm-32-15.1X53-D56.img of=/dev/da1 bs=1m
  5. Boot to [O]AM shell

    • Boot to shell mode from OAM volume
    # df -k
    Filesystem   1024-blocks  Used   Avail Capacity  Mounted on
    /dev/md0           21860 21860       0   100%    /
    devfs                  1     1       0   100%    /dev
    /dev/gpt/oam     2096223 28143 1900383     1%    /.mount
  6. Snapshot [B]oot menu

    • Boot with non-recovery snapshot
    • For example, if a snapshot was created like the following:
    labroot@jtac-ex3400-24t-r2005> request system snapshot    
    NOTICE: Snapshot snap.20000114.223439 created successfully

    • You can select the non-recovery snapshot as follows:

III. '5.  [M]ore options' from Main Menu


  1. Recover [J]unos volume

    • Boot from OAM volume
    • Snapshot OAM volume to JUNOS volume
    • Reboot
    Booting from OAM volume to recover the Junos volume ...
    Unpacking recovery snapshot to junos volume
    Software recoverWaiting (max 60 seconds) for system process `vnlru' to stop...y completed
    Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
    Waiting (max 60 seconds) for system process `syncer' to stop...
    Syncing disks, vnodes remaining...2 0 0 done
    All buffers synced.
    Uptime: 1m36s
  2. Recovery mode - [C]LI

    • This menu is for password recovery
    NOTE: Once in the CLI, you will need to enter configuration mode using
    NOTE: the 'configure' command to make any required changes. For example,
    NOTE: to reset the root password, type:
    NOTE:    configure
    NOTE:    set system root-authentication plain-text-password
    NOTE:    (enter the new password when asked)
    NOTE:    commit
    NOTE:    exit
    NOTE:    exit
    NOTE: When you exit the CLI, you will be in a shell.
    Starting CLI ...
    tvp_token_reinit read try :hw.product.pvi.config.junos_kernel_token.reinit
    tvp_token_reinit read try :hw.product.pvi.config.junos_kernel_token.reinit
    Note: Password recovery
  3. Check [F]ile system

    • Boot from OAM volume and file system check for JUNOS volume using fsck
    Booting from OAM volume to perform disk checks …
    ***** FILE SYSTEM IS CLEAN *****
    Running: fsck_ufs -y /dev/gpt/junos
    ** /dev/gpt/junos
    ** Last Mounted on /.mount
    ** Phase 1 - Check Blocks and Sizes
    ** Phase 2 - Check Pathnames
    ** Phase 3 - Check Connectivity
    ** Phase 4 - Check Reference Counts
    ** Phase 5 - Check Cyl groups
    3951 files, 657824 used, 3522478 free (110 frags, 440296 blocks, 0.0% fragmentation)
    ***** FILE SYSTEM IS CLEAN *****
    File system repair
    Type 'exit' when done.
    Note: This is for file system corruption check and recovery
  4. Enable [V]erbose boot

    • Toggle Disable/Enable Verbose boot
    • Provide additional information while it boots up when it is enabled


  5. [B]oot prompt

    Note: Similar loader prompt to that of Legacy EX 

    • You may return back to menu
    loader> menu
    • You may upgrade JUNOS from loader as can be done in Legacy EX loader
    loader> set ipaddr=
    loader> set netmask=
    loader> set gatewayip=
    loader> install tftp://

IV. Difference from JUNOS image between Legacy EX image and upgraded FreeBSD image (Based on EX2300 & EX3400)

  1. There are 3 different install package/media images:

    (a) Install package: used for upgrade from CLI prompt

    > junos-arm-32-15.1X53-D58.3.tgz

    (b) Install Media - NET image: used for upgrade from tftp server

    > junos-install-media-net-arm-32-15.1X53-D58.3.tgz

    (c) Install Media - USB image : used for upgrade from external USB memory

    > junos-install-media-usb-arm-32-15.1X53-D58.3.img
  2. From loader prompt, you can only upgrade from tftp server using NET image.

  3. For USB install, you should use the USB boot menu as explained above.

  4. Regardless of the "--format" option, it initializes storage. The "--format" option does not make a difference.

V. Storage information (from EX3400)

root@jtac-ex3400-24t-r2005:RE:0% gpart status
  Name  Status  Components
da0p1      OK  da0
da0p2      OK  da0
da1s1      OK  da1
da1s1a      OK  da1s1

root@jtac-ex3400-24t-r2005:RE:0% gpart show
=>     40  3911600  da0  GPT  (1.9G)
       40  1024000    1  freebsd-ufs  (500M)
  1024040  2887592    2  freebsd-ufs  (1.4G)
  3911632        8       - free -  (4.0K)

=>       1  30851071  da1  MBR  (15G)
         1    649168    1  freebsd  (317M)
    649169  30201903       - free -  (14G)

=>     0  649168  da1s1  BSD  (317M)
       0      16         - free -  (8.0K)
      16  649152      1  freebsd-ufs  (317M)

root@jtac-ex3400-24t-r2005:RE:0% gpart list | egrep "(Name|label)"
1. Name: da0p1
   label: oam
2. Name: da0p2
   label: junos
1. Name: da0
1. Name: da1s1
1. Name: da1
1. Name: da1s1a
1. Name: da1s1
root@jtac-ex3400-24t-r2005:RE:0% gpart list
Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 3911639
first: 40
entries: 152
scheme: GPT
1. Name: da0p1
   Mediasize: 524288000 (500M)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r0w0e0
   rawuuid: 0d6b1f5f-c22e-11d3-ae03-0da94d08da1b
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: oam
   length: 524288000
   offset: 20480
   type: freebsd-ufs
   index: 1
   end: 1024039
   start: 40
2. Name: da0p2
   Mediasize: 1478447104 (1.4G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 524308480
   Mode: r1w1e2
   rawuuid: 0e63a694-c22e-11d3-ae03-0da94d08da1b
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: junos
   length: 1478447104
   offset: 524308480
   type: freebsd-ufs
   index: 2
   end: 3911631
   start: 1024040
1. Name: da0
   Mediasize: 2002780160 (1.9G)
   Sectorsize: 512
   Mode: r1w1e3
Geom name: da1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 30851071
first: 1
entries: 4
scheme: MBR
1. Name: da1s1
   Mediasize: 332374016 (317M)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 512
   Mode: r0w0e0
   rawtype: 165
   length: 332374016
   offset: 512
   type: freebsd
   index: 1
   end: 649168
   start: 1
1. Name: da1
   Mediasize: 15795748864 (15G)
   Sectorsize: 512
   Mode: r0w0e0
Geom name: da1s1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 649167
first: 0
entries: 8
scheme: BSD
1. Name: da1s1a
   Mediasize: 332365824 (317M)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 8704
   Mode: r0w0e0
   rawtype: 7
   length: 332365824
   offset: 8192
   type: freebsd-ufs
   index: 1
   end: 649167
   start: 16
1. Name: da1s1
   Mediasize: 332374016 (317M)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 512
   Mode: r0w0e0
Modification History:
2018-06-09: Updated references to naming used for FreeBSD.
2020-08-17: Article reviewed for accuracy; no changes required.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search