Bootstrap Installation Procedure For Wd800

Nov 08, 2015  Learn How to install Bootstrap locally on Windows 7| 8| 10. How to create a 3D Terrain with Google Maps and height maps in Photoshop - 3D Map Generator Terrain.

PEP:439
Title:Inclusion of implicit pip bootstrap in Python installation
Author:Richard Jones <richard at python.org>
BDFL-Delegate:Nick Coghlan <ncoghlan at gmail.com>
Discussions-To:<distutils-sig at python.org>
Status:Rejected
Type:Standards Track
Created:18-Mar-2013
Python-Version:3.4
Post-History:19-Mar-2013
Resolution:https://mail.python.org/pipermail/distutils-sig/2013-August/022527.html

Contents

  • Proposal

This PEP proposes the inclusion of a pip boostrap executable in thePython installation to simplify the use of 3rd-party modules by Pythonusers.

This PEP does not propose to include the pip implementation in thePython standard library. Nor does it propose to implement any packagemanagement or installation mechanisms beyond those provided by PEP427 ('The Wheel Binary Package Format 1.0') and TODO distlib PEP.

This PEP has been rejected in favour of a more explicit mechanism thatshould achieve the same end result in a more reliable fashion. The moreexplicit bootstrapping mechanism is described in PEP 453.

Currently the user story for installing 3rd-party Python modules isnot as simple as it could be. It requires that all 3rd-party modulesinform the user of how to install the installer, typically via a linkto the installer. That link may be out of date or the steps requiredto perform the install of the installer may be enough of a roadblockto prevent the user from further progress.

Large Python projects which emphasise a low barrier to entry haveshied away from depending on third party packages because of theintroduction of this potential stumbling block for new users.

With the inclusion of the package installer command in the standardPython installation the barrier to installing additional software isconsiderably reduced. It is hoped that this will therefore increasethe likelihood that Python projects will reuse third party software.

The Python community also has an issue of complexity around the currentbootstrap procedure for pip and setuptools. They all havetheir own bootstrap download file with slightly different usages andeven refer to each other in some cases. Having a single bootstrap whichis common amongst them all, with a simple usage, would be far preferable.

It is also hoped that this is reduces the number of proposals toinclude more and more software in the Python standard library, andtherefore that more popular Python software is more easily upgradeablebeyond requiring Python installation upgrades.

The bootstrap will install the pip implementation, setuptools by downloadingtheir installation files from PyPI.

This proposal affects two components of packaging: the pip bootstrap and,thanks to easier package installation, modifications to publishingpackages.

The core of this proposal is that the user experience of using pip should notrequire the user to install pip.

The pip bootstrap

The Python installation includes an executable called 'pip3' (see PEP 394 fornaming rationale etc.) that attempts to import pip machinery. If it can thenthe pip command proceeds as normal. If it cannot it will bootstrap pip bydownloading the pip implementation and setuptools wheel files. Hereafter theinstallation of the 'pip implementation' will imply installation of setuptoolsand virtualenv. Once installed, the pip command proceeds as normal. Once thebootstrap process is complete the 'pip3' command is no longer the bootstrapbut rather the full pip command.

A boostrap is used in the place of a the full pip code so that we don't haveto bundle pip and also pip is upgradeable outside of the regular Pythonupgrade timeframe and processes.

To avoid issues with sudo we will have the bootstrap default toinstalling the pip implementation to the per-user site-packagesdirectory defined in PEP 370 and implemented in Python 2.6/3.0. Sincewe avoid installing to the system Python we also avoid conflictingwith any other packaging system (on Linux systems, for example.) Ifthe user is inside a virtual environment [1] then the pipimplementation will be installed into that virtual environment.

The bootstrap process will proceed as follows:

  1. The user system has Python (3.4+) installed. In the 'scripts'directory of the Python installation there is the bootstrap scriptcalled 'pip3'.
  2. The user will invoke a pip command, typically 'pip3 install<package>', for example 'pip3 install Django'.
  3. The boostrap script will attempt to import the pip implementation.If this succeeds, the pip command is processed normally. Stop.
  4. On failing to import the pip implementation the bootstrap notifiesthe user that it needs to 'install pip'. It will ask the user whether itshould install pip as a system-wide site-packages or as a user-onlypackage. This choice will also be present as a command-line option to pipso non-interactive use is possible.
  5. The bootstrap will and contact PyPI to obtain the latest download wheelfile (see PEP 427.)
  6. Upon downloading the file it is installed using 'python setup.py install'.
  7. The pip tool may now import the pip implementation and continues toprocess the requested user command normally.

Users may be running in an environment which cannot access the publicInternet and are relying solely on a local package repository. Theywould use the '-i' (Base URL of Python Package Index) argument to the'pip3 install' command. This simply overrides the default index URL pointingto PyPI.

Some users may have no Internet access suitable for fetching the pipimplementation file. These users can manually download and install thesetuptools and pip tar files. Adding specific support for this use-case isunnecessary.

The download of the pip implementation install file will be performedsecurely. The transport from pypi.python.org will be done over HTTPS with theCA certificate check performed. This facility will be present in Python 3.4+using Operating System certificates (see PEP XXXX).

Beyond those arguments controlling index location and downloadoptions, the 'pip3' boostrap command may support further standard pipoptions for verbosity, quietness and logging.

The 'pip3' command will support two new command-line options that are usedin the boostrapping, and otherwise ignored. They control where the pipimplementation is installed:

--bootstrapInstall to the user's packages directory. The name of this option is chosento promote it as the preferred installation option.
--bootstrap-to-system
Install to the system site-packages directory.

These command-line options will also need to be implemented, but otherwiseignored, in the pip implementation.

Consideration should be given to defaulting pip to install packages to theuser's packages directory if pip is installed in that location.

The '--no-install' option to the 'pip3' command will not affect thebootstrapping process.

Modifications to publishing packages

An additional new Python package is proposed, 'pypublish', whichwill be a tool for publishing packages to PyPI. It would replace thecurrent 'python setup.py register' and 'python setup.py upload'distutils commands. Again because of the measured Python releasecycle and extensive existing Python installations these commands aredifficult to bugfix and extend. Additionally it is desired that the'register' and 'upload' commands be able to be performed over HTTPSwith certificate validation. Since shipping CA certificate keychainswith Python is not really feasible (updating the keychain is quitedifficult to manage) it is desirable that those commands, and theaccompanying keychain, be made installable and upgradeable outside ofPython itself.

The existing distutils mechanisms for package registration and upload wouldremain, though with a deprecation warning.

The changes to pip required by this PEP are being tracked in that project'sissue tracker [2]. Most notably, the addition of --bootstrap and --bootstrap-to-system to the pip command-line.

It would be preferable that the pip and setuptools projects distribute a wheelformat download.

The required code for this implementation is the 'pip3' command describedabove. The additional pypublish can be developed outside of the scope of thisPEP's work.

Finally, it would be desirable that 'pip3' be ported to Python 2.6+ to allowthe single command to replace existing pip, setuptools and virtualenv (whichwould be added to the bootstrap) bootstrap scripts. Having that bootstrapincluded in a future Python 2.7 release would also be highly desirable.

The key that is used to sign the pip implementation download might becompromised and this PEP currently proposes no mechanism for keyrevocation.

There is a Perl package installer also named 'pip'. It is quite rare and notcommonly used. The Fedora variant of Linux has historically named Python's'pip' as 'python-pip' and Perl's 'pip' as 'perl-pip'. This policy has beenaltered[3] so that future and upgraded Fedora installations will use the name'pip' for Python's 'pip'. Existing (non-upgraded) installations will stillhave the old name for the Python 'pip', though the potential for confusion isnow much reduced.

[1]PEP 405, Python Virtual Environmentshttp://www.python.org/dev/peps/pep-0405/
[2]pip issue tracking work needed for this PEPhttps://github.com/pypa/pip/issues/863
[3]Fedora's python-pip package does not provide /usr/bin/piphttps://bugzilla.redhat.com/show_bug.cgi?id=958377

Nick Coghlan for his thoughts on the proposal and dealing with the RedHat issue.

Jannis Leidel and Carl Meyer for their thoughts. Marcus Smith for feedback.

Marcela Mašláňová for resolving the Fedora issue.

This document has been placed in the public domain.

Source: https://github.com/python/peps/blob/master/pep-0439.txt

Contents

Introduction

This document discusses the procedure for upgrading your Cisco IOS® software image on Cisco High-End routers. The examples provided in this document are based on the 7500 router, but the procedure is applicable to other routers. The Cisco IOS software filenames may vary depending upon the type of product used.

Note: To use the troubleshooting tools described in this document, you must be a registered user and you must be logged in.

Before You Begin

Conventions

For more information on document conventions, see the Cisco Technical Tips Conventions.

Prerequisites

Step 1: Install a TFTP Server

A Trivial File Transfer Protocol (TFTP) server, a Remote Copy Protocol (RCP) server, or a File Transfer Protocol Server (FTP) application must be installed on a TCP/IP-ready workstation or PC. Once the application is installed, a minimal level of configuration must be performed by following the steps listed below.

  1. Configure the TFTP application to operate as a TFTP server as opposed to a TFTP client.

  2. Specify the outbound file directory. This is the directory in which the Cisco IOS Software images are stored. Most TFTP applications provide a set-up routine to assist in these configuration tasks.

    Note: A number of TFTP or RCP applications are available from independent software vendors or as shareware from public sources on the World Wide Web.

    Note: Most TFTP applications cannot transfer files larger than 16MB in size. If the Cisco IOS software you install is larger than 16MB, you should use an FTP or RCP server.

Step 2: Select a Cisco IOS Software Image

Verify that the Cisco IOS Software image that you download supports both your hardware and the required software features. You can find this information using the Cisco Software Advisor (registered customers only) . Make sure that your router has enough Dynamic RAM (DRAM) and Flash for the Cisco IOS software image prior to downloading the software version you have selected. You can find the minimum recommended DRAM and Flash requirements in the release notes for each specific Cisco IOS software version, as well as in the Download Software Area. For additional information on how to select the right software version and feature set, see How to Choose a Cisco IOS® Software Release.

Step 3: Download the Cisco Software IOS Image

Download the Cisco IOS software image into your workstation or PC from the Download Software Area.

Components Used

The information in this document is based on Cisco IOS Software Release 12.1 or later.

The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If you are working in a live network, ensure that you understand the potential impact of any command before using it.

Background Information

The following Cisco series routers are addressed.

  • Cisco 7000 Series Routers including RP & RSP7000

  • Cisco 7100 Series Routers

  • Cisco 7200 Series Routers

  • Cisco 7300 Series Routers

  • Cisco 7400 Series Routers

  • Cisco 7500 Series Routers

  • Cisco 7600 Series Routers

  • Cisco 10000 Series Internet Routers (ESR)

  • Cisco 12000 Series Internet Routers

  • Cisco uBR71xx, uBR 72xx, uBR10000 Series Routers

Software Installation or Upgrade Procedure

Step-by-Step Procedure

Step 1: Establish a console session to the router

This can be done with a direct console connection or a virtual Telnet connection. A direct console connection is preferred over a Telnet connection because most disaster recovery procedures require you to be physically present, and a Telnet connection gets lost during the reboot phase of the software installation. The console connection is made with a rolled cable (usually a flat black cable), and connects the console port of the router to the COM port of the PC. Open Hyperterminal on the PC, and use the following settings:

Note: If you are getting any garbage characters in the hyperterminal, this means you haven't set the hyperterminal properties properly, or the configuration register of the router is set to a non-standard value for which the console connection speed is higher than 9600 bps. Check the value of the configuration register using the show version command (shown in the last line of the output) and ensure it is set to 0x2102 or 0x102. It is necessary to reload the router for a configuration register change to take effect. Once you are sure the console speed is set to 9600 bps on the router side, you should check the hyperterminal properties as above.

For more information on setting the hyperterminal properties, see Applying Correct Terminal Emulator Settings for Console Connections.

Booting Problems

Windows Xp Installation Procedure

Once you are connected to the console port of the router, you might notice that the router is either in ROMmon or Boot mode. If the router cannot properly load a Cisco IOS software image, it goes into one of these two modes which can be used for recovery and/or diagnostic procedures. If you do not see the usual router prompt, you should follow the recommendations below to continue with the upgrade procedure.

Installation procedure for acd powerbox performance module with two wires

Router boots in ROMmon mode or boot mode, and something similar to the following message appears on the console:

If you are using an ATA PCMCIA Flash disk, the same issue may look like this:

If you see one of the above error messages, it means the Flash card is empty, not formatted, not formatted for the platform, the filesystem is corrupted, or the first image on the Flash card is not a bootable Cisco IOS software image.

If the router is in ROMmon mode, the router prompt may look like this:

If the router is in boot mode, the router prompt may look like this:

For more information on ROMmon recovery, see ROMmon Recovery Procedure for the Cisco 7200, 7300, 7400, 7500, RSP7000, Catalyst 5500 RSM, uBR7100, uBR7200, uBR10000, and 12000 Series Routers.

If the router is in boot mode, you can proceed with the Cisco IOS software upgrade instructions below. Be careful not to save your configuration while in boot mode as the boot image does not contain full routing functionality.

Step 2: Verify that the TFTP server has IP connectivity to the router

Check the IP addresses of the TFTP server and the router targeted for the TFTP software upgrade to be sure the addresses are within the same range. Ping the router to verify that a network connection exists between them. To verify, check the IP address of the TFTP server. If the router is in boot mode, you may need to set the default-gateway as follows:

Step 3: Format the PCMCIA card (if needed)

If the PCMCIA card is a spare which was shipped blank it, must be formatted before use.

You can also use a PCMCIA card from another platform if it is compatible with your router platform. See the PCMCIA Filesystem Compatibility Matrix and Filesystem Information for more information on Flash card compatibility between platforms.

Note: In order to boot from a Cisco IOS software file located on a PCMCIA Flash card or Flash Disk, the Flash card or disk must have been formatted in the target platform.

Installation Procedure For Thin Veneer Brick On Metal Panels

Caution: The formatting procedure erases all information on the Flash memory card. To prevent the loss of images and configuration files that might be stored on a Flash memory card, copy the images and files to a TFTP server before you format the card:

Follow these instructions.

  1. Insert the Flash memory card into the available PCMCIA slot ( slot0 or slot1).

  2. Format the Flash memory card using the format slot0: (or format slot1:) command as follows.

    Note: ATA PCMCIA Flash disks use different command syntax when referring to the PCMCIA slot. Substitute the command syntax disk0: or disk1: if you are using an ATA PCMCIA Flash disk instead of slot0: or slot1: which refers to Linear PCMCIA Flash memory cards.

    More information on the command syntax differences between ATA PCMCIA Flash disks and Linear PCMCIA Flash memory cards can be found in the PCMCIA Filesystem Compatibility Matrix and Filesystem Information.

Step 4: Verify free space on the Flash memory card (PCMCIA slot)

At this point, you need to verify that you have enough space in the Flash memory card to copy the new image. If there is not enough free space, you need to delete some files to make enough space. In some situations, if the image is very large, you may need to delete the current image on the Flash memory card.

To determine the amount of free space, and to show files currently loaded in slot0:, issue the dir{device:} command.

In the example below, slot0 has two filesystems and 885756 bytes of free space. This is not enough to load the new image.

Note: When you see an error message such as '%Error opening slot0: (Device not ready)', try using the dir disk0: command.

In the example below, we delete the second file in order to free enough space for the new Cisco IOS software image.

After deleting the file, use the dir slot0: command to check your free space. The following output shows the free space is still 885756. The free space increases when you squeeze the Flash using the squeeze command:

After you have deleted the file, the file is flagged by the operating system. To free up the deleted file's memory space, you need to issue the squeeze{device:}command which removes the deleted files permanently.

The file is removed permanently once it has been deleted and squeezed. To check whether the file has been deleted and the memory reclaimed, issue the dir slot0: command.

In the above output, you can see that the amount of free Flash memory space has been increased from 885756 bytes to 8047092 bytes.

Note: Do not reload or power-cycle the router if there is not a vaild image on the Flash card; this causes the router to go into ROMmon or boot mode.

Step 5: Copy the new image into the Flash memory card through the TFTP server

Follow these instructions.

Software Installation Procedure

  1. Now that you have IP connectivity and can ping between the computer acting as a TFTP server and the routers, copy the image from the TFTP server into slot0.

    Note: Before copying, make sure you have started the TFTP server software on your PC and that you have the filename mentioned in the TFTP server root directory. We recommend that you keep a copy of the router configuration before upgrading. The upgrade itself does not affect the configuration (which is stored in nonvolatile RAM - NVRAM). However, this might happen if the right steps are not followed correctly.

    For RCP applications, substitute RCP for every occurrence of TFTP. For example, use the copy rcp flash command instead of the copy tftp flash command.

    If necessary, you can copy an image from one device to another.

  2. Specify the IP address of the TFTP server.

    When prompted, enter the IP address of the TFTP server, as in the following example:

  3. Specify the filename of the new Cisco IOS Software image.

    When prompted, enter the filename of the Cisco IOS Software image to be installed, as in the following example:

  4. Specify the destination filename.

    This is the name the new software image will have when it is loaded onto the router. The image can be named anything, but common practice is to enter the same image filename.

    After you have successfully transferred the file, you should verify that the file is in slot0. Issue the dir{device:} command to show files currently located in slot0:

    Verify that the name and the file size are correct. If you have a standard PCMCIA Flash card, you can also verify the PCMCIA checksum is correct from the output of a show slot0:. If you have an ATA Flash Disk, you can use the verify /md5 slot0: command to get a MD5 hash on an image and compare that hash to what is on Download Software Area. The MD5 option for the verify command was introduced in Cisco IOS Software Release 12.0(22)S and will soon be released in the latest 12.2T images. You can view the Cisco IOS software versions containing the MD5 verify option in the 'First Fixed-in Version' field of CSCdw84342 (registered customers only) .

Step 6: Set boot statements to load new image upon startup

After copying the image through TFTP, you may need to tell the router which image to load at bootup.

Checking Current Boot Statements

At this point, the new image is now in slot0. You need to set the router to boot the new image. By default, the router boots the first file in Flash. The order in which Flash is searched is disk0:, disk1:, slot0:, slot1:, and finally bootflash:.The default is enabled when there are no boot commands in the configuration, or the boot statement is inaccurate.

There are two ways to determine the current boot parameter settings:

Option 1: Check to see if you have any boot commands defined in your configuration by issuing the show running-config command. In the example below, the boot statement is set to boot system flash slot0:rsp-jsv-mz.121-13.bin

Option 2: Issue the show bootvar command.

Note: The show bootvar command replaces the show boot command. See the show bootvar command.

The above output also shows that the boot variable is slot0:rsp-jsv-mz.121-13.bin. If you have boot system command entries in your configuration, you need to remove them from the configuration. For more information on removing boot entries, go to the next section.

Removing Previous Boot Statements

To remove the commands, enter into configuration terminal mode. From the configuration mode, you can negate any command by typing 'no' in front of each boot statement. The following example illustrates the removal of an existing boot statement:

The statement 'boot system flash slot0:rsp-jsv-mz.121-13.bin' is removed from the configuration. Verify that the command has been removed by issuing the show running-config command.

Setting New Boot Statements

Now set the router to boot the new image. Issue the following command to set the boot system parameter:

boot system flash slot0:{imagename} (imagename = name of the new IOS image)

On platforms equipped with ATA PCMCIA Flash disks, the command syntax would be:

For example:

Be sure to verify that you are using config-register 0x2102 by issuing the show bootvar or show version command. If it is set up differently, you can change it by issuing the following command in configuration mode:

Verify the boot parameters by issuing the show bootvar command:

After changing the config-register, the change takes place at the next reload, as shown above.

Step7: Reboot the router to load new image

For the router to run the new Cisco IOS software image, you need to reload the router. Make sure you have saved the configuration by issuing the copy run start or write mem command.

Installation Procedure For Acd Powerbox Performance Module With Two Wires

Step 8: Verify the Upgrade

After the router comes up, make sure you are currently running the new version of code, by issuing the show version command:

Verify that the Cisco IOS software version 12.2(6) is correct and that the configuration register is set to 0x2102.

Related Information