Skip to content

Installation

Ido Schimmel edited this page May 17, 2016 · 28 revisions

The operating system shipped with the switch is a Fedora Remix with a Rawhide kernel, which tracks the mainline tree. Refer to the Installing a New Kernel document for more information regarding kernel versioning. It is possible to use other Linux distributions, including unmodified Fedora, which is available here.

By default, the switch comes pre-installed with ONIE, which "defines an open 'install environment' for bare metal network switches". However, PXE installation is also possible. This document describes both methods.

Note: Installing using PXE will remove ONIE, which might be required by other operating systems. Re-installing ONIE is not supported.

Table of Contents

  1. Getting the Installation Files
  2. Default Credentials
  3. Installing Using ONIE
  4. Preparing the Installation
  5. Performing the Installation
  6. Uninstalling
  7. Installing Using PXE
  8. Preparing the Installation
  9. Performing the Installation
  10. Customizing the Installation
Getting the Installation Files ------------------------------

The installation files are available here and are indexed by the kernel version used. Refer to the Overview document for a list of features by version.

The following files are included in the provided tarball:

  1. An ISO file of the Fedora Remix.
  2. A kickstart file to automate the installation.
  3. An ONIE installer of the Fedora Remix, if using ONIE.
  4. A matching firmware binary.
Default Credentials -------------------

User: root Password: switchdevftw

The root password can be easily changed by editing the rootpw command in the kickstart file. It's highly recommended to do so!

Installing Using ONIE ---------------------

The ONIE project describes a variety of installation options. This section describes an installation using an HTTP server accessible via the management port on the switch.

### Preparing the Installation The extracted contents of the ISO file, the ONIE installer and the kickstart file (e.g. `install-onie.ks`) should all be accessible via an HTTP server.

To extract the contents from the ISO file, first mount it:

$ mount -o loop,ro -t iso9660 /path/file.iso /path/iso/directory

And copy to contents over to the HTTP server directory:

$ cp -r /path/iso/directory /path/http/server

Finally, edit the url command in the kickstart file to point to the extracted ISO directory.

Note: The ONIE installer assumes the kickstart file is named install-onie.ks and that it's placed in a directory called ks, placed next to the ONIE installer. For example:

├── ks
│   ├── install-onie.ks
├── mlxsw-4.6.0-0.rc7.git1.1-ONIE-installer.bin
### Performing the Installation

Reboot the switch and in GRUB menu choose ONIE: Resuce, as the discovery phase is unnecessary:

 +----------------------------------------------------------------------------+
 | ONIE: Install OS                                                           |
 |*ONIE: Rescue                                                               |
 | ONIE: Uninstall OS                                                         |
 | ONIE: Update ONIE                                                          |
 | ONIE: Embed ONIE                                                           |
 |                                                                            |

In ONIE prompt type:

ONIE:/ # onie-nos-install http://server/provided-ONIE-installer.bin

From this point on the installation is completely automatic. Once it's done the switch will reboot into the newly installed system.

### Uninstalling

Reboot the switch and in GRUB menu choose ONIE:

      Generic (4.6.0-0.rc7.git1.1.fc25.x86_64) 23 (Generic)
      Generic (0-rescue-1c9ab09884c946649fa3e1688040abde) 23 (Generic)
      ONIE

And then ONIE: Uninstall OS. This will remove the partitions used by the OS, but will keep ONIE installed, so that a new OS can be installed using it.

Installing Using PXE --------------------

The instructions below assume that a configured PXE server is already available on the network and that the installation files are available over HTTP. However, other methods are possible.

### Preparing the Installation

As with the ONIE installation, the extracted contents of the ISO file and the kickstart file (e.g. install-pxe.ks) should all be accessible via an HTTP server.

To extract the contents from the ISO file, first mount it:

$ mount -o loop,ro -t iso9660 /path/file.iso /path/iso/directory

And copy to contents over to the HTTP server directory:

$ cp -r /path/iso/directory /path/http/server

In addition, the kernel executable and the initrd image should be copied over to the PXE server:

$ cp /path/iso/directory/images/pxeboot/{initrd.img,vmlinuz} /tftpboot/directory/

Next, edit the url command in the kickstart file to point to the extracted ISO directory.

Finally, add the following lines to the /tftpboot/pxelinux.cfg/default file on the PXE server:

LABEL MY_LABEL
        kernel directory/vmlinuz
		append initrd=directory/initrd.img inst.ks=http://server/path/install-pxe.ks console=ttyS0,115200n8 modprobe.blacklist=mlxsw_pci
### Performing the Installation

Make sure network boot is enabled in the BIOS (Ctrl+b) and reboot the switch. Once up, choose the recently configured PXE label (e.g. MY_LABEL) and the automated installation will begin.

Once done, the switch will reboot into the newly installed system.

Customizing the Installation ----------------------------

As explained above, the installation is automated using kickstart files. These can be easily edited to provide different answers during the installation, as well as to select different packages to install by default. Please refer to the official kickstart documentation for more info.

To generate different ISOs with a different package selection it's possible to use mock and pungi as explained in Fedora's wiki.

Creating an ONIE compatible installer from an ISO image is explained in ONIE's Github repository.

Clone this wiki locally