Create a Bootable USB Drive
The bootable USB drive is used to re-image the router for the purpose of system upgrade or for booting the router in case of boot failure. The bootable USB drive can be created in two ways:
Create a Bootable USB Drive Using Compressed Boot File
A bootable USB drive is created by copying a compressed boot file into a USB drive. The USB drive becomes bootable after the contents of the compressed file are extracted.
This task can be completed using Windows, Linux, or MAC operating systems available on your local machine. The exact operation to be performed for each generic step outlined here depends on the operating system in use.
Before you begin
-
Have access to a USB drive with a storage capacity that is between 2GB (min) and 32 GB (max). USB 2.0 and USB 3.0 are supported.
-
Copy the compressed boot file from the software download page at cisco.com to your local machine. The file name for the compressed boot file is in the format ncs4k-usb-boot-<release_number>.zip. For example, ncs4k-usb-boot-5.2.3.zip.
SUMMARY STEPS
- Connect the USB drive to your local machine and format it with FAT32 file system.
- Copy the compressed boot file to the USB drive.
- Unzip the compressed boot file inside the USB drive.
- The contents of the compressed boot file ("EFI" and "Boot" directories) should be extracted to the root of the USB drive. If they are extracted to a separate folder, move them to the root of the USB drive.
DETAILED STEPS
Step 1 |
Connect the USB drive to your local machine and format it with FAT32 file system. |
Step 2 |
Copy the compressed boot file to the USB drive. |
Step 3 |
Unzip the compressed boot file inside the USB drive. |
Step 4 |
The contents of the compressed boot file ("EFI" and "Boot" directories) should be extracted to the root of the USB drive. If they are extracted to a separate folder, move them to the root of the USB drive. USB drive is bootable when the "EFI" and "Boot" directories are in the root of the USB drive. |
What to do next
Use the bootable USB drive to boot the router or upgrade its image. See:
Create Bootable USB Drive Using Shell Script
To create the bootable USB drive using shell script, you need an ISO image file and the shell script that creates the boot device. The shell script is already available on the router. Create the bootable USB drive as an preemptive measure when the router is operational. If the router is already unusable, create the bootable USB drive on another active router.
Note |
The contents of the USB drive is erased during the process of creating the bootable drive. |
Before you begin
-
Have access to a USB drive with a storage capacity that is between 2GB (min) and 32 GB (max). USB 2.0 and USB 3.0 are supported.
-
The ISO image must be present on a network server.
SUMMARY STEPS
- copy tftp:source disk1:destination
- dir /disk1:
- run ls /usr/bin/usb-install.sh
- Connect the USB drive.
- run
- tail /var/log/messages
- cd directory path
- <shell_script_file_name> <location_of_iso_image> <mount_location_of_USB_device>
DETAILED STEPS
Step 1 |
copy tftp:source disk1:destination Example:
Copy the ISO image from a network server to the router hard disk. |
Step 2 |
dir /disk1: Example:
Verify that the image is copied. The result of this command displays the ISO file name.
|
Step 3 |
run ls /usr/bin/usb-install.sh Example:
Verify that the shell script is available on the router. The usb-install.sh script must be present in the command output.
|
Step 4 |
Connect the USB drive. The USB drive must be connected to the USB port on the RP to which the iso image has been copied. The USB port is shown in this figure. |
Step 5 |
run Example:
Enters the XR VM Linux shell. The router prompt changes to:
|
Step 6 |
tail /var/log/messages Example:
Identifies the device name to which the USB drive is been mapped. The USB drive is auto-discoverable on the XR VM shell. In this example, we identify from the last entry that the USB is
mapped as "vde".
|
Step 7 |
cd directory path Example:Access the directory where the shell script is present. |
Step 8 |
<shell_script_file_name> <location_of_iso_image> <mount_location_of_USB_device> Example:
Runs the script to create the bootable USB drive. After the process is complete, this message is displayed:
|
What to do next
Use the bootable USB drive to boot the router or upgrade its image. See: