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

[EX] Error "cannot open package" seen when doing an "install format" from loader

0

1

Article ID: KB29113 KB Last Updated: 28 Apr 2020Version: 5.0
Summary:

This article outlines a problem that can occur when doing a format install on the EX Series switch, resulting in the error "cannot open package". The condition is found to be due to the password file not being created properly.

 

Symptoms:

When trying to do a format install on an EX switch from loader, the problematic device may show the following error conditions:

loader> install tftp://10.10.10.10/jinstall-ex-4300-13.2X50-D18-domestic-signed.tgz 
cannot open package (error 60)
loader> install --format tftp://10.10.10.10/jinstall-ex-4300-13.2X50-D18-domestic-signed.tgz
cannot open package (error 60)
loader> install file:///jinstall-ex-4300-13.2X50-D18-domestic-signed.tgz
cannot open package (error 22)

 

Cause:

The device may have gotten into a problematic state where the password files were not created properly. This could have been the result of multiple power cycles on the device to recover the device.

 

Solution:

In general, after password recovery, it is recommended to do a system snapshot so that both partitions have the same Junos OS release.

The following procedure will recover the password file and correct this problem.

  1. Get into "single user mode" during the boot cycle by first getting to the loader prompt. To get to the loader prompt, press the space bar when you see "Loading /boot/defaults/loader.conf," during the beginning of the boot cycle.

loader> boot -s
  1. Check and mount the /var file system.

# df
Filesystem      512-blocks    Used      Avail      Capacity    Mounted on
/dev/da0s1a     647748       349172     246760     59%          /
devfs           2            2          0          100%         /dev
/dev/md0        436012       436012     0          100%         /packages/mnt/junos

# mount /dev/da0s3e /var
WARNING: /var was not properly dismounted

# df
Filesystem      512-blocks    Used      Avail      Capacity    Mounted on
/dev/da0s1a     647748       349172     246760     59%          /
devfs           2            2          0          100%         /dev
/dev/md0        436012       436012     0          100%         /packages/mnt/junos
/dev/da0s3e     347504       13932      305772     4%           /var                   <===da0s3e mounted
  1. Check the password files in the root directory.

# ls -lrt /var/etcroot
  1. Create read-write access to the root partition and create the symbolic links to the password files.
# mount -uw /
# ln -s /var/etcroot/spwd.db /etc/spwd.db
# ln -s /var/etcroot/pwd.db /etc/pwd.db
  1. Unmount the /var partition.

# cd /
# umount /var
# df
Filesystem      512-blocks    Used      Avail      Capacity    Mounted on
/dev/da0s1a     647748       349172     246760     59%          /
devfs           2            2          0          100%         /dev
/dev/md0        436012       436012     0          100%         /packages/mnt/junos

# exit
  1. This will boot the EX4300 device into amnesiac mode from where you can log in to the device using the root username.

Amnesiac (ttyu0)
login: root
Logging to master
root>

 

Modification History:

2020-04-28: Article checked for accuracy; article found to be valid and relevant; minor changes made

 

Related Links

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