Support Support Downloads Knowledge Base Juniper Support Portal 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

[Junos] How to copy Junos from a computer to bootable media



Article ID: KB27369 KB Last Updated: 08 Apr 2020Version: 8.0

In this article, you'll find information on how to copy Junos OS from a computer to a bootable device using PHYSDISKWRITE.EXE or Win32DiskImager.

Note: To create a Junos OS bootable media on your Windows-based system using the Cygwin software, refer to: KB12170 - How to install Junos Install Media on a PCMCIA flash card using Cygwin.

  • How do I get Junos OS onto a Compact Flash, PCMCIA card, or USB drive prior to inserting them into the router?
  • Copy/paste of the Install Media file onto the USB drive did not make the USB drive bootable. How can I make the USB a bootable drive?

The need to use other bootable devices can arise for a couple of reasons:

  • You might need to upgrade the size of the Compact Flash, such as on an M10i or M7i or J Series.
  • You might need to install Junos OS directly onto the hard disk drive (HDD) due to Compact Flash issues.


  • Depending on your equipment, an external PMCIA, Compact Flash (CF) reader/writer, and/or a PMCIA-to-CF adapter might be required.
  • If using a USB drive, make sure it has only one partition, and not a hidden Secure or U3 partition.
  • Download PHYSDISKWRITE.EXE to copy the Junos bootable image.  PHYSDISKWRITE.EXE can be obtained from m0n0wall's website:
  • Or download Win32Disk Imager:

Instructions on how to create a bootable CF, PCMCIA card, or USB drive:
  1.  Download the Install Media appropriate for the size of Compact Flash you are using and save it to your desktop. (Note that this is a raw disk image file with no file extension. It is wise to verify the MD5 signature of the file.).
    Go, and select the product and OS and Version. Then choose the Install Media option and select appropriate image.
  2. Download the PHYSDISKWRITE.exe program and extract it to your desktop.
  3. If a CF adapter/reader is required, plug the CF into the adapter; otherwise, continue to the next step.
  4. Insert the CF adapter or PCMCIA card or USB drive into the computer.

Using Win32 Disk Imager to write the install-media file:

  1. Right-click Win32DiskImager and click Properties. Under the Compatibility tab, check "Run this program as an administrator."
  2. Click Yes to elevate privileges in UAC if prompted.
  3. Click the blue folder icon to select the install-media file
  4. Change the Device to D: or whichever drive represents the CF, PCMCIA, or USB.
  5. Click Write. This should not be an instant process. It takes a few minutes to write ~500M to a device across the USB.
  6. Go to the "Using the bootable media to erase the Routing Engine" section. There's no need to use Win32 Disk Imager and PHYSDISKWRITE.

Using PHYSDISKWRITE.EXE to write the install-media file (skip this section if you used Win32 Disk Imager):

  1. Right-click PHYSDISKWRITE.EXE and click Properties. Under the Compatibility tab, check "Run this program as an administrator."
  2. Click and drag the Junos Install Media image over the PHYSDISKWRITE.EXE icon. 
    OR ... to use the PhysGUI, perform the following steps:
    1. Right-click PhysGUI and click Properties. Under the Compatibility tab, check "Run this program as an administrator."
    2. Double-click PhysGUI.exe, which comes with Physdiskwrite.exe.
    3. Click Yes to elevate privileges in UAC if prompted.
    4. Right-click on the Flash drive and select Image laden > Offnen (translated means upload image > open).
    5. When the warning "Remove 2GB restriction (WARNING!)" displays, select the checkbox.
    6. Another warning in German appears; click OK.
    7. A CMD window displays and the "bytes written" increments. When it is done, the CMD window closes. The message "Physdiskwrite beendet" appears (translated means closed Physdiskwrite); click OK.
    8. Go to Windows Explorer, right-click on the Removable Disk (E:), and select Eject.
    9. If your PC has "Safely Remove Hardware" in the System Tray, click the message. 
    10. Go to the "Using the bootable media to erase the Routing Engine" section.
  3. Confirm the selected drive. Review carefully to avoid accidental overwrite of your PC's main drive. Select "y" if the drive is correct:
    Which disk do you want to write? (0..1) 1
    About to overwrite the contents of disk 1 with new data. Proceed? (y/n) y
  4. The number of bytes written will display.  When the program has finished, it will automatically close the CMD window. This should not be an instant process. It takes a few minutes to write ~500M to a device across the USB.
    Found compressed image file
    5259264 bytes written

Using the bootable media to erase the Routing Engine:

  1. When the program has finished, please stop and remove the CF adapter / PCMCIA card / USB drive to avoid corrupting the image/file system.
  2. Insert the removable media into your router's primary media slot.  If inserting a CF into an MX device, skip to the "On MX Series" section below. 
  3. Power on the router.  If everything went correctly, the router should boot up using the image you just installed.
On the M/T/MX Series:
  1. Connect to the router console port.  This is critical for the Install Media to work on an MX device.
  2. Insert the USB drive into the USB port of the router and reboot or power on.
  3. The following output is displayed: 
    External USB present
    Will try to boot from
    Trying to boot from USB
    Loading /boot/defaults/loader.conf
    WARNING: The installation will erase the contents of your disks.
    Do you wish to continue (y/n)?

    Note: This is why you MUST be on the console, so you can respond to this prompt. Otherwise the router will appear to hang, as it waits at this prompt.
  4. Enter y to reboot the router
  5. Follow the instructions displayed on the console.
    Eject the installation media and hit [Enter] to reboot?
On the MX80:
  1. Continued from M/T/MX Series section above.  On an MX80, even without ejecting the USB, if you press Enter, the router will boot again from nand-flash0. The following information is displayed:
    External USB present
    Will try to boot from

    FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.2
    (, Wed Feb 3 09:50:07 PST 2010)
    Memory: 2048MB
    Trying to boot from nand-flash0
  2. The router will boot, but the prompt will display Amnesiac instead of a hostname.  This occurs because the configuration was erased.
    Amnesiac (ttyu0)
  3. Log in.  The only user login is "root" with no password.  When the shell prompt is displayed, enter cli.
    login: root
    root@% cli
  4. Enter configuration mode and set the root-authentication password; enter commit to save the changes. 
    root> configure
    Entering configuration mode

    root# set system host-name new-MX80

    root# commit
    Missing mandatory statement: 'root-authentication'
    error: commit failed: (missing statements)

    root# set system root-authentication plain-text-password
    New password:
    Retype new password:

    root# commit
    commit complete

  5. If you have the configuration backed up as a text file, copy and paste the configuration into the router as follows:
    root@new-MX80# load override terminal
    [Type ^D at a new line to end input]
    (paste in the config, then type ctrl+D, then commit).
  6. Optionally, save the newly installed configuration onto the router's flash as follows:
    root@new-MX80#save /var/tmp/my-MX80-config.conf
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